[Tutor] New to Python and Linux
mlangford.cs03 at gtalumni.org
Wed Sep 26 08:22:26 CEST 2007
Somewhere in the start menu, you'll be able to open a terminal. It
might be called GTerm, Gnome Term, xterm, or any number of things with
"term" in the name.
Once you've done that, you need to see if python is in your path. Do
that by typing python in the terminal. If you enter the python shell,
you're in luck.exit out (Ctrl-Z return, probably), If not, you need
to install/find python and add it to your path by typing
export PATHTOPY=/usr/bin/python #I don't know where python is for
you...this is just a guess
If you google bashrc, you'll learn how to make it so you don't have to
type this every time.
Now, you should be able to type "cd python" in a terminal you broght
up. This will change into the python directory you said you made in
your home dir. Now type "ls". That should show you a list of files in
the directory. If there is a python file there, say, named foo.py,
then you'd type
to run the application.
You can also set python up as the default app when you click a .py ext
file. I dislike this, then again, on windows, that's exactly how I
have it setup (while not in windows). To change this to match the
windows behavior, you need to right click on the .py file, and pray
that you see an "Open with" option. If you don't, ask for help on a
Gnome mailing list :o). If you do see the Open with option, select it,
then select "other", then using the folder on the command line, browse
to your python executable. I don't know where it is. If you open up a
terminal and type:
that *may* show you where it is.
On 9/26/07, Armand Nell <hobo.online at gmail.com> wrote:
> I am new to python programming and also the linux enviroment most of my skills are windows based and programming skills is visual basics. I decided that it would be a great start and new direction for me to learn python and at the same time linux. However I have already run into a wall, and any help would be appreciated even if you can direct me where to find the info or 'turor'.
> I am running Fedoracore 7 and Python 2.5
> In windows, if i write a program in Python and save it I then can simply double click the icon and the program will execute in a console window. Now under Fedoracore I write my program in gedit save it in my \home\(username)\python directory, when I double click it, it opens up agian in gedit. Now true it is maybe a simple error from me but mostly it is me that don't know how to work with python on linux.
> I would like to know how do I test(run) the programs I write under fedoracore?
> Simple yet challanging for me,
> Your patience and wisdom on this subject will be greatly appreciated.
> Tutor maillist - Tutor at python.org
More information about the Tutor