The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
Programming in Python?
Discuss Programming in Python? in the Python Programming forum on Dev Shed. Programming in Python? Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

September 17th, 2003, 10:50 PM
|
 |
Contributing User
|
|
Join Date: Aug 2003
Location: Somewhere over the Rainbow
Posts: 128
Time spent in forums: 3 h 54 m 28 sec
Reputation Power: 10
|
|
|
Programming in Python?
Hi. I'm interested to learn Python, but I would like to know what kind of projects I can do, I kno that Python has a very simple and consistent syntax and a large standard library, but how can I package and compile Python code ? how can I make *.exe with Python code? , it is possible to make windows or forms, buttons etc.?
|

September 17th, 2003, 10:57 PM
|
 |
onCsdfeu
|
|
Join Date: Jul 2003
Location: Canada
Posts: 100
Time spent in forums: 2 h 16 m 21 sec
Reputation Power: 10
|
|
|
As for compiling, you can achieve that by calling your Python interpreter with the '-O' option : it will optimize your script and create a "compiled" script, kinda like Java bytecode I guess.
For executable files, check out py2exe (Google your way to it). I've never tried it myself, but it seems to do a pretty good job.
As for UIs, there are 2 libraries available : Tkinter and wxPython. Tkinter is included with your Python installation while wxPython is a separate install. Some people will argue towards one or the other, but it's more a question of personal taste as to which one's best.
|

September 18th, 2003, 12:22 AM
|
|
Contributing User
|
|
Join Date: Dec 2001
Location: Houston, TX
Posts: 383
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 12
|
|
|
There are a LOT more than 2 libraries available. In fact, the best library (from a developer standpoint) hasn't even been mentioned - Gtk+. Combine Python with libglade/glade and you've got some really fast GUI app development.
Making .exe files out of python is pretty impractical, really. When you get right down to it, the person will have to have a python interpreter in order to run it. If that means you bundle the interpreter inside the executable (which is what py2exe does), then so be it. But if you are trying to "compile" python scripts so that they are obfuscated and so that people can't "steal" your code, then give up right now because decompiling them is trivial.
|

September 18th, 2003, 08:02 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
Python is a great lang'; it's been used to do almost everything - from commersial GUI applications to Zope, a full fledged application server and other Web Scripting.. if you wana know where it's being used and by who check out the quotes page:
http://www.python.org/Quotes.html
 There are loads of GUI toolkits, I've headed really good things about PyQT and it's designer, which lets you make GUI's in a similar way to VB.. I havn't really done too much GUI programming though
For the web Python rocks bigtime though.. there are allot of good toolskits out there that you can use to make ur life easier, Spyce is a very good example! And there are modules for nearly every DB you'd imagin..
http://www.python-hosting.com
And lastly, your app isn't running fast enough? You could us Psyco (a JIT compiler) to speed up your program or even write the slow parts in C/C++
Py2EXE may not be the best way to secure your code but it makes distributing your programs on Windows pretty easy  , there are other programs which do the same thing but I really havn't heard that much about them. PyEXE seems to be the fav' for this
Conclision  Python rocks for everything you may want to use it for.. welcome to the world of Python programming G
Have fun,
Mark
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|