So i have been trying to make a program to open a ready made program from one central program which i could do except i want to open it in idle so i can edit and add.
Ps. I just recently started to program in python and i only know the basics
5 Replies - 816 Views - Last Post: 25 November 2012 - 01:15 AM
#1
how to open a program in idle from another program?
Posted 21 November 2012 - 06:43 PM
Replies To: how to open a program in idle from another program?
#2
Re: how to open a program in idle from another program?
Posted 22 November 2012 - 01:07 PM
I can't find any documentation that suggests IDLE can have an editor window with a file loaded into it programatically.
#3
Re: how to open a program in idle from another program?
Posted 24 November 2012 - 11:42 AM
Idle editor can be started from a shell
(idle-python2.6 is the name for idle on my machine, it might be different on yours)
So it can be opened from a python program.
There are some subtle problems though(that I don't really understand) when there is already an Idle shell open.
idle-python2.6 -e someprogram.py
(idle-python2.6 is the name for idle on my machine, it might be different on yours)
So it can be opened from a python program.
import os
to_open = "someprogram.py"
os.system("idle-python2.6 -e %s" %to_open)
There are some subtle problems though(that I don't really understand) when there is already an Idle shell open.
#4
Re: how to open a program in idle from another program?
Posted 24 November 2012 - 05:08 PM
thank you it worked perfectly
#5
Re: how to open a program in idle from another program?
Posted 24 November 2012 - 11:48 PM
ahh I couldn't find the -e flag, good find.
#6
Re: how to open a program in idle from another program?
Posted 25 November 2012 - 01:15 AM
atraub, on 25 November 2012 - 06:48 AM, said:
ahh I couldn't find the -e flag, good find.
That is actually in the online documentation at http://docs.python.o...brary/idle.html at the very bottom
Though I was helped by the fact that Ubuntu created their own man page for Idle (capital I) that probably doesn't exist on other *nix. Otherwise I might not have found it or not bothered to look it up.
This post has been edited by Nallo: 25 November 2012 - 01:18 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|