1253
Comment:
|
1574
Add link to an example Python shell script
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
''''PyCon2008 Presentation on Command Line Tools:'''' Intermediate Level | '''PyCon2008 Presentation on Command Line Tools:''' Intermediate Level |
Line 12: | Line 12: |
* [http://code.noahgift.com/pycon2008/pycon2008_cli_noahgift.pdf Slides: Creating Command Line Tools with Python] | * [[http://code.noahgift.com/pycon2008/pycon2008_cli_noahgift.pdf|Slides: Creating Command Line Tools with Python]] |
Line 14: | Line 14: |
* [http://code.noahgift.com/pycon2008/pycon2008_cli_noahgift.zip Source: Code] | * [[http://code.noahgift.com/pycon2008/pycon2008_cli_noahgift.zip|Source: Code]] |
Line 16: | Line 16: |
''''Using Python To Create Unix Commandline Tools:'''' Beginning/Intermediate Level | '''Using Python To Create Unix Commandline Tools:''' Beginning/Intermediate Level |
Line 20: | Line 20: |
* [http://www.ibm.com/developerworks/aix/library/au-pythocli/?ca=dgr-lnxw82pythonunixtool&S_TACT=105AGX59&S_CMP=GR Introduction To Creating CLI Tools with Python] | * [[http://www.ibm.com/developerworks/aix/library/au-pythocli/?ca=dgr-lnxw82pythonunixtool&S_TACT=105AGX59&S_CMP=GR|Introduction To Creating CLI Tools with Python]] '''Command line tool with optparse, subprocess, and logging''': Intermediate level * This script provides shortcuts for using a Git repository but the script could be used as a template for other shell tools: [[http://www.jperla.com/blog/2008/11/17/a-clean-python-shell-script/ | A Clean Python Shell Script ]]. |
Creating Command Line Tools With Python
The Python standard library has many modules that make creating commandline tools quite simple. Often command line tools are made with pure Python modules, or are a mixture of calls to an operating system and Python, through the subprocess module. Some of the commonly used modules to create commandline tools are: optparse, configparser, and subprocess.
PyCon2008 Presentation on Command Line Tools: Intermediate Level
- Summary: Presentation goes into detail on using threads, subprocess, optparse, configparser, and ORM's to create sophisticated tools.
Using Python To Create Unix Commandline Tools: Beginning/Intermediate Level
- Summary: An introductory article on how to create command line tools with Python. A beginner should learn how to create command line tool after finishing.
Command line tool with optparse, subprocess, and logging: Intermediate level
This script provides shortcuts for using a Git repository but the script could be used as a template for other shell tools: A Clean Python Shell Script.