Is Python like VB?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Cox

    #1

    Is Python like VB?

    As you may or may not know, Microsoft is discontinuing Visual Basic in favor
    of VB.NET and that means I need to find a new easy programming language. I
    heard that Python is an interpreted language similar to VB. This means that
    it doesn't have all the hard stuff like pointers, classes and templates like
    C, C++ and assembly language.

    Where I work we use Microsoft Office with a lot of customization using
    Visual Basic. I would like to switch to Python to do it since VB is being
    discontinued. Would Python meet our requirements? I need to make lots of
    GUI applications (message boxes, forms, etc.) and do the underlying business
    logic too.

    Thanks in advance.


  • Cappy2112

    #2
    Re: Is Python like VB?

    First of all, discontinuing VB doesn't mean you have to stop using it.
    I worked on a project which was compiled with Visual C 1.52, for many
    years after it was not supported. The project is used by nearly every
    engineer at the company where I work.
    We are still devleoping the project I work on now in VB6, and have no
    reason to bail.
    For new projects, it would make sense to look into VB.net or some
    alternative.

    Python has classes, but not templates. However, you don't have to use
    classes in your program, but it will make life easier if you learned
    them.

    Python's classes are not as complicated as C++, it's a much better
    language to learn from.

    VB has classes too, and if you haven't used them in your programs, then
    there's a good chance you can program that way with Python too, but I
    wouldn't make a point of it.

    VB has a much better IDE than the IDE's for Python, although Eric3 is
    one of the best, and is absolutely free.

    VB's ide is it's strongpoint, not the language itsself.

    If you need to do Gui's then it is extremely usefull to learn the
    basics of classes, your code will be much simpler in the long run.

    There are many gui toolkits/frameworks for Python, but the foreunners
    are pyQT, wxPython, pyGTK, and TK/Tkinter.

    You don't have to worry about pointers though :-)

    Comment

    • Harlin Seritt

      #3
      Re: Is Python like VB?

      "Would Python meet our requirements? "

      Yes and no. Because Python is a very high-level language and
      dynamically typed it is easy to learn. Python doesn't make use of
      pointers but you are able to write object-oriented code (as opposed to
      just being object-friendly like Visual Basic is). You will find that on
      its own you won't be able to do any Office macro scripting although
      there are several packages that will give you added functionality like
      access to Com+ objects (see win32 modules by Mark Hammond). Now, this
      may require more work than using VBA but it *is* doable. The com
      portion of the win32 modules can enable one to create even a
      macro-language unto itself!

      Python is very powerful. There are many 3rd party modules and
      frameworks (Zope, CherryPy). Also, there are many GUI toolkits
      available for it (wxWindows, GTK, QT, Tk and on and on) and you can
      also use it as a wrapper to write and compile to Java bytecode (see
      Jython). The problem for you, however, is it may or may *not* meet
      every requirement. For that you'll have to find out for yourself. I
      suggest downloading Python and giving the Python tutorial a whirl and
      then taking a look at other Python-related stuff:

      [For programmers:] http://docs.python.org/tut/tut.html
      [For non-programmers:] http://honors.montana.edu/~jjc/easytut/easytut/
      [Win32 stuff:] http://starship.python.net/crew/mhammond/
      [Tk 'Tkinter':]
      http://www.pythonware.com/library/tkinter/introduction/
      [wxPython:] http://www.wxpython.org/
      [PyGTK:] http://www.pygtk.org/

      Purusing these links will give you a very good idea of whether Python
      is right for you. Naturally we'd all like to say 'YES Python is good
      for you!' but you have to investigate for yourself.

      Good luck!

      Harlin Seritt

      Comment

      • Dennis Lee Bieber

        #4
        Re: Is Python like VB?

        On Wed, 16 Mar 2005 21:33:36 -0800, "Mike Cox" <mikecoxlinux@y ahoo.com>
        declaimed the following in comp.lang.pytho n:
        [color=blue]
        > As you may or may not know, Microsoft is discontinuing Visual Basic in favor
        > of VB.NET and that means I need to find a new easy programming language. I[/color]

        So far as I know, VB.NET is the next version of Visual Basic,
        making use of the "common language runtime" -- which, as I understand,
        is M$ speak for a byte-code interpreter, ALL the Visual Studio.NET
        languages generate the same byte-code (VC still offers a "non-managed"
        native mode for writing real low-level stuff). The core VB language is
        essentially the same (some more Object Oriented features, maybe), it is
        just the associated system libraries that change.
        [color=blue]
        > heard that Python is an interpreted language similar to VB. This means that
        > it doesn't have all the hard stuff like pointers, classes and templates like
        > C, C++ and assembly language.
        >[/color]
        You know of an assembly language that does Object Oriented?
        My... The world has been waiting with bated breath for that.

        Python is OO... It has classes. Unlike Java, it doesn't force
        them down your throat if all you want to do is print "Hello World".
        Python doesn't have "begin"/"end" (or "{"/"}") to mark code blocks -- it
        relies on indentation. Do you have the discipline to rely on the shape
        of your code to control logic flow?
        [color=blue]
        > Where I work we use Microsoft Office with a lot of customization using
        > Visual Basic. I would like to switch to Python to do it since VB is being[/color]

        Visual Basic, or Visual Basic for Applications? VBA is the
        internal language of the Office package -- and I wouldn't be surprised
        if the newest version of Office starts incorporating parts of the CLR.
        VB is the VBA language with stand-alone additions.
        [color=blue]
        > discontinued. Would Python meet our requirements? I need to make lots of
        > GUI applications (message boxes, forms, etc.) and do the underlying business
        > logic too.
        >[/color]
        Python, OORexx, PERL, all can do what you want... So could Ada,
        C, C++... The question is, would you /want/ to do it in some of those.
        You're not going to get, in most cases, drag&drop GUI designers. You'll
        have to get down to the native windows calls (if using the win32
        extensions for Python), I don't think MFC has been mapped to Python; or
        learn a whole new GUI toolset (Python comes with Tk and the Tkinter
        interface to it; there are a half dozen other options, some free, some
        $$$)

        Of the alternatives, I'd push Python, OORexx (though you may
        need to "buy" the "batteries" for access to external/system calls), and
        maybe Ada or Java... OTOH, I'll also speak blasphemy and suggest you
        really look at some of the publications about converting from VB6/VBA to
        VB.NET and decide if that is really as bad as you think it is. Check out
        appendix A of "VB.NET Language in a NutShell"... Think of VB.NET as "VB
        on Java"; some of the changes give VB similar behavior to Java --
        strings are immutable and one does not declare a string size, modifying
        a string dynamically generates a new string (which is also what Python
        does).

        --[color=blue]
        > =============== =============== =============== =============== == <
        > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
        > wulfraed@dm.net | Bestiaria Support Staff <
        > =============== =============== =============== =============== == <
        > Home Page: <http://www.dm.net/~wulfraed/> <
        > Overflow Page: <http://wlfraed.home.ne tcom.com/> <[/color]

        Comment

        • Ville Vainio

          #5
          Re: Is Python like VB?

          >>>>> "Cappy" == Cappy2112 <cappy2112@gmai l.com> writes:

          Cappy> VB has a much better IDE than the IDE's for Python,
          Cappy> although Eric3 is one of the best, and is absolutely free.

          Eric3 is not easily available for win32, due to current state of Qt
          licensing (will change with Qt4 I think).

          Cappy> There are many gui toolkits/frameworks for Python, but the
          Cappy> foreunners are pyQT, wxPython, pyGTK, and TK/Tkinter.

          On windows it might make sense to choose wxPython, though I've heard
          some good stuff about new versions of pyGTK as well.

          People coming from VB background probably also appreciate the ability
          to draw the UI in point&click style:




          Unfortunately these seem to still be a tad rough around the edges...

          --
          Ville Vainio http://tinyurl.com/2prnb

          Comment

          • James

            #6
            Re: Is Python like VB?

            Mike Cox wrote:[color=blue]
            > As you may or may not know, Microsoft is discontinuing Visual Basic[/color]
            in favor[color=blue]
            > of VB.NET and that means I need to find a new easy programming[/color]
            language. I[color=blue]
            > heard that Python is an interpreted language similar to VB.[/color]

            VB is not interpreted. Sure! You can compile it to P-Code if you want
            to but most people compile to machine code (like C, C++, Assembler).
            You are confusing between static linking in C++ etc and mandatory
            dynamic linking with VB runtimes with interpreted languages. VB needs
            runtimes but is not interpreted generally.

            Python is NOT similar to VB. It is much better as a language. VB is
            optimized to what you are doing currently. Python is a more general
            purpose language.
            [color=blue]
            > This means that
            > it doesn't have all the hard stuff like pointers, classes and[/color]
            templates like[color=blue]
            > C, C++ and assembly language.[/color]

            Python has classes.
            C and Assembly do not have classes and templates.
            If I remember correctly, VB could have pointers too (Address
            function?).
            [color=blue]
            > Where I work we use Microsoft Office with a lot of customization[/color]
            using[color=blue]
            > Visual Basic. I would like to switch to Python to do it since VB is[/color]
            being[color=blue]
            > discontinued. Would Python meet our requirements? I need to make[/color]
            lots of[color=blue]
            > GUI applications (message boxes, forms, etc.) and do the underlying[/color]
            business[color=blue]
            > logic too.[/color]

            You will probably find migrating to VB.NET easier than to Python if you
            have to do WYSIWYG data bound form design.

            VB.NET is quite a nice language (I personally prefer C#). Much nicer
            than VB6. Python is better but it may not meet YOUR needs
            infrastructure wise.

            Comment

            • James

              #7
              Re: Is Python like VB?

              >> VB has a much better IDE than the IDE's for Python, although Eric3
              is
              one of the best, and is absolutely free.

              There is no binary distribution for Eric3 on MS Windows. The OP sounds
              like he is an exclusively windows programmer.

              While we are on topic, is there no one in the Python open source
              community who has a commercial license to Qt for Windows and can make a
              binary distribution for Eric3 for MS Windows?

              Comment

              • Joe

                #8
                Re: Is Python like VB?

                On Wed, 16 Mar 2005 21:33:36 -0800, "Mike Cox"
                <mikecoxlinux@y ahoo.com> wrote:[color=blue]
                >Where I work we use Microsoft Office with a lot of customization using
                >Visual Basic. I would like to switch to Python to do it since VB is being
                >discontinued . Would Python meet our requirements? I need to make lots of
                >GUI applications (message boxes, forms, etc.) and do the underlying business
                >logic too.[/color]

                I wouldn't advise you to switch to Python from VB if...
                1. the installer must be downloaded from the Net, so must be kept as
                small as possible (GUI layers like wxWidgets of PyGTK add several
                megabytes to your app)
                2. you're used to sophisticated GUI designers like VB or Delphi, and
                want something as polished
                3. you expect an IDE as rich as those two proprietary tools (including
                IntelliSense, intigrated GUI designer, compiler, etc.)
                4. your app uses third-party components that are not available to
                platforms other than VB (or Delphi)

                After checking out the tools currently available, I got to the
                conclusion that Python is a very fine tool for text-based apps or
                moderately-sophisticated GUI apps like BitTorrent.

                For more demanding GUI apps, I would advise you stick to VB until the
                ..Net framework stabilizes and trickles down to being available on 80%
                of hosts, at which point you can safely trade horses (VB.Net does
                solve some of the oddities of VB Classic.)

                In an ideal world, we'd have open-source development tools as rich as
                VB or Delphi, but at this point, I haven't found any that doesn't fall
                short on any of the points above (probably because the work involved
                is underevaluated, and just not doable without a constant and
                sufficient revenue stream.)

                Just my opinion,
                Joe.

                Comment

                • Gregor Horvath

                  #9
                  Re: Is Python like VB?

                  James wrote:
                  [color=blue]
                  > You will probably find migrating to VB.NET easier than to Python if you
                  > have to do WYSIWYG data bound form design.
                  >
                  > VB.NET is quite a nice language (I personally prefer C#). Much nicer
                  > than VB6. Python is better but it may not meet YOUR needs
                  > infrastructure wise.[/color]

                  This is more a strategic decision than a technical one.

                  MS has proven that it uses and forces its developers community to
                  maximize their own profits and spread of technologies. Personally I dont
                  want to be forced ("Where do you want me to go today?")
                  Who guarantees that VB.NET will not have the same tragic kismet that VB6
                  had?

                  Open Source is totally different and thats the real difference between
                  VB and python.

                  As long as their are users and working code, there will be a community
                  around an OSS tools project.
                  This is not true for commercial tools, as perfectly proven by MS with
                  VB6. Its users are crying and MS is deaf because of strategic MS
                  considerations.

                  http://news.com.com/Developers+slam+...31.html?tag=nl
                  http://news.com.com/Microsoft+walks+...?tag=nefd.lede

                  --
                  Greg

                  Comment

                  • Groleo Marius

                    #10
                    Re: Is Python like VB?

                    Maybe you should ask : Is VB like Python????
                    ( remark the ???? )


                    On 17 Mar 2005 09:45:22 +0200, Ville Vainio <ville@spammers .com> wrote:[color=blue][color=green][color=darkred]
                    > >>>>> "Cappy" == Cappy2112 <cappy2112@gmai l.com> writes:[/color][/color]
                    >
                    > Cappy> VB has a much better IDE than the IDE's for Python,
                    > Cappy> although Eric3 is one of the best, and is absolutely free.
                    >
                    > Eric3 is not easily available for win32, due to current state of Qt
                    > licensing (will change with Qt4 I think).
                    >
                    > Cappy> There are many gui toolkits/frameworks for Python, but the
                    > Cappy> foreunners are pyQT, wxPython, pyGTK, and TK/Tkinter.
                    >
                    > On windows it might make sense to choose wxPython, though I've heard
                    > some good stuff about new versions of pyGTK as well.
                    >
                    > People coming from VB background probably also appreciate the ability
                    > to draw the UI in point&click style:
                    >
                    > http://gazpacho.sicem.biz/
                    > http://wxglade.sourceforge.net/
                    >
                    > Unfortunately these seem to still be a tad rough around the edges...
                    >
                    > --
                    > Ville Vainio http://tinyurl.com/2prnb
                    > --
                    > http://mail.python.org/mailman/listinfo/python-list
                    >[/color]


                    --
                    Regards, Groleo!

                    .''`. # touch universe
                    : :' : # chmod +rwx universe
                    `. `'` # ./universe
                    `- Debian - when you have better things to do than fix a system

                    Comment

                    • James

                      #11
                      Re: Is Python like VB?

                      Before we discuss this any further, I suggest that you guys take a look
                      at OP's posts in comp.os.linux.a dvocacy.

                      I think we all regulars here know where VB and Python stand. Let's not
                      take bait on this one.

                      Comment

                      • Matthew

                        #12
                        Re: Is Python like VB?

                        "Mike Cox" <mikecoxlinux@y ahoo.com> wrote in message news:<39sj7hF62 s0etU1@individu al.net>...[color=blue]
                        > As you may or may not know, Microsoft is discontinuing Visual Basic in favor
                        > of VB.NET and that means I need to find a new easy programming language. I
                        > heard that Python is an interpreted language similar to VB. This means that
                        > it doesn't have all the hard stuff like pointers, classes and templates like
                        > C, C++ and assembly language.
                        >
                        > Where I work we use Microsoft Office with a lot of customization using
                        > Visual Basic. I would like to switch to Python to do it since VB is being
                        > discontinued. Would Python meet our requirements? I need to make lots of
                        > GUI applications (message boxes, forms, etc.) and do the underlying business
                        > logic too.
                        >
                        > Thanks in advance.[/color]

                        The macro language used within Microsoft Office products is called VBA
                        - Visual Basic for Applications. It's similar to but not the same as
                        VB - Visual Basic.

                        You message hinted that it might be VBA, and not VB, that you use. If
                        it really is VBA, then that MAY be unaffected by the drop of support
                        for VB.

                        Comment

                        • D H

                          #13
                          Re: Is Python like VB?

                          Mike Cox wrote:[color=blue]
                          > As you may or may not know, Microsoft is discontinuing Visual Basic in favor
                          > of VB.NET and that means I need to find a new easy programming language. I
                          > heard that Python is an interpreted language similar to VB. This means that
                          > it doesn't have all the hard stuff like pointers, classes and templates like
                          > C, C++ and assembly language.
                          >
                          > Where I work we use Microsoft Office with a lot of customization using
                          > Visual Basic. I would like to switch to Python to do it since VB is being
                          > discontinued. Would Python meet our requirements? I need to make lots of
                          > GUI applications (message boxes, forms, etc.) and do the underlying business
                          > logic too.[/color]

                          I would either stick with the old Visual Basic since plenty of other
                          people will keep using it, or go ahead and switch to VB.NET or C#.
                          Especially if you are used to the Windows Form Designer in Visual
                          Studio, I would not recommend switching to Python. It has no
                          equivalent, and thus Python would be much harder for you to use.
                          We have almost finished Windows form designer support in SharpDevelop
                          IDE for boo, a .NET language similar to Python. But still in your case
                          I'd just use VB.NET since you are familiar with VB and all .NET
                          languages are pretty comparable.

                          Comment

                          • James

                            #14
                            Re: Is Python like VB?

                            > We have almost finished Windows form designer support in SharpDevelop
                            [color=blue]
                            > IDE for boo, a .NET language similar to Python. But still in your[/color]
                            case[color=blue]
                            > I'd just use VB.NET since you are familiar with VB and all .NET
                            > languages are pretty comparable.[/color]

                            Wow! That's great news. I saw a few days ago an old post that said you
                            guys were waiting for the new .NET as implementing this kind of thing
                            is simpler in it. Anyway. Great work. This probably makes Boo the first
                            non-MS .NET language to have form designer support. Correct?

                            Comment

                            • Cappy2112

                              #15
                              Re: Is Python like VB?

                              Eric3 has been compiled for Windows, without Cygwin and Without a
                              commercial license

                              Comment

                              Working...