About 3,710,000 results
Open links in new tab
  1. Difference between exit () and sys.exit () in Python

    Oct 7, 2016 · In Python, there are two similarly-named functions, exit() and sys.exit(). What's the difference and when should I use one over the other?

  2. adding directory to sys.path /PYTHONPATH - Stack Overflow

    The problem is that if I use sys.path.append(mod_directory) to append the path and then open the python interpreter, the directory mod_directory gets added to the end of the list sys.path.

  3. python - PYTHONPATH vs. sys.path - Stack Overflow

    Another developer and I disagree about whether PYTHONPATH or sys.path should be used to allow Python to find a Python package in a user (e.g., development) directory. We have a …

  4. python - Possible values from sys.platform? - Stack Overflow

    Jan 15, 2009 · What are the possible return values from the following command? import sys print sys.platform I know there is a lot of possibilities, so I'm mainly interested in the "main" ones …

  5. 'Sys.WebForms.PageRequestManager' is null or not an object

    Nov 12, 2014 · but in the dynamic page it is getting displayed as 'Sys.WebForms.PageRequestManager.getInstance ().add_beginRequest …

  6. python - How do I terminate a script? - Stack Overflow

    also sys.exit () will terminate all python scripts, but quit () only terminates the script which spawned it. David C. Over a year ago Do you know if this command works differently in python …

  7. Python: Best way to add to sys.path relative to the current running ...

    Dec 29, 2011 · #!/usr/bin/python import sys.path from os.path import pardir, sep sys.path.append_relative(pardir + sep + "lib") import mylib Or even better, something that …

  8. How to handle both `with open (...)` and `sys.stdout` nicely?

    Jul 12, 2013 · handle.write(content) if handle is not sys.stdout: handle.close() But that isn't much shorter than what you have and it looks arguably worse. You could also make sys.stdout …

  9. What does {sys.executable} do in a Jupyter Notebook?

    Dec 14, 2021 · sys.executable is refering to the Python interpreter for the current system. It comes handy when using virtual environments and have several interpreters on the same …

  10. How to understand sys.stdout and sys.stderr in Python

    Jul 15, 2015 · When you print() in Python, your text is written to Python's sys.stdout. When you do input(), it comes from sys.stdin. Exceptions are written to sys.stderr. You can reassign these …