Questions tagged [sys]

For questions about the Python module named sys. This tag is also used for questions relating to the Sys namespace - the root namespace for the Microsoft AJAX Library, which contains all fundamental classes and base classes.

1100 questions
-5
votes
3 answers

delete *.pyc continuation

As a follow-up to this question, I have a new question: What is happening internally in os.remove(module_name) and del sys.modules["module_name"]?
user46646
  • 153,461
  • 44
  • 78
  • 84
-6
votes
1 answer

Check it is number or not and import sys on python

I just want to know how can i check it is number or not in import sys situation. and want to know Why i didn't get output "Hello" with code A.isalpha()
-6
votes
2 answers

How do you read printed data in python?

Let's say I wrote the following python script: print("Hello") print("Line 2") print("Goodbye") The output would of course be: Hello Line 2 Goodbye After printing this data is there any way I could read it? In other words, can you read printed data…
Binary111
  • 149
  • 4
  • 15
-6
votes
2 answers

('syntax %(name,name,name)', ', mode 'w' at 0x01CE60D0>)?

Why when i run this line of code: print ("syntax %(name,name,name)",sys.stderr) I get the following error: ('syntax %(name,name,name)', ', mode 'w' at 0x01CE60D0>)
Michael
  • 15,386
  • 36
  • 94
  • 143
-9
votes
1 answer

Python program to execute any other Python program as argument?

I am trying to write a Python program to to execute another Python program using subprocess. What wrong in this program, and how can I take the other Python program as an argument? import sys import subprocess def dorun(args): …
Najeeb Choudhary
  • 396
  • 1
  • 3
  • 21
1 2 3
73
74