https://stackoverflow.com/questions/5105482/compile-main-python-program-using-cython seems to indicate that (just like a C-program) you need to jump through hoops to get things running.

Being used to simply prepending "#!/usr/bin/python" I am wondering if there is a shebang wrapper that does The Right Thing. I am thinking something like:


print "Hello world"

where cythonwrapper checks if the cached file is newer and if not converts the script into C, compiles it, put the compiled file into a cache and runs it.

  • I've never use Cython, but from what I know, it can be used to compile to an executable. It doesn't look like what you are trying will work. And does /usr/bin/cythonwrapper even exist? Jun 28, 2017 at 6:51

1 Answer 1


There is one now. It is called shython: https://gitlab.com/ole.tange/tangetools/tree/master/shython

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .