In Python you are not obliged to use a file, you can specify -c \"...\"
and gives the Python commands to the Python interpreter via a string on the command line.
There is one trick you can possibly use and that is mshta.exe. You can execute code like this:
mshta vbscript:Execute(":close")
This is of course a fantasticly insane hack and on a system where you are not even allowed to create a file I am not sure if mshta.exe would be allowed.
Maybe you can also find additional inspiration from this thread (the mshta solution is also posted there). Although mostly batch related it is imo a great compendium of several really crazy ways to fool windows into executing vbs code.