[Tutor] Path?

Jim Byrnes jf_byrnes at comcast.net
Wed Jul 14 03:53:08 CEST 2010

Adam Bark wrote:

<snipped some old stuff>

>>>> If I use the terminal to start the program it has no problem using the
>>>> file.  There are multiple files in multiple directories so I was looking
>>>> for
>>>> a way to just double click them and have them run.  If it turns out that
>>>> I
>>>> must make changes to or for each of the files it will be easier to just
>>>> keep
>>>> using the terminal.  I've only been using Ubuntu for a few months so I
>>>> was
>>>> surprised that the program could not see a file that is in the same
>>>> directory.
>>>> Regards,  Jim
>>> The problem is ubuntu doesn't run the script from the directory it's in so
>>> it's looking for wxPython.jpg somewhere else.
>> OK, I mistakenly thought that double-clicking on file in Nautilus would
>> take care of the path info.
>> In my reply above I also mentioned that I tried by dropping it on a
>> Launcher on the top panel and that the command the launcher uses is
>> usr/bin/python2.6.  Is there a way that the command can be changed so that
>> it will look in the same directory the python script is in for any file it
>> needs?
>> Thanks,  Jim
> Not sure if you got my previous email but you could try writing the bash
> script I posted (with the $1 line to get the path) and setting that as your
> launcher, I think it should work.
> Let me know if you didn't get it or it doesn't work.
> HTH,
> Adam.

I got it, got sidetracked and then forgot to look at it again.  Thanks 
for reminding me.  Your idea works, but with one little downside.  The 
directories I am working with are chapters in a book.  So as I move from 
chapter to chapter I will need to change the bash script, but this seems 
to be less typing than using the terminal.

Thanks,  Jim

More information about the Tutor mailing list