equal
deleted
inserted
replaced
13 import getopt |
13 import getopt |
14 import inspect |
14 import inspect |
15 import os |
15 import os |
16 import shlex |
16 import shlex |
17 import sys |
17 import sys |
|
18 import tempfile |
18 |
19 |
19 ispy3 = (sys.version_info[0] >= 3) |
20 ispy3 = (sys.version_info[0] >= 3) |
20 ispypy = (r'__pypy__' in sys.builtin_module_names) |
21 ispypy = (r'__pypy__' in sys.builtin_module_names) |
21 |
22 |
22 if not ispy3: |
23 if not ispy3: |
382 def getoptb(args, shortlist, namelist): |
383 def getoptb(args, shortlist, namelist): |
383 return _getoptbwrapper(getopt.getopt, args, shortlist, namelist) |
384 return _getoptbwrapper(getopt.getopt, args, shortlist, namelist) |
384 |
385 |
385 def gnugetoptb(args, shortlist, namelist): |
386 def gnugetoptb(args, shortlist, namelist): |
386 return _getoptbwrapper(getopt.gnu_getopt, args, shortlist, namelist) |
387 return _getoptbwrapper(getopt.gnu_getopt, args, shortlist, namelist) |
|
388 |
|
389 # text=True is not supported; use util.from/tonativeeol() instead |
|
390 def mkstemp(suffix=b'', prefix=b'tmp', dir=None): |
|
391 return tempfile.mkstemp(suffix, prefix, dir) |