![Forrest logo](/images/logo.png)
python
Python is a powerful and popular programming language that is widely used for various applications. It comes with a command line tool that allows users to execute Python code and perform various tasks directly from the command line interface.
The Python command line tool, also known as the Python interpreter, provides an interactive environment where users can enter and execute Python code line by line.
The tool supports both Python 2.x and Python 3.x versions, allowing users to choose the version they want to work with.
Users can use the command line tool to run Python scripts stored in files by specifying the file name as an argument. This makes it easy to execute and test Python scripts without the need for a separate IDE or text editor.
The command line tool allows users to access various Python modules and libraries, making it easier to utilize the extensive functionality provided by the Python ecosystem.
Users can also use the command line tool to install and manage additional Python packages using package management tools such as pip. This helps in managing project dependencies and installing third-party packages needed for their programs.
Furthermore, the command line tool provides options to enable debugging, optimize the execution of Python code, and control the runtime environment.
The Python command line tool is highly versatile, allowing users to work with Python interactively, test code snippets, and automate tasks through shell scripts.
The tool provides rich features such as syntax highlighting, tab completion, and history navigation, making it easier for users to write and edit Python code directly from the command line.
Overall, the Python command line tool is a valuable asset for Python developers, providing a flexible and efficient way to work with Python code and perform a wide range of tasks from the command line interface.
List of commands for python:
-
python:tldr:23eee python: Start a REPL (interactive shell).$ pythontry on your machineexplain this command
-
python:tldr:2ae56 python: Execute a specific Python file.$ python ${filename-py}try on your machineexplain this command
-
python:tldr:3eada python: Run the script of the specified library module.$ python -m ${module} ${arguments}try on your machineexplain this command
-
python:tldr:652a0 python: Start the built-in HTTP server on port 8000 in the current directory.$ python -m ${http-server}try on your machineexplain this command
-
python:tldr:9d4b0 python: Execute a Python expression.$ python -c "${expression}"try on your machineexplain this command
-
python:tldr:bea56 python: Install a package using `pip`.$ python -m ${pip} install ${package_name}try on your machineexplain this command
-
python:tldr:f3731 python: Execute a specific Python file and start a REPL.$ python -i ${filename-py}try on your machineexplain this command
-
sqlmap:tldr:1f0d4 sqlmap: Change the parameter delimiter (& is the default).$ python sqlmap.py -u "${http:--www-target-com-vuln-php}" --data="${query=foobar;id=1}" --param-del="${;}"try on your machineexplain this command
-
sqlmap:tldr:7d4a9 sqlmap: Send data in a POST request (`--data` implies POST request).$ python sqlmap.py -u "${http:--www-target-com-vuln-php}" --data="${id=1}"try on your machineexplain this command
-
sqlmap:tldr:812b4 sqlmap: Select a random `User-Agent` from `./txt/user-agents.txt` and use it.$ python sqlmap.py -u "${http:--www-target-com-vuln-php}" --random-agenttry on your machineexplain this command
-
sqlmap:tldr:a2642 sqlmap: Run sqlmap against a single target URL.$ python sqlmap.py -u "${http:--www-target-com-vuln-php?id=1}"try on your machineexplain this command
-
sqlmap:tldr:a6f20 sqlmap: Provide user credentials for HTTP protocol authentication.$ python sqlmap.py -u "${http:--www-target-com-vuln-php}" --auth-type ${Basic} --auth-cred "${testuser:testpass}"try on your machineexplain this command