Skip to content

r-sajal/PythonRunner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

PythonRunner

Star if you find it interesting

Run Bat File using Python
Important things to take note of -->

If You want to pause for result just type some extra inputs as this code wont wait for you to see output in cmd
You can also use some keys to exit the command prompt
If you are showing some output on cmd just put an input at last line of code.

For those who want to get deeper insights of Code -->

echo --> print stuff on command prompt.
on --> to show what are we outputting
& --> first performs the task on left and then the task on right
python3 --> global variable for python
-x --> version
"%~f0" --> % - Specifier
    f0 - to get the complete path of the file (python in our case)
     ~ - to remove double quotes if any
goto - to go to the defined label
:eof - end of file (predefined label)

what we are doing is

first printing python3 on cmd to run then getting the complete path for the file.
if the file is not found terminate the program (eof)
else run the script under Python

About

Run Bat File using Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published