|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Compiler?
This may seem like a wierd newbie question to be asking, but here goes.
Is it possible to compile Python? I know PHP can be thanks to Zend but is there any Python equivilant?
__________________
Is it just me or is it cold in here? |
|
#2
|
||||
|
||||
|
If I recall correctly, the Python interpreter comes with a built in byte-compiler. You might want to try this (assuming that you want to byte compile a file called foobar.py):
Code:
#!/usr/bin/python
import py_compile
py_compile.compile("foobar.py")
This will create a byte-compiled python file called foobar.pyc. Is this what you're looking for? |
|
#3
|
|||
|
|||
|
If you want to make Python programs run stand-alone, take a look at the Python FAQ, and search for Freeze.
If you want to compile them, use Scorpions4ever's answer.
__________________
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs |
|
#4
|
|||
|
|||
|
Standalone is what I was looking for, sorry if I was vague. Thank you both for the info.
|
|
#5
|
||||
|
||||
|
You should also have a look at http://starship.python.net/crew/theller/py2exe/
It allows you to create standalone *.exe files (command line and Windowed versions). Pretty cool stuff ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Compiler? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|