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

B. Bogart ben at ekran.org
Mon Mar 28 01:21:22 CEST 2005


Hey Thomas,

I'm sorry to have bothered you with this. Making a fool of myself tends
to be the result of jumping right into a language I don't know.

I assumed "import os os.path" would work as apposed to:

import os
import os.path

Well my dad is sending me some python books for my birthday next week,
hopefully this will solve some of these issues!!

How much bigger would "py" be if it did include an interpreter? I only
ask because I've now unwittingly make pixelTANGO depend on both "py" the
external and python the language. But hey, better than tot buffer
overflows.

Thanks for the good work with this. I'll probably be starting a new
research job this summer that will involve python. I think I may end up
doing some interesting stuff like creating an interface that makes PD
into an www.accessgrid.com service.

Anyhow thanks again for putting up with my foolishness!

b>

Thomas Grill wrote:
> 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
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050327/4b5e6ec4/attachment.pgp>


More information about the Pd-list mailing list