View Full Version : New To Python.. Would Like A Little Help Please
noob_Lance
December 5th, 2005, 09:17 AM
Hey, Im new to programming in python and have done some work in the terminal.. but would like to make an actual program that i can run thru the terminal. How can i do this.. Thanks For the help..
Regards
~Lance
redactech
December 5th, 2005, 10:24 AM
type your program in an editor name it *.py than execute it through the console...
knipknap
December 5th, 2005, 10:44 AM
Try this (http://www.google.com/search?q=python%20tutorial%20simple), the first link looks very promising.
greenway
December 5th, 2005, 11:18 AM
If you just mean running your Python script through the compiler on the command line just type "python whatever.py".
mostwanted
December 5th, 2005, 12:23 PM
Make a text-file, throw in your code, on the first line you write
#!/usr/bin/python
Or whatever the path is.
Then you do, from the terminal
chmod 755 myPythonScript.py
and
./myPythonScript.py
will run it.
Copy it into /usr/bin/ to run it like a normal command (you might want to remove the py extension as well for aesthetics).
gord
December 5th, 2005, 06:50 PM
you also might want to check out dive into python (http://diveintopython.org/toc/index.html), its very good and covers everything from setting up your first .py to web services and then some more.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.