malwaredllc / byob

An open-source post-exploitation framework for students, researchers and developers.
https://byob.dev
GNU General Public License v3.0
8.85k stars 2.1k forks source link

How to run python script? #671

Closed Shi57 closed 6 months ago

AhmadVakil commented 11 months ago

This is a fundamental question, however a good question for beginners.

To run a Python script you can use python command followed by a space and the path to your Python file. That's it!

Just open a command line and type in the word python or python3 in case you have both versions installed.

Example:

The following script is the content of the file hello.py:

#!/usr/bin/env python3

print('Hello World!')

Now we assume our terminal is open in the same directory as the hello.py, then type this in the terminal to run hello.py:

$ python3 hello.py
Hello World!

Happy learning!

4c3x commented 10 months ago

Simply run Python3 *.py For version 3 of python

Python *.py For version 2 of python

(Note '*' should be replaced with the name you used to save the python script)

github-actions[bot] commented 8 months ago

Stale issue message

zaylusz commented 8 months ago

Make sure your cd(ed) into web-app or whatever its called and do ' sudo python3 run.py ' if your on Kali linux and i think for windows its ' python run.py '

github-actions[bot] commented 6 months ago

Stale issue message