Movatterモバイル変換


[0]ホーム

URL:


Refined: How do I launch 'somewhere/Sweety.py' without 'somewhere/'?

Martin Blessm.bless at gmx.de
Sun Apr 8 07:12:30 EDT 2001


It seems my question wasn't precise enough. Meanwhile I know betterwhat I'm looking for ;-)Currently I'm deleloping several useful scripts that reside in*different subdirs* of my import hierarchy. I'd like to be able tocall them from an arbitrary directory, without changing thatdirectory, so for example I could have my own directory listing byissuing a command like   PYTHON MyDir.pyThough MyDir.py is on the import-path, it seems it isn't found forexecuting unless I specify explicitly its exact path.*** So my QUESTION goes like this:How can I launch scripts that lie in different subdirs in my importpaths from an arbitrary directory without having to specify the pathof the script and without changing the directory?MartinOn Sat, 07 Apr 2001 08:45:14 GMT,m.bless at gmx.de (Martin Bless) wrote:>Working in dos boxes of win - but probably independent of this here's>my question:>>ok,   PYTHON   starts Python>ok,   PYTHON   c:\really\long\path\somewhere\Sweety.py>executes  my beloved script Sweety.py.>>How can I start   Sweety.py   without having to specify that awful>long path?>>Martin


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp