File: imports-function.py

package info (click to toggle)
bandit 1.7.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,864 kB
  • sloc: python: 19,727; makefile: 23; sh: 14
file content (12 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
os = __import__("os")
pickle = __import__("pickle")
sys = __import__("sys")
subprocess = __import__("subprocess")

# this has been reported in the wild, though it's invalid python
# see bug https://bugs.launchpad.net/bandit/+bug/1396333
__import__()

# TODO(??): bandit can not find this one unfortunately (no symbol tab)
a = 'subprocess'
__import__(a)