[PD] Re: "py" and os.path

Thomas Grill gr at grrrr.org
Sun Mar 27 22:22:55 CEST 2005


Hi Ben,

>
> I'm having fun with py and have a couple questions.
>
> #1 Does the precompiled py external include the python interpreter?
>    As in does it not depend on python being installed on the system?
>    If so what modules does it include?
>

The Python interpreter is not included - Python (2.1 upwards) must be 
installed, which is the case in OSX and most if not all Linux 
distributions. It's not standard on Windows, but there's a convenient 
installer.

> #2 I can "import os" to get OS methods like os.dirlist. but when I try
>    and "import os.path" py refuses to load the script. I need
>    os.path.join that works on all OSs.
>

That's strange... i have no problem under OSX 10.3 with standard Python 
installation (py cvs)

Could you try to load the following script with py:

------------

try:
	import sys
except:
	print "Not even sys is working"

try:
	import os.path
except:
	print "Import failed:",str(sys.exc_info()[1])

-------------

many thanks,
Thomas
	





More information about the Pd-list mailing list