6 Qustions about Python: Does it do GUI? more...

Larry Bates lbates at swamisoft.com
Fri Feb 13 10:42:51 EST 2004


See answers below:

-Larry Bates
-------------------
"Will" <k4bda at yahoo.com> wrote in message
news:mailman.11.1076682913.31398.python-list at python.org...
> I just discovered Python and looked briefly at one of the tutorials
> for beginners...
>
> It looks a lot like the old Command line Basic... I'm sure it does
> much more but...
>
> 1 - Can you create windows, buttons, user input fields, etc as you
> can with Visual Basic?
>
> Answer:  Yes, take a look at wxPython interface at:
> http://www.wxpython.org/.  There are also several other
> interfaces Tk, Qt, etc. but I think wx is the most like
> Windows.
>
> 2 - Can you call Windows Procedures or what ever they call them
> these days?
>
> Answer: You can call both windows .DLLs and COM objects
> for .DLLs see
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847
> for COM objects get a copy of Python Programming on Win32.  It contains
> a ton of examples on how to interface Python with the Windows world.
>
> 3 - Can you create your own objects with a bunch of methods and
> properties?
>
> Answer: Absolutely.  You can create Python objects as well as COM objects
> that can be called by other programming languages (e.g. VB).  This is
> one of the most powerful features of Python.  Everything in Python is
> an object (even the builtin methods). But unlike some other languages
> the basic set of keywords is more like old Fortran (very short) so you
> aren't constantly forgetting the language.
>
> 4 - Can you create a Windows program that looks and feels like a
> Windows program?
>
> Answer: Absolutely.  You can even call the same dialogues that Windows
> calls so that it looks EXACTLY like a Microsoft product.  Of course if
> if you do the program will only run on Windows.  If you use wxPython
> your application would be portable (e.g. Linux, Mac, etc.).  For a
> good example of how well you can integrate Python into the "Microsoft"
> world take a look at SpamBayes (spam filtering plug in for Outlook) at
> http://spambayes.sourceforge.net/.  Download ActiveState's excellent
> Python distribution and you can see.  It is all written in Python, but
> acts like any other Windows application.
>
> 5 - Does it come with a compiler or must the user have the
> interpreter on their machine?
>
> Answer: No compiler (works like Java), but you can "freeze" the
> application so that you don't have to install Python interpreter.
> One example: http://starship.python.net/crew/theller/py2exe/
> I use py2exe and InnoSetup (http://www.jrsoftware.org/isinfo.php)
> to freeze and distribute software.  Both of these are open source
> (free) and have proven to work for me.  I've written COM objects,
> NT Services and regular programs and have frozen and distributed
> them using this method.
>
> 6 - Why another language? Easier than C or C++ or Visual C ?? More
> powerful than Visual Basic or the competing Borland productg?? Why
> Python?
>
> Answer: Much easier than C or C++, more powerful than VB. Portable
> across Operating Systems (unlike VB).  Programming in Python becomes
> as easy as writing pseudocode because properly written Python looks
> exactly like the pseudocode that you would write down at the beginning
> of an application.  You can write COM objects, NT services, GUI
> applications, batch-like files, web services, and simple conversion
> routines all in one language.  You eventually get good at the
> language because you aren't constantly switching between languages.
> The intrepreted nature of Python also allows you to do things that
> are very difficult in compiled languages.  The included standard
> library that includes routines for SMTP mail, FTP, HTTP, Zip/UnZip,
> date/time conversions, etc. can solve the vast majority of problems
> right out of the box.  With other languages you must purchase lots
> of add-ons to achieve the same functionality (and constantly upgrade
> them whenever you get a new version of the language).  There are
> excellent open-source tools like Python Imaging Library (PIL) and
> Report Lab/Graphics (PDF generation) that would cost 100's if not
> thousands of dollars.
>
> I'm interested as I never really took the time to become much of a C
> programmer (or C++ or Visual C) - I've done lot's of assembly
> language/embedded processor stuff & years ago Basic and some Visual
> Basic... before .net... and wondered if Python would do me for some
> projects I have always wanted to do?
>
> Thanks for any info.
>
> Will
>
>
>





More information about the Python-list mailing list