Copy and paste python script?
-
im trying to copy a python script that someone has on a web page, its not in a file they just typed the script out to be copied, now, when i attempt to copy the script and paste it to gedit or any text editor for that matter, it does not execute, am i supposed to be doing something else before i paste the script content and make it a py file ?
-
Answer:
How are you running the python file. If you're using gedit, I assume your on linux, thus did you make it executable or are you calling if from a python interpreter. Make sure you have the shabang in there to be certain (#!/usr/bin/env python). If you want to make it executable, go into a terminal, navigate to the file and do: chmod +x myFile.py where you replace myFile.py with your file.
Lex at Yahoo! Answers Visit the source
Other answers
How are you running the python file. If you're using gedit, I assume your on linux, thus did you make it executable or are you calling if from a python interpreter. Make sure you have the shabang in there to be certain (#!/usr/bin/env python). If you want to make it executable, go into a terminal, navigate to the file and do: chmod +x myFile.py where you replace myFile.py with your file.
Jared
Related Q & A:
- How To Copy And Paste Article For Free?Best solution by Yahoo! Answers
- Where can I host my Python script?Best solution by Quora
- Can you help me learn how to copy and paste an html link to my website?Best solution by Yahoo! Answers
- How do I copy and paste a link?Best solution by Yahoo! Answers
- How can I copy and paste a prestige-portrait photo from the internet??Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.