daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Jul 17th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top