Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
How do I open an app like Minecraft using os or subprocess? I went through a few videos and none of them worked. Do I just use the name of the app or its location?
For this example, you could use:
subprocess.run(r'"C:\path_to_minecraft\minecraft"',shell=True)
Or if you have Windows shortcuts you add the .lnk extension in the call:
subprocess.run(r'"C:\path_to_minecraft\minecraft.lnk"',shell=True)
this works.
import os
os.system("your app.exe")
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Hi I'm trying to catch the change in the paperclip of my computer with the library pyperclip something same as
url=pyperclip.paste()
I want to create a thread which can append all the urls into a list my script, but I don't know how to could I do it
Thanks for your time and help c:
Did you check the documentation or the source code at all? That's all I did. pyperclip supports waitForPaste and waitForNewPaste methods that can do this.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to generate some shortcuts to specific websites using Python. Is it possible for me to do so under Ubuntu? Say If I'd like to create a shortcut to Stack Overflow in Home folder. How can I achieve that using Python?
You could do this :
with open('StackOverflow.desktop', 'w+') as f:
f.write("""[Desktop Entry]
Encoding=UTF-8
Name=Link to Stack Overflow
Type=Link
URL=http://stackoverflow.com/
Icon=text-html
Name[en_US]=StackOverflow
""")
It will create a shortcut on Ubuntu to StackOverflow
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I was curious if you could use python to load a quick ruby script? then continue with python.
The simplest way is to use call from subprocess module:
from subprocess import call
call(['ruby', 'quick_script.rb', 'some_parameter'])
Ruby should be available from the path variable.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to create a hyperlink in my wx widget which opens linked folder on clicking. Please help me how to build that.
Thanks.
os.system("start C:")
will launch a file window (on windows at least) ... it has nothing to do with wx
unless you are talking about opening a FilePickerDialog?
I have also been informed that
os.system("explorer C:")
would also work
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
What is the python command to run a py-file.?
For example, in my index.py file how would i launch start.py.
In index.py, simply use subprocess:
import subprocess
subprocess.check_output(["python", "start.py"])