Is there any Python/setuptools approach I could take to write a tool to change directory? There's a somewhat complicated path behind the scenes computed from a single parameter.
e.g., here's the closest I could come (in bash, untested):
alias mycd='function _mycd() { cd `myscript $1` };_mycd'
where myscript is something I can make available using console_scripts in setuptools.
I'm wondering if there was any way I could accomplish this in a self-contained manner, where for example, I don't edit a user's .bash_profile or save something in their bin or whatever. e.g., can I define an alias using setuptools? 
