4
votes
1answer
53 views

What's the difference between module, package and library in Haskell?

What's the difference between module, package and library in Haskell? From http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html Prelude: a standard module imported by default into ...
1
vote
2answers
27 views

Python import modules from a higher level package

This is my package hierarchy app |--__init__.py //Empty file |--server.py |--global_vars.py | |--handlers |--__init__.py //Empty file | |--url1 | |--__init__.py ...
1
vote
1answer
45 views

How to package a client-side Javascript library today?

I've been catching up with the modern client-side JS ecosystem and reading up on module systems such as CommonJS and AMD (incl. associated tools - browserify, requirejs, onejs, jam, dozens of others). ...
1
vote
1answer
20 views

Paths from a module/imported package

I need to package up a bunch of html/css/etc. files as a package: lets call them 'themes'. I'm doing this so I can make these available cross-application for several/any number of applications. I ...
1
vote
2answers
62 views

python package import modules using __init__.py

I have made a package in the following structure: test.py pakcage1/ __init__.py module1.py module2.py In the test.py file, with the code from package1 import * what I want it to do ...
1
vote
0answers
32 views

List modules in namespace package

I'm trying to get Python to list all modules in a namespace package. I have the following file structure: cwd |--a | `--ns | |--__init__.py | `--amod.py |--b | `--ns | |--__init__.py | ...
0
votes
1answer
39 views

ignore some .py in module

say I have following python module: foo\\ __init__.py bar.py ignoreme.py how can I make foo.ignoreme is not imported when importing foo? I can make ignoreme into a submodule(which is not ...
0
votes
1answer
59 views

Clean imports from packages in Python

I have a following project structure: project |----app.py |----package |---__init__.py |---module.py |---module2.py |---module3.py |---.... My __init__.py file currently is ...
1
vote
1answer
55 views

create Python package and import modules

I'm trying to write my first Python package, and almost all my modules will need to use NumPy. Should I write import numpy in every single module or is there some place in the package I can just ...
0
votes
1answer
49 views

Why __import__() is returning the package instead of the module?

I have this file structure (where the dot is my working directory): . +-- testpack +-- __init__.py +-- testmod.py If I load the testmod module with the import statement, I can call a ...
0
votes
2answers
57 views

Python : import module once for a whole package

I'm currently coding an app which is basically structured that way : main.py + Package1 +--- Class1.py +--- Apps + Package2 +--- Class1.py +--- Apps So I have two questions : First, inside both ...
3
votes
2answers
72 views

Local collection of Python packages: best way to import them?

I need to ship a collection of Python programs that use multiple packages stored in a local Library directory: the goal is to avoid having users install packages before using my programs (the packages ...
0
votes
1answer
205 views

Get package root and full module name from .py file for importing

I'm looking for a simple and fast way to find the root of the package and the full module name from a path to .py file. I want the user to choose a .py and import it without breaking. Importing a ...
0
votes
3answers
47 views

In python after I import a module is there a way of finding what physical file it was loaded from?

Something's acting up in my math package I think and I want to ensure I'm loading the correct module. How do I check the physical file location of loaded modules in python?
4
votes
3answers
7k views

Python 3: ImportError “No Module named Setuptools”

I'm having troubles with installing packages in Python 3. I have always installed packages with "setup.py install" command. But now when i try to install ansicolors package i get importerror "No ...

1 2 3 4 5 6
15 30 50 per page