Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I open python file (from desktop) with IDLE, using Terminal on Ubuntu 12.04?

I have tried to do this way:

$ idle open python_file.py

Instead of open my file it's create two more files: open and python_file.py.

share|improve this question
add comment

5 Answers 5

up vote 2 down vote accepted

It's just

idle python_file.py

If you want it to run in the background (returning control to the terminal so you can type other commands), add '&'

idle python_file.py &

If you want it to continue running even if you close the terminal you can 'disown' it

idle python_file.py & disown
share|improve this answer
add comment

You do not need to use the 'open' term. The help says:

idle.py [-c command] [-d] [-e] [-s] [-t title] [arg] ...

-c command  run this command
-d          enable debugger
-e          edit mode; arguments are files to be edited
-s          run $IDLESTARTUP or $PYTHONSTARTUP first
-t title    set title of shell window

You can just do this:

idle file_you_want_to_open.py 
or 
idle.py file_you_want_to_open.py

If the file doesn't exist then it will be created.

share|improve this answer
add comment

Do this:

$ cd ~/Desktop
$ idle your_file.py
share|improve this answer
3  
This does not include the steps on how to open a specific file. I guess some step is missing here? –  gertvdijk Aug 26 '13 at 12:18
add comment

If you want to get your command prompt back after executing idle you could use:

nohup idle /some/path/to/file.py &

or if the file is in your current directory:

$ ls
file.py
$ nohup idle file.py &

Of course the last one will work if you are in the current directory, if the file do not exist IDLE will create one.

share|improve this answer
add comment

To install and use latest idle,

Go to synaptic package manager and install idle-python3.2

Then go to terminal and just type

idle-python3.2

This will open idle-python3.2.

Installation location => idle-python3.2 in SPM->(select)->idle-python3.2->(right-click)->properties->Installed Files.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.