About 534,000 results
Open links in new tab
  1. '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 application path.

  2. 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?

  3. What is the difference between 'py' and 'python' in the Windows ...

    Jun 17, 2018 · On Windows python is the Python executable of the Python installation which you have selected as a default during the installation. This basically put the path to that version inside the PATH, so that the executable is directly available. py is the Python launcher which is a utility that comes with Python installations on Windows. It gets installed into C:\Windows\ so it’s …

  4. syntax - What do >> and << mean in Python? - Stack Overflow

    Apr 3, 2014 · 15 The other case involving print >>obj, "Hello World" is the "print chevron" syntax for the print statement in Python 2 (removed in Python 3, replaced by the file argument of the print() function). Instead of writing to standard output, the output is passed to the obj.write() method. A typical example would be file objects having a write() method.

  5. mean in Python function definitions? - Stack Overflow

    Jan 17, 2013 · In Python 3.5 though, PEP 484 -- Type Hints attaches a single meaning to this: -> is used to indicate the type that the function returns. It also seems like this will be enforced in future versions as described in What about existing uses of annotations:

  6. 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...

  7. python - How do I list all files of a directory? - Stack Overflow

    Jul 9, 2010 · How can I list all files of a directory in Python and add them to a list?

  8. 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...

  9. python - How do I sort a dictionary by value? - Stack Overflow

    Mar 5, 2009 · I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary. I can sort on the keys, but ...

  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 with exactly the same name as the file you try to open (the file extension is part of the file name).

Refresh