LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Newbie learning Python (https://www.linuxquestions.org/questions/programming-9/newbie-learning-python-27592/)

busbarn 08-09-2002 04:08 PM

Newbie learning Python
 
I'm new at programming and am working through some python tutorials. There's a couple of silly things that I just can't figure out. I'm working through
/www.hetland.org/python/instant-hacking.php and it says to write the excercises in emacs or a text editor and then run them in pyhton. I have python, but as silly as this sounds, how do you open a file to run it?

Next aparently stupid yet stumping quesiton...how do you write a new file in emacs? All I can get are import files and open files. ONce again, any help would be greatly appreciated. THanks.

darkmage 08-09-2002 05:56 PM

To open a file in Python, you save it with the type .py, for example helloworld.py. You can then run it from a command line cding to the directory and typing python and the name of the program (helloworld.py)

acid_kewpie 08-09-2002 05:57 PM

well that's really not to do with python as a language, just how to use an application. persoanlly i'd just say use idle, the python mini ide that you should already have with your system. and give diveintopython.org look, an entire open source python manual for non-newbies.

busbarn 08-09-2002 10:50 PM

Thank you very much--I'll look into it. I found out that I was entering the command wrong. I was trying #<file> python instead of #python <file>. Thanks for the help.


All times are GMT -5. The time now is 09:30 PM.