Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-09-2002, 05:08 PM
|
#1
|
Member
Registered: Feb 2002
Location: Denver, CO US
Distribution: Arch
Posts: 453
Rep:
|
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.
|
|
|
08-09-2002, 06:56 PM
|
#2
|
Member
Registered: Jun 2002
Location: Lousiville,KY
Distribution: Gentoo
Posts: 89
Rep:
|
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)
|
|
|
08-09-2002, 06:57 PM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
08-09-2002, 11:50 PM
|
#4
|
Member
Registered: Feb 2002
Location: Denver, CO US
Distribution: Arch
Posts: 453
Original Poster
Rep:
|
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 05:01 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|