Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 14th, 2005, 10:39 AM   #1
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
What's with the baggage? py2exe/compilers

Hi people, i've just been reading some of the threads about the py2exe thing. everytime someone asks about turning their .py into .exe this comes up and they say that it actualy packs the python.exe and other stuff into the executable... isn't that unnecessary? I dont know too much about this (only started learning python and Java recently) but i'm sure thats not how it would be done professioanlly, like with the day-today exec.s that everyone uses. Is there actually a way to turn code into executable, or have i missed something?

BTW, how hard is it to advance from console programming to GUI programming, in python?
megamind5005 is offline   Reply With Quote
Old Jun 14th, 2005, 4:22 PM   #2
Moldz
Programmer
 
Moldz's Avatar
 
Join Date: Feb 2005
Posts: 54
Rep Power: 4 Moldz is on a distinguished road
I don't know any exact details, but I would think that since Python is an interpreted language, you would need the python interpreter (aka python.exe) bundled with an executable in order to interpret your program.
Moldz is offline   Reply With Quote
Old Jun 15th, 2005, 3:56 PM   #3
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
i know, but thats my point: surely there must be a way of not having to have the interpreter make the file bigger. For example, some of the text editors on python.org are supposedly made in python (with GUI) but they dont come with the interpreter.
Anyone know more than me about this?

oh and what about my GUI question?
megamind5005 is offline   Reply With Quote
Old Jun 16th, 2005, 12:16 AM   #4
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 708
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
Quote:
Originally Posted by megamind5005
i know, but thats my point: surely there must be a way of not having to have the interpreter make the file bigger. For example, some of the text editors on python.org are supposedly made in python (with GUI) but they dont come with the interpreter.
Anyone know more than me about this?
Actually a lot of the programs written in Python with a GUI are still interperted. The files that you download are .py files. Souce files, not binarys. If you were to make a bainary of a file with GUI the filesize would be huge. There is a packaging system that comes with Python to put your .py files in an executavle for simplifying setup, but for those to work, the person needs the Python runtime. Python is a language that cannot be directly converted into machine code.

I'm sure with A LOT (a few years of work with a development team) you might be able to pull this off, and if you did you would be the president of the Python community.

For almost all interperted languages, you need the interperter.

And for GUI, you could go for either Tkinter which comes with Python (but a lot of people say it's confusing as hell), but if not that, I would use wxWindows which seams to be the next logical choice. There are however wrappers for almost every gui toolkit you can think of. GTK, QT, Fox, and a few propritary ones. For developing these applications there is BOA, but if you really want to get in touch with your inner UI self, learn how to code it all by hand so you actually understand it, instead of letting a program do all the work.
thechristelegacy is offline   Reply With Quote
Old Jun 15th, 2005, 11:11 PM   #5
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

For GUI programs use the free Boa Constructor, it has a visual form builder like visual C++ or C#.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Jun 16th, 2005, 1:01 AM   #6
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Python would be a mess to translate to machine code. Yuck. It could be done, but the innards of x86 assembly are very unpleasant...moreso when trying to generate it.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Jun 16th, 2005, 12:29 PM   #7
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
ah, i see. So i can do GUI, but i gotta use either BOA or GTK (they seem like the most popular). got it.
something else that i've just found out about: is it possible to use python as an alternative for PHP for websites? I was thinking of making a little forum just to see if i can, but i've just started learning Python and wanna put it to some use. i'm not lazy,though, i'll learn PHP later!


BTW, Now out of interest which is the next simplest language to learn for a novice that can be compiled into binary as well?
megamind5005 is offline   Reply With Quote
Old Jun 16th, 2005, 12:34 PM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Of course it is - you just need a host that supports it.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 16th, 2005, 12:47 PM   #9
megamind5005
Programmer
 
megamind5005's Avatar
 
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4 megamind5005 is on a distinguished road
err.. any of u guys know of any hosts that support python for that kinda stuff?
megamind5005 is offline   Reply With Quote
Old Jun 16th, 2005, 11:17 PM   #10
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 708
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
All you need is a host that has Python on their computers. I think it's more common then not. Almost all the hosts I've scene that run linx have a version of Python installed. YOu write a Python CGI script the same way you would with perl. There is a whole class for python cgi also that comes with it.
thechristelegacy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:59 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC