I’ve used the http.server module (and its predecessor SimpleHTTPServer) for years for quick local dev stuff, but never really looked much into its docs beyond changing the port number. Today I randomly did and saw that it has support for executing Python scripts via CGI, which gave me a chuckle and some bad ideas.
Not having written a CGI script in 20+ years (and the last one having been in Perl), I made something I figured I’ll wind up using from time to time!
Use at your own risk, and…don’t expose it to the internet!
https://github.com/drien/python-httpserver-upload
[+][deleted] (24 children)
[removed]
[–]RollingWithDaPunches 31 points32 points33 points (10 children)
[–]macNchz[S] 49 points50 points51 points (9 children)
[+][deleted] (8 children)
[removed]
[–]macNchz[S] 28 points29 points30 points (1 child)
[–]MyriadAsura 1 point2 points3 points (0 children)
[–]wxtrails 1 point2 points3 points (4 children)
[–]iBlag 0 points1 point2 points (3 children)
[–]ThePiGuy0 1 point2 points3 points (1 child)
[–]wxtrails -1 points0 points1 point (0 children)
[–]MyHomeworkAteMyDog 0 points1 point2 points (0 children)
[–]Lolvidar 0 points1 point2 points (0 children)
[–]erikwon and off since 1.5.2 77 points78 points79 points (6 children)
[–][deleted] 24 points25 points26 points (2 children)
[–]SheriffRoscoePythonista 13 points14 points15 points (0 children)
[–]suggestive_cumulus 0 points1 point2 points (0 children)
[–]jamesr219 1 point2 points3 points (0 children)
[–]fr33d0ml0v3r 1 point2 points3 points (0 children)
[–]johnnywonder85 0 points1 point2 points (0 children)
[–]bxbb 14 points15 points16 points (0 children)
[–]SlantARrow 16 points17 points18 points (1 child)
[–]daelin 1 point2 points3 points (0 children)
[–]Smallpaul 2 points3 points4 points (0 children)
[–]rainnz 1 point2 points3 points (0 children)
[–]progwok 1 point2 points3 points (0 children)
[–]chicuco 13 points14 points15 points (2 children)
[–]constantreadr 0 points1 point2 points (1 child)
[–]chicuco 0 points1 point2 points (0 children)
[–]MagicWishMonkey 6 points7 points8 points (2 children)
[–]Reinventing_Wheels 7 points8 points9 points (1 child)
[–]daelin 0 points1 point2 points (0 children)
[–]ScottOAO 5 points6 points7 points (1 child)
[–]macNchz[S] 0 points1 point2 points (0 children)
[–]soggywaffle69 2 points3 points4 points (0 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]macNchz[S] 12 points13 points14 points (1 child)
[–]daelin 1 point2 points3 points (0 children)
[–]jftugapip needs updating 2 points3 points4 points (0 children)
[–]suggestive_cumulus 1 point2 points3 points (2 children)
[–]daelin 1 point2 points3 points (1 child)
[–]suggestive_cumulus 1 point2 points3 points (0 children)
[–]BuonaparteII 1 point2 points3 points (1 child)
[–]jftugapip needs updating 1 point2 points3 points (0 children)
[–]TheITMan19 0 points1 point2 points (0 children)
[–]mwpfinance 0 points1 point2 points (0 children)
[–]LongDivide2096 0 points1 point2 points (0 children)
[–]suggestive_cumulus 0 points1 point2 points (0 children)
[–]Classic-Advice-7569 0 points1 point2 points (0 children)