You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
358 B

7 years ago
  1. import subprocess
  2. from Npp import notepad
  3. si = subprocess.STARTUPINFO()
  4. si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
  5. python_path = subprocess.check_output('where pythonw.exe',startupinfo = si).rstrip()
  6. script_path = 'query.py'
  7. result = subprocess.check_output([python_path,script_path]).rstrip()
  8. # print(result)
  9. if result != 'None':
  10. notepad.open(result)