codice:
G:\Temp>edit prova.py
Modo 1:
codice:
G:\Temp>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import prova
>>>
Modo 2:
codice:
G:\Temp>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import py_compile
>>> py_compile.compile("prova.py")
>>>
Modo 3:
codice:
G:\Temp>python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import compiler
>>> compiler.compileFile("prova.py")
Questo terzo modo a me però non funziona (anche se dovrebbe, stando a quanto ho letto).