I am trying to rewrite a Perl script a coworker made that you lets you bookmark directories.

The way it works is you type `go add dir` while in a folder and from anywhere else in terminal you type `go dir` and you will go to the bookmarked directory.

From what I can tell go is a bash function that calls the perl script with the following code: `cd (godir)`. It seems that to print out anything other than a dir it prints STDERR. When I use sys.stderr.write() in python it prints out the text but it also prints out `cd: The directory 'None' does not exist`

This is an edit because my original question wasn't specific enough.
I actually found a solution:
My fish function will eval whatever the Python script returns

```
eval (python go.py $argv)

```