A Python Script to Replace a DOS Batch File Adventure
summary
Converts a brittle MS‑DOS batch that uninstalls, runs wget, and calls setup.exe into a Python tool that measures elapsed install/download time with datetime, checks install error files via os.path.getmtime, and copies/removes builds with shutil; uses subprocess only when calling external executables, offers argparse (optparse/click) for AM/PM build and backup flags, can use urllib/urllib2 for downloads and pysvn for repo updates, sends notifications via email, and replaces daily manual steps successfully in the presenter’s workflow.
AI-written summary · about
chapters (23)
- 0:00Intro
- 1:33My Typical Development Day
- 3:50DOS Batch Script (part 1)
- 5:33DOS Batch Script (part 3)
- 7:21Adding more functionality?
- 9:48What is a module?
- 12:02Using a module
- 13:38Python Modules to Resolve My Issues
- 14:32Determine Elapsed Time
- 15:32Determine Install Errors
- 16:38Call other programs
- 17:25Full Python Listing
- 22:22Command Line Arguments?
- 23:42Sample argparse use
- 27:12Alternatives to argparse?
- 28:51How about wget?
- 29:36Notifications?
- 30:37How about my source control scripts? • Checkout/update sandbox in an automated way
- 33:17Can I learn more about the standard library modules?
- 34:11Search the Package Index
- 34:58Your favorite module?
- 35:55Would I do this again?
- 37:05Questions / Feedback?
related talks
51mBuilding useful project utils in Python
30m"The perfect setup? Not setup.py! Building packages the right way"
31mPython on Windows
31mPython for IT specialists' tasks automation
58m Python on Windows, the State of the Art
27muv: Ultimate Victory over Installation and Dependency Chaos
01h 14mYour trusty Python package: TTPs of attacks on OSS in Python
26mDependency Management in Python
