Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

package

What is __init__.py for?

August 22, 2022 by Magenaut

What is __init__.py for in a Python source directory?

Categories Python, Q&A Tags module, package, python, python-packaging Leave a comment

How to fix “Attempted relative import in non-package” even with __init__.py

August 21, 2022 by Magenaut

I’m trying to follow PEP 328, with the following directory structure:

Categories Python, Q&A Tags importerror, init, package, python, python-import Leave a comment

How to install pip with Python 3?

August 21, 2022 by Magenaut

I want to install pip. It should support Python 3, but it requires setuptools, which is available only for Python 2.

Categories Python, Q&A Tags package, pip, python, python-3.x, setuptools Leave a comment

Is __init__.py not required for packages in Python 3.3+

August 21, 2022 by Magenaut

I am using Python 3.5.1. I read the document and the package section here: https://docs.python.org/3/tutorial/modules.html#packages

Categories Python, Q&A Tags package, python, python-3.x Leave a comment

What’s the difference between a Python module and a Python package?

August 21, 2022 by Magenaut

What’s the difference between a Python module and a Python package?

Categories Python, Q&A Tags module, package, python Leave a comment

What is the purpose of the -m switch?

August 20, 2022 by Magenaut

Could you explain to me what the difference is between calling

Categories Python, Q&A Tags command-line, module, package, python Leave a comment

How do I create a namespace package in Python?

August 20, 2022 by Magenaut

In Python, a namespace package allows you to spread Python code among several projects. This is useful when you want to release related libraries as separate downloads. For example, with the directories Package-1 and Package-2 in PYTHONPATH,

Categories Python, Q&A Tags namespaces, package, python Leave a comment

Execution of Python code with -m option or not

August 20, 2022 by Magenaut

The python interpreter has -m module option that “Runs library module module as a script”.

Categories Python, Q&A Tags module, package, python Leave a comment

Relative imports – ModuleNotFoundError: No module named x

August 19, 2022 by Magenaut

This is the first time I’ve really sat down and tried python 3, and seem to be failing miserably. I have the following two files:

Categories Python, Q&A Tags package, python, python-3.x, python-import, relative-import Leave a comment

Python: importing a sub‑package or sub‑module

August 19, 2022 by Magenaut

Having already use flat packages, I was not expecting the issue I encountered with nested packages. Here is…

Categories Python, Q&A Tags import, module, package, python Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress