How can I start a launcher from python?
if I do: os.system("~/localhost") it just returns a number (probably a process id or something)

if this is not possible, how can I start from python a terminal window
and execute a code in that terminal?
(without closing the python script)

Thanks in advance =)

Recommended Answers

All 3 Replies

I found out the launcher is actually called: localhost.desktop
but if I do: os.system("~/localhost.desktop") it just starts my standard editor and shows the script...

I found out the launcher is actually called: localhost.desktop
but if I do: os.system("~/localhost.desktop") it just starts my standard editor and shows the script...

I don't know ubuntu very well, but if your launcher is related to a bash script, the script must be somewhere in the filesystem, so locate the script and call os.system(path_to_script) or subprocess.Popen(["bash", path_to_script]) .

well I found out,
it had to be: os.system("xterm ~/localhost.desktop")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.