shethjenil commited on
Commit
6f2475f
1 Parent(s): d769c69

Update PYTOIMAGE.py

Browse files
Files changed (1) hide show
  1. PYTOIMAGE.py +2 -2
PYTOIMAGE.py CHANGED
@@ -45,14 +45,14 @@ args = parser.parse_args()
45
 
46
  def run_command(command:str):
47
  try:
48
- result = eval(command)
49
  if result:
50
  return str(result)
51
  else:
52
  return
53
  except SyntaxError:
54
  try:
55
- exec(command)
56
  return
57
  except Exception as e:
58
  return str(e)
 
45
 
46
  def run_command(command:str):
47
  try:
48
+ result = eval(command,globals())
49
  if result:
50
  return str(result)
51
  else:
52
  return
53
  except SyntaxError:
54
  try:
55
+ exec(command,globals())
56
  return
57
  except Exception as e:
58
  return str(e)