Home > python > Standard modules as standalone programs

Standard modules as standalone programs

The following tips are from this presentation.

Encode a file in base64:

python -m base64 some_file

Open a URL in the browser:

python -m webbrowser http://google.com

List of functions in a file:

python -m pyclbr some_file.py
python -m pyclbr module_name

See the rest of the stdlib modules in /usr/lib/python/.

Categories: python Tags: ,
  1. September 5, 2013 at 12:20
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: