I have a Python/Sikuli script where I need to store the location of the file in a variable.
I have the IDE on one location, and the file is stored in a different directory.
IDE: C:\Sikuli\runIDE.cmd
File: C:\Script\Files\HelloWorld2.sikuli\HelloWorld.py
Now I use os.getcwd()
to fetch the location of the IDE.
But how do I return the full directory path of the file "HelloWorld.py"?
I also used os.path.abspath("HelloWorld2.py")
and os.path.dirname(os.path.realpath('HelloWorld2.py'))
.
But also that didn't work.
Can anyone help me with this?