how can I write this shell script in python?

How can a python script be run in python shell? What do you need to type in python 3.1.4?

  • In the python script...I click the run thing but it just flashes the python shell and I don't know what to type in the shell so that the script would run in python 3.1.4...pls. help...

  • Answer:

    open the python shell (for me it is called python.exe, you can search for it with the start menu on Windows or just type python into the terminal on any OS). from the python shell, type: execfile("C:\python\filename.py") with C:\python\filename.py replaced by the path/filename of whatever you want to run alternatively you can open the terminal (cmd.exe on Windows) and then type: python "C:\python\filename.py" with C:\python\filename.py replaced by the path/filename of whatever you want to run hope that helps:)

Alyssa F at Yahoo! Answers Visit the source

Was this solution helpful to you?

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.