Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gzip -9 calling_stuff.py
- ipython
- import subprocess
- In [9]: subprocess.call('zcat calling_stuff.py.gz > foo.py', shell=True)
- Out[9]: 0
- In [10]: ls -l foo.py
- -rw-r--r-- 1 schwehr staff 143 Apr 19 21:16 foo.py
- In [11]: cat foo.py
- #!/usr/bin/env python
- def say_hi():
- print 'hi'
- def my_function():
- say_hi()
- say_hi()
- if __name__=='__main__':
- my_function()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement