subprocess.call
will avoid problems with having to deal with quoting conventions of various shells. It accepts a list, rather than a string, so arguments are more easily delimited. i.e.
import subprocess
subprocess.call(['C:\\Temp\\a b c\\Notepad.exe', 'C:\\test.txt'])
More Related Contents:
- how to calculation cost time [closed]
- selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH error with Headless Chrome
- How to use a decimal range() step value?
- How to search for a string in text files?
- Why is my pygame application loop not working properly? [duplicate]
- Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
- Post values from an HTML form and access them in a Flask view
- pip uses incorrect cached package version, instead of the user-specified version
- How to start and stop thread?
- Executing multiple statements with Postgresql via SQLAlchemy does not persist changes
- How does __contains__ work for ndarrays?
- Python datetime to string without microsecond component
- Reading dynamically generated web pages using python
- AttributeError: ‘datetime’ module has no attribute ‘strptime’
- How to use a Keras RNN model to forecast for future dates or events?
- django installation: cannot use pip to install django on linux(ubuntu)
- SciPy Create 2D Polygon Mask
- How can I share Jupyter notebooks with non-programmers? [closed]
- “public” or “private” attribute in Python ? What is the best way?
- How to install SIP & PyQT on windows 7
- Can’t open Unicode URL with Python
- How to drop into REPL (Read, Eval, Print, Loop) from Python code
- Check presence of vowels in a string
- How to Print “Pretty” String Output in Python
- How do I package a python application to make it pip-installable?
- Python – time difference in milliseconds not working for me
- How to join two string with a new line between them?
- Get the indices of N highest values in an ndarray
- How slicing in Python works
- ‘sys.excepthook’ and threading