About 532,000 results
Open links in new tab
  1. python - Importing files from different folder - Stack Overflow

    I have this folder structure: application ├── app │ └── folder │ └── file.py └── app2 └── some_folder └── some_file.py How can I import a function from file.py, from within som...

  2. 'Python not found' despite having been installed [duplicate]

    Feb 28, 2021 · The Python application path, which is the folder where you originally installed Python; and The Python Scripts path. The Scripts folder should be located within the Python …

  3. python - SSL: CERTIFICATE_VERIFY_FAILED with Python3 - Stack …

    Sep 2, 2017 · Go to the folder where Python is installed, e.g., in my case (Mac OS) it is installed in the Applications folder with the folder name 'Python 3.6'. Now double click on 'Install …

  4. python - How to check if a value exists in a dictionary ... - Stack ...

    In Python 3, you can use "one" in d.values() to test if "one" is among the values of your dictionary. In Python 2, it's more efficient to use "one" in d.itervalues() instead. Note that this triggers a …

  5. python - if/else in a list comprehension - Stack Overflow

    How do I convert the following for-loop containing an if/else into a list comprehension? results = [] for x in xs: results.append(f(x) if x is not None else '') It should yield '' if x is None...

  6. python - What's the pythonic way to use getters and setters?

    I'm doing it like: def set_property(property,value): def get_property(property): or object.property = value value = object.property What's the pythonic way to use getters and setters?

  7. python - How do I define a function with optional arguments?

    0 A Python function can take in some arguments, take this for example, def add(x,y): return x+ y # calling this will require only x and y add(2,3) # 5 If we want to add as many arguments as we …

  8. python - How to stop one or multiple for loop (s) - Stack Overflow

    You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. What's reputation and how do I …

  9. python - 'virtualenv' won't activate on Windows - Stack Overflow

    1 Search PowerShell Right click on Windows PowerShell and Run as administrator. Put below command and hit enter. Set-ExecutionPolicy Unrestricted -Force Restart you system and try to …

  10. python - Errno 13 Permission denied - Stack Overflow

    Jul 16, 2020 · For future searchers, if none of the above worked, for me, python was trying to open a folder as a file. Check at the location where you try to open the file, if you have a folder …

Refresh