File: python2.py

package info (click to toggle)
black 18.9b0-1-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,160 kB
  • sloc: python: 91,870; makefile: 32; sh: 2
file content (33 lines) | stat: -rw-r--r-- 604 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python2

import sys

print >> sys.stderr , "Warning:" ,
print >> sys.stderr , "this is a blast from the past."
print >> sys.stderr , "Look, a repr:", `sys`


def function((_globals, _locals)):
    exec ur"print 'hi from exec!'" in _globals, _locals


function((globals(), locals()))


# output


#!/usr/bin/env python2

import sys

print >>sys.stderr, "Warning:",
print >>sys.stderr, "this is a blast from the past."
print >>sys.stderr, "Look, a repr:", ` sys `


def function((_globals, _locals)):
    exec ur"print 'hi from exec!'" in _globals, _locals


function((globals(), locals()))