If you want to use a python script , you can follow the answer of @furas at comments.
But you can do it even in pure command line / bash script like this:
#!/bin/bash
xdg-open "https://docs.python.org/2.7/py-modindex.html" &
xdg-open calls the default web browser in your system.
Save the file (i.e charmhelp) under /usr/bin/ directory to be accesible from everywhere, then make it executable using chmod +x /usr/bin/charmhelp
and you can run it when you need it as charmhelp
PS: If you save the file in other directory and you want to run it (i.e /name/home) you need to call it either by full path like /name/home/charmhelp
or if you are already in name/home you have to run it as ./charmhelp
(mind the dot in the beginning).
You could also use links (terminal web browser) directly from terminal like
links -dump "https://docs.python.org/2.7/py-modindex.html" |less
With links the web page will be displayed in terminal.
Much more simpler make an alias:
alias charmhelp='xdg-open https://docs.python.org/2.7/py-modindex.html &'
runit by charmhelp
. To make the alias permanent you have to put it in name/home/.bashrc
file .