[Tutor] Spawning terminals from Python - A failed question

Luke Paireepinart rabidpoobear at gmail.com
Sat Aug 25 09:20:03 CEST 2007


wormwood_3 wrote:
>>> Umm, so just put the ampersand at the end of the command string and
>>> call os.system()
>>>       
>
> Not sure what the point of this variation would be if os is being deprecated along with commands...
>   
He was pointing out that you already had a workable solution with 
os.system but you didn't take the time to think if your current tool set 
could be used to perform the task, and instead invested the time in 
searching for the commands module.
-Luke
>   
>>> However both os.system and the commands module are deprecated in 
>>> favour
>>> of the new(ish) subprocess module where the equivalent incantation 
>>> would be:
>>> p = subprocess.Popen("gnome-terminal", shell=True)HTH,-- Alan 
>>>       
>
> Good to know! I will start using this instead.
>
> -Sam
>
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>   



More information about the Tutor mailing list