Login Register






CMD command using python? filter_list
Author
Message
CMD command using python? #1
If there is a way to run a CMD command using python, please tell me. I am working on a new code I MAY post on here. Thanks! :epic:

Reply

RE: CMD command using python? #2
Fixed the title.
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: CMD command using python? #3
Fixed the title.
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: CMD command using python? #4
example:

Code:
from subprocess import call call(["cowsay", "-f", random_cow, "Hello World"])
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: CMD command using python? #5
example:

Code:
from subprocess import call call(["cowsay", "-f", random_cow, "Hello World"])
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: CMD command using python? #6
Damn you @Deque I was just about to post something similar to that.

Reply

RE: CMD command using python? #7
Yes, on Windows you can;

Code:
import os os.system()

Google for arguments and other functions.
(This post was last modified: 11-30-2013, 02:49 AM by rektosaurus.)
[Image: siggy.php?uid=66857]

Reply

RE: CMD command using python? #8
Quote:import os

os.system("your command")

or

Quote:import os

var=os.poppen("your command").read()
var=var.replace('\n','') #delete the line jumping
print var

or

Quote:use subprocess

Reply