Celebrazio Net



Contact Us

Python One-Liners

Jun, 2021

Who said you couldn't do it in python?


#python quick alias for url escaping, including the slash characters 
alias urlenc='python3 -c "import sys, urllib.parse ; 
         print(urllib.parse.quote(sys.argv[1],safe=\"\")) "' 


# python one-liner test http server: 
python -m http.server 8080


"With a PC, I always felt limited by the software available. On Unix, I am limited only by my knowledge."
-- Peter J. Schoenster





1998-2021 Celebrazio.net