How do I find the full path of the currently running script.

How do I find the full path of the currently running script.

Post by nobod » Fri, 19 Sep 2003 01:28:12


What I am after is Python sys.argv[0] equivalent which gives the full name
(including path) of the currently running script. I have unzip.exe binary in
the same directory as the main scheme program and need to run this unzip.exe
from scheme. Using the latest DrScheme environment...
 
 
 

How do I find the full path of the currently running script.

Post by Anton van » Fri, 19 Sep 2003 02:17:32


in
unzip.exe

The following will give the path of the script in which this code appears:

(require (lib "etc.ss"))
(this-expression-source-directory)

 
 
 

How do I find the full path of the currently running script.

Post by Jens Axel » Fri, 19 Sep 2003 04:09:35


I would have suggests (current-path), but I didn't knew the clever
this-expression-source-directory:

< http://www.yqcomputer.com/ #node_sec_11.3.3>

--
Jens Axel Saard
 
 
 

How do I find the full path of the currently running script.

Post by nobod » Fri, 19 Sep 2003 05:11:27

Thank you, it works...




appears:
< http://www.yqcomputer.com/ #n
ode_sec_11.3.3>