[Python.NET] Organizing scripts in folders
Thane
thane at magna-capital.com
Thu Dec 2 19:31:25 CET 2004
import os
import sys
for root, path, files in os.walk(r'c:\python\scripts'):
sys.path.append(root)
I hope this is what you were looking for.
--Thane
> -----Original Message-----
> From: pythondotnet-bounces at python.org [mailto:pythondotnet-
> bounces at python.org] On Behalf Of Boris Capitanu
> Sent: Thursday, December 02, 2004 8:42 AM
> To: pythondotnet at python.org
> Subject: [Python.NET] Organizing scripts in folders
>
> Hello,
>
> I've been experiencing some problems when trying to
> invoke a script that is not located in the same folder
> as my .NET executable.
>
> Is there an easy modification to allow me to specify a
> full (or relative) pathname to the ImportModule
> function?
>
> Thank you... and also a big Thank You to Brian for the
> wonderful job he's done with this bridge. I hope he
> will find the time to continue development on it.
> (would be great if we could get more meaningful
> exceptions if something goes wrong - right now all I
> get is a PythonException, but that doesn't tell me
> where in the script the problem lies)
>
> Thanks, again.
>
> Boris Capitanu
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
> _________________________________________________
> Python.NET mailing list - PythonDotNet at python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
More information about the PythonDotNet
mailing list