About 8,970,000 results
Open links in new tab
  1. Why does Python use 'magic methods'? - Stack Overflow

    19 Python uses the word "magic methods", because those methods really performs magic for you program. One of the biggest advantages of using Python's magic methods is that they provide …

  2. How to use python-magic 5.19-1 - Stack Overflow

    Aug 13, 2014 · I think that you are better off using python-magic-0.4.6 as it is readily available at PYPI and easily installed via pip into virtualenv environments. Documentation for python …

  3. python-magic installation challenges for 64-bit Windows 10 …

    python-magic installation challenges for 64-bit Windows 10 running 32-bit Python 2.7 build Asked 8 years, 11 months ago Modified 3 years, 1 month ago Viewed 18k times

  4. python - Installing libmagic with pip fails - Stack Overflow

    Jul 7, 2023 · pip install python-magic There was an issue request 6 years ago by its maintainer to the person sitting on the abandoned "python-libmagic" name to change it, to no avail.

  5. How to check type of files without extensions? [duplicate]

    For python magic there are dependencies: Windows: pip install python-magic-bin and Linux: sudo apt-get install libmagic1 are required.

  6. Python-magic installation error - ImportError: failed to find …

    ImportError: failed to find libmagic. Check your installation I have magic1.dll (along with the two other files the docs specified) in C:\Windows\System32 so I am not sure what the issue is. I …

  7. python - What's the bad magic number error? - Stack Overflow

    The magic number comes from UNIX-type systems where the first few bytes of a file held a marker indicating the file type. Python puts a similar marker into its pyc files when it creates them.

  8. How to find the mime type of a file in python? - Stack Overflow

    Sep 4, 2008 · The python-magic method suggested by toivotuo is outdated. Python-magic's current trunk is at Github and based on the readme there, finding the MIME-type, is done like this.

  9. Newest 'python-magic' Questions - Stack Overflow

    Sep 27, 2023 · python-magic is a python interface to the libmagic file type identification library. Sign up to watch this tag and see more personalized content

  10. Python returns MagicMock object instead of return_value

    Jul 5, 2016 · When testing, A() returns the return_value from mock_A (a regular MagicMock, as you haven't specified anything else), which is not an instance of the class A. You need to set …