Thread: Python (IDLE or bash) not finding my scripts.
hello.
i've started learning program python 3 (i know, technically it's scripting), using swaroop's "a byte of python".
3rd time (iirc) i've started learn python, , have had same problem. far i've written basic hello worlds andf couple of incremental counters string.
have same problem. use kate write stuff, , save stuff *.py extension (sometimes put spaces in filename, count?).
if open scripts idle's editor , hit run, work fine. however, if use idle or bash on /usr/bin/python3 , try , invoke scripts, can't found.
save ~/documentia/python/, , have thought of adding said directory $path, don't want fiddle system files, unless have to.
ideas?
tks;
b
if not in path, must either cd directory, or provide path script.
to add personal path, add following line @ end of ~/.profilecode:cd ~/documentation/python/ python myscript python ~/documentation/python/myscript # if you've set hash-bang (first line reading #!/usr/bin/env python) # , file executable, can invoke directly ~/documentation/python/myscript
it take effect next time log in, , can typecode:path="$path":~/documentation/pythoncode:myscript
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Python (IDLE or bash) not finding my scripts.
Ubuntu
Comments
Post a Comment