[Tutor] Re: Python on Red Hat

Bob Heasman bobhe at telkomsa.net
Tue Jun 8 13:59:26 EDT 2004


Hi Ivan,

I think you may need a little more than you have been given. I don't 
have KDE installed, I have Gnome, so I don't know Kedit. I suggest you 
try "joe". It is a very simple editor to use and with Python it is a 
breeze. So you know how to bring up the interactive window, that is 
fine. This is how I have brought up a window in which to write your program.

In an xterm, type in "joe (filename).py". You can use any name as filename.

Next, in the top left hand corner type in "#!/usr/bin/python" if that is 
the directory you loaded Python into. Python should be in the path.

Now you can start entering your code. To save it type "ctrl K and X". If 
you need help with joe type in "ctrl K and H" while in the joe window.
When you have saved it you will need to get permission to execute it. 
Make yourself Super User (su and password) then type "chmod +x 
(filename)". Now to recall that file use "joe filename.py" <enter>. To 
run the file type in "./(filename.py)" <enter>, as Ivan, not root. You 
can use root, but it is safer not to. Root is too damned powerful. Now 
remember, you can use the up arrow to recall your previous commands, so 
it is a couple of key taps and <enter> to bring up your script.

When you have written a script and run it, and it has an error, Linux 
will show you the error, but it can sometimes lead you astray. You have 
been warned :-)

Ok, this part I have sorted out, but how to write a Python script is 
another story as far as I am concerned. I am battling like h*ll. GOOD 
LUCK :-)

Regards....Bob

                      ********************************************
Ivans message:-

Message: 5
Date: Tue, 08 Jun 2004 17:17:28 +0800
From: "Ivan Low" <visional_freeman at hotmail.com>
Subject: [Tutor] Python On RedHat?
To: tutor at python.org
Message-ID: <BAY7-F33KNuj8Nmnf90000045ad at hotmail.com>
Content-Type: text/plain; format=flowed

Hi, I had recently install linux and had been trying if make it work for me
and the first problem I encounter was using the python program in linux. I
can access the program using the comman window but that was like a
interactive window for me to test some programming code.
Here's my question, are there python software preinstall in Redhat that 
work
like those I use in Mac OS? Since I had chose the full installation.
I had access some of those programming tool that had very nice word editing
function that can import or export or create a new project.
Are there such thing for python since I had found out that those are more
for C++?

Ivan

                    ************************************************




More information about the Tutor mailing list