Guest User

Untitled

a guest
Jul 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. def OnAbout3(self, event):
  2. """
  3. Browse for file
  4. """
  5. wildcard = "Select File (*.pvt)|*.pvt"
  6. dialog = wx.FileDialog(None, "Choose a file",
  7. wildcard=wildcard,
  8. style=wx.OPEN)
  9. if dialog.ShowModal() == wx.ID_OK:
  10. path = dialog.GetPaths()
  11. #######this is where i wanted to do something like this:
  12. subprocess.Popen("cmd.exe")
  13. #I wished cmd could simply cd to the variable, path
  14. os.system('cd path')
  15. dialog.Destroy()
  16.  
  17. subprocess.Popen('cmd.exe', cwd=path)
  18.  
  19. path = 'C:\Program Files\Mozilla\'
  20. os.system('cd "%s"' %path)
Add Comment
Please, Sign In to add comment