Skip to main content

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.
code:
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
to add personal path, add following line @ end of ~/.profile
code:
path="$path":~/documentation/python
it take effect next time log in, , can type
code:
myscript


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Python (IDLE or bash) not finding my scripts.


Ubuntu

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums