Skip to main content

Thread: Python help


[code/]from sys import platform
os import system ,listdir
import subprocess
def platform():
if platform == "win32":
system("notepad")
elif platform == "linux2" or "linux":
subprocess.popen("gnome-terminal -e nano", shell=true)

def main():
platform()
a=listdir()
length=len(a)
print(length,a)
if __name__ == "__main__":main()][/code] ; in code how can capture when text editor closed ? there way capture editor close signal ? want run listdir() after editor close

subprocess.call() (check http://docs.python.org/library/subprocess.html) waits process finish.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Python help


Ubuntu

Comments

Popular posts from this blog

Could not place because the source rectangle is empty

Thread: Using smartcard reader with vpnc

Adobe Font Folio 7.0 or just 7?