Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

access cmd with python

>>> import subprocess
>>> proc = subprocess.Popen('cmd.exe', stdin = subprocess.PIPE, stdout = subprocess.PIPE)
>>> stdout, stderr = proc.communicate('dir c:')
>>> stdout
'Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporatio
n.  All rights reserved.

C:Python25>More? '
Comment

how to get the access of python on cmd

#open you cmd and there type py
C:Usersacer>py
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>># Now start coding on cmd
>>>print("Python is easy")
>>>#type exit when you are done coding on cmd
>>> exit()

C:Usersacer>
Comment

PREVIOUS NEXT
Code Example
Python :: python diferente de 
Python :: python get output 
Python :: set pop in python 
Python :: dataFrame changed by function 
Python :: how to get the top 100 frequent words on a python dataframe colummn 
Python :: python string assignment by index 
Python :: fill_between matplotlib 
Python :: relu python 
Python :: flask arguments in url 
Python :: python get dpi of image 
Python :: model.predict knn 
Python :: dict python 
Python :: PySimpleGUI all elements 
Python :: is plaindrome python 
Python :: arma-garch model python 
Python :: 4D Array To DF 
Python :: python projects 
Python :: python add hyphen to string 
Python :: select column in pandas dataframe 
Python :: to get the number of unique values for each column 
Python :: .unique() python 
Python :: controlling the mouse with pynput 
Python :: Maximize Difference codechef solution 
Python :: clipboard python 
Python :: extract images from pdf 
Python :: save set of numpy arrays to file py 
Python :: NumPy bitwise_and Syntax 
Python :: Proj 4.9.0 must be installed. 
Python :: python write column csv 
Python :: sorted string 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =