Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
you just write the code in any basic text editor. no need to load anything anywhere. some editors made specifically for python (pythonwin for ms I think it's called?) deal with the whitespace for you and let you know if you've coded incorrectly; basic text editors can be a lot trickier if you're not used to that style.
I'm fairly new to Linux and have never used Python outside of Windows but I would think you should just make the file executable with the command chmod. You may have to compile it first but that's not required in Windoz...
chmod u+x filename, or whatever permissions you prefer. I think that should make it execute for you.
don't do chmod in a python editor. do this in a terminal window and change the python file attributes. Just by the ">>>" I think that's where you were...
chmod 777 full/file/path/and/name/here, i.e., chmod 777 ~/python.files
that makes the file executable to everyone, not just you.
Other than that, you're python script is great!!
make sure the python program is in your PATH. At the prompt type "python filename" without the quotes. I'm not at a computer with Linux right now or I would just go figure it out for you. You might try commenting out/deleting that first line !#... since this is calling python to execute the script.