How can I copy text from Gedit?

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

Was this solution helpful to you?

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:

Just Added Q & A:

Find solution

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.