How to run program in Linux
davea at ieee.org
Fri Apr 16 04:16:23 EDT 2010
Jim Byrnes wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">I am just
> learning Python and am new to Linux so I am probably doing something
> to trip myself up. I am trying to run an example GUI program that
> fetches a record from a database. All the files are in the same folder.
> The program runs but its results vary depending on how I started it.
> If I run it from the terminal or Idle, I enter a key and the program
> fetches the proper record. If I run it from Nautilis or a panel
> launcher, I enter the proper key and I get an error message saying the
> key does not exist.
> I am assuming that I am having path issues but don't know how to
> correct it.
> Thamks, Jim
Presumably you're also new to mailing lists.
At an absolute minimum when you describe an error, PASTE the error
message, complete with traceback, into your message. As it stands, I'm
left wondering which key on your keyboard can possibly "not exist."
Perhaps it's a non-ASCII code, and you're getting some encoding error.
That's a common discrepancy between running from a terminal and running
from some GUI.
Even better is to specify the version of Python this program is
presumably written in, and what Linux distro. Then you say it's a GUI
program, so you should specify which GUI library you're using.
Now if I do a bunch of guessing, I might come up with the likelihood
that your "Nautilus" is supplying a different current directory than the
one the script is located in. You can find that out by looking at:
But of course how you print that depends on what GUI package you're running.
More information about the Python-list