Mailinglist Archive: opensuse (1467 mails)

< Previous Next >
Re: [opensuse] Running scripts from ~/bin
On 02/07/2016 01:20 PM, Bob Williams wrote:
Running Leap 42.1 with KDE5.

In the past, I'm sure I was able to run scripts that I put in ~/bin from
my home directory. For example:

:~> python script.py

would run if script.py was in ~/bin

It doesn't seem to be working here, even though /home/bob/bin is in my
$PATH.

18:03 bob@hexagon:~> echo $PATH
/home/bob/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/bob/bin:/home/bob/leo-editor:/home/bob/morituri/bin:/home/bob/bin:/home/bob/leo-editor:/home/bob/morituri/bin

I'm not sure why it's there several times.

The error I get is:

18:03 bob@hexagon:~> python3 cdrip.py artists
python3: can't open file 'cdrip.py': [Errno 2] No such file or directory

I'm of an age where memory starts failing, so maybe I've misremembered
something. Any suggestions, please.

if but maybe debugging.

1. Shouldn't it be "#! /usr/bin/python script.py" as teh first line"?
Or simply "usr/bin/python script.py" with no prefix?

2. How does "cdrip.py" come into it?
Is this required in some way by "script.py"?

See also manual page for PYTHONPATH and PYTHONHOME

--
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting frowned upon?

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References