~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to file-tools/cat-from.py

  • Committer: mattgiuca
  • Date: 2008-03-15 02:36:21 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:691
python-console: Removed "locls" dictionary when calling exec.
    This was causing variables to be written to locals instead of globals,
    and thus they would not be available to other functions.
    (So as a result of this, functions can see globals and call each other,
    including recursion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
import sys
 
4
 
 
5
if __name__ == "__main__":
 
6
    inf = open(sys.argv[1], "rb")
 
7
    sys.stdout.write(inf.read())
 
8
    inf.close()