Re: How to execute "gksudo umount VirtualDVD"

2016-10-28 Thread Demosthenes Koptsis
The code is ok, i need to provide the absolute path to umount. def umount(self): '''unmounts VirtualDVD''' #get virtualdvd folder home = QtCore.QDir.homePath() vpath = home + "/VirtualDVD" cmd = 'gksudo umount ' + vpath

Re: How to execute "gksudo umount VirtualDVD"

2016-10-28 Thread Wildman via Python-list
On Fri, 28 Oct 2016 17:19:17 -0500, Wildman wrote: > On Fri, 28 Oct 2016 11:05:17 +0300, Demosthenes Koptsis wrote: > >> Yes it was pasted wrong... >> >> def umount(self): >> '''unmounts VirtualDVD''' >> cmd = 'gksudo umount VirtualDVD' >> proc =

Re: How to execute "gksudo umount VirtualDVD"

2016-10-28 Thread Wildman via Python-list
On Fri, 28 Oct 2016 11:05:17 +0300, Demosthenes Koptsis wrote: > Yes it was pasted wrong... > > def umount(self): > '''unmounts VirtualDVD''' > cmd = 'gksudo umount VirtualDVD' > proc = subprocess.Popen(str(cmd), shell=True, >

Re: How to execute "gksudo umount VirtualDVD"

2016-10-28 Thread Demosthenes Koptsis
I figure it out umount accepts full path of mounting point. i changed my function as following and now it works. def umount(self): '''unmounts VirtualDVD''' #get virtualdvd folder home = QtCore.QDir.homePath() vpath = home + "/VirtualDVD" cmd =

Re: How to execute "gksudo umount VirtualDVD"

2016-10-28 Thread Demosthenes Koptsis
Yes it was pasted wrong... def umount(self): '''unmounts VirtualDVD''' cmd = 'gksudo umount VirtualDVD' proc = subprocess.Popen(str(cmd), shell=True, stdout=subprocess.PIPE).stdout.read() print proc it fails silently the gksudo runs correctly. I can

Re: How to execute "gksudo umount VirtualDVD"

2016-10-27 Thread Ian Kelly
On Thu, Oct 27, 2016 at 3:30 PM, Demosthenes Koptsis wrote: > I want to execute the command "gksudo umount VirtualDVD" > > My code is this but it fails: > > def umount(self): > '''unmounts VirtualDVD''' cmd ='gksudo umount VirtualDVD' proc = >

How to execute "gksudo umount VirtualDVD"

2016-10-27 Thread Demosthenes Koptsis
I want to execute the command "gksudo umount VirtualDVD" My code is this but it fails: def umount(self): '''unmounts VirtualDVD''' cmd ='gksudo umount VirtualDVD' proc = subprocess.Popen(str(cmd),shell=True,stdout=subprocess.PIPE).stdout.read() print proc It pops up the gksudo dialog,