I have a file called ikfast_generator_cpp.py
in a directory called openrave-0.9.0-src/python
under my home directory.
How do I run it in Python?
I have a file called ikfast_generator_cpp.py
in a directory called openrave-0.9.0-src/python
under my home directory.
How do I run it in Python?
Start a terminal by clicking the appropriate icon on the left side of the screen.
In the terminal, change the current directory to the location of your file:
cd ~/openrave-0.9.0-src/python
(The ~
means "my home directory". I hope the rest of the line is clear.)
You should see the prompt change to include the new location. If you like you can check by typing
pwd
Now run the Python interpreter, giving it the name of the file to run:
python ikfast_generator_cpp.py
ikfast_generator_cpp.py
. See if you can work out what you might do to run a Python program with a different name.
– Mark Smith
Nov 23 '15 at 20:20
To locate the file use:
$ locate ikfast_generator_cpp.py
Then when you find the path it is in, copy the path and use the following command below.
Lets say the path to your file is openrave-0.9.0-src/python/ikfast_generator_cpp.py.
To run an executable .py (Python) file, use the command:
$ ./openrave-0.9.0-src/python/ikfast_generator_cpp.py
or if it is not executable use:
$ python openrave-0.9.0-src/python/ikfast_generator_cpp.py
python myfile.py
will runmyfile.py
. If that doesn't help, perhaps you'd like to rephrase the question, minus the rant, and perhaps someone can be of more help. Good luck. – Mark Smith Nov 23 '15 at 16:40ls -l
? – Mark Smith Nov 23 '15 at 17:02ikfast_generator_cpp.py
resides in? What doesfile ikfast_generator_cpp.py
say? – stevieb Nov 23 '15 at 17:18cd ~/openrave-0.9.0-src/python
thenpython ikfast_generator_cpp.py
. The commandls
is a shell command (likedir
in Windows), not a Python command. – Mark Smith Nov 23 '15 at 18:04