tagged [module]

How can I Install a Python module within code?

How can I Install a Python module within code? I need to install a package from [PyPI](https://en.wikipedia.org/wiki/Python_Package_Index) straight within my script. Is there maybe some module or `dis...

23 Feb at 05:30

Relation between CommonJS, AMD and RequireJS?

Relation between CommonJS, AMD and RequireJS? I'm still very confused about and , even after reading a lot. I know that (formerly ) is a group for defining some specifications (i.e. modules) when the ...

What is the difference between include and require in Ruby?

What is the difference between include and require in Ruby? My question is similar to "[What is the difference between include and extend in Ruby?](https://stackoverflow.com/questions/156362/what-is-t...

12 Jan at 18:40

What does if __name__ == "__main__": do?

What does if __name__ == "__main__": do? What does this do, and why should one include the `if` statement? --- [Why is Python running my module when I import it, and how do I stop it?](https://stackov...

Python math module

Python math module Whenever I try to use any of the built-in functions of Python's exponentiation and logarithms module, I get an error like this: I have tried using `math.sqrt(4)`,`sqrt(4)` and `sqrt...

9 Jan at 03:1

Where are the python modules stored?

Where are the python modules stored? I have recently started learning Python and I have 2 questions relating to modules. 1. Is there a way to obtain a list of Python modules available (i.e. installed)...

24 Dec at 00:13

Android Studio: Module won't show up in "Edit Configuration"

Android Studio: Module won't show up in "Edit Configuration" I've imported a project to Android Studio with several subprojects. I want to run a subproject. I successfully made this subproject's build...

23 May at 05:4

Best way to load module/class from lib folder in Rails 3?

Best way to load module/class from lib folder in Rails 3? Since the latest Rails 3 release is not auto-loading modules and classes from lib anymore, what would be the best way to load them? From githu...

Defining private module functions in python

Defining private module functions in python According to [http://www.faqs.org/docs/diveintopython/fileinfo_private.html](http://www.faqs.org/docs/diveintopython/fileinfo_private.html): > Like most lan...

20 Jun at 09:12

How to list all functions in a module?

How to list all functions in a module? I have a Python module installed on my system and I'd like to be able to see what functions/classes/methods are available in it. I want to call the `help` functi...

30 May at 18:3

How to solve InaccessibleObjectException ("Unable to make {member} accessible: module {A} does not 'opens {package}' to {B}") on Java 9?

How to solve InaccessibleObjectException ("Unable to make {member} accessible: module {A} does not 'opens {package}' to {B}") on Java 9? This exception occurs in a wide variety of scenarios when runni...

How to make a cross-module variable?

How to make a cross-module variable? The `__debug__` variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it? The var...

24 Sep at 22:37

How to properly export an ES6 class in Node 4?

How to properly export an ES6 class in Node 4? I defined a class in a module: But I get the following error message: ``` TypeError: Cannot set property 'AspectType' of undefined at Object.

1 Dec at 02:6

Can typescript export a function?

Can typescript export a function? Is it possible to export a simple function from a typescript module? [This isn't compiling for me.](http://www.typescriptlang.org/Playground/#src=module%20SayHi%20%7B...

Python DNS module import error

Python DNS module import error I have been using python dns module.I was trying to use it on a new Linux installation but the module is not getting loaded. I have tried to clean up and install but the...

8 Feb at 20:36

Export default was not found

Export default was not found I have a Vue 2 project, and I've written a simple function for translating months in dates, which I would like to import in one of my components, but I'm getting an error:...

Python: OSError: [Errno 2] No such file or directory: ''

Python: OSError: [Errno 2] No such file or directory: '' I have a 100 lines, 3 years old python scraper that now bug. Starting lines are: When run, I recei

31 Mar at 01:14

What to put in a python module docstring?

What to put in a python module docstring? Ok, so I've read both [PEP 8](http://www.python.org/dev/peps/pep-0008/) and [PEP 257](http://www.python.org/dev/peps/pep-0257/), and I've written lots of docs...

31 Mar at 23:4

Python can't find module in the same folder

Python can't find module in the same folder My python somehow can't find any modules in the same directory. What am I doing wrong? (python2.7) So I have one directory '2014_07_13_test', with two files...

13 Jan at 13:24

Best way to import version-specific python modules

Best way to import version-specific python modules Which method makes the most sense for importing a module in python that is version specific? My use case is that I'm writing code that will be deploy...

How can I conditionally import an ES6 module?

How can I conditionally import an ES6 module? I need to do something like: The above code does not compile; it throws `SyntaxError: ... 'import' and 'export' may only appear at the top level`. I tried...

1 Apr at 23:45

Python 3: ImportError "No Module named Setuptools"

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`. But now, when I try to install th...

ImportError: No module named 'selenium'

ImportError: No module named 'selenium' I'm trying to write a script to check a website. It's the first time I'm using selenium. I'm trying to run the script on a OSX system. Although I checked in /Li...

17 Aug at 19:52

How to import or include data structures (e.g. a dict) into a Python file from a separate file

How to import or include data structures (e.g. a dict) into a Python file from a separate file I know I can include Python code from a common file using `import MyModuleName` - but how do I go about i...

25 Jan at 14:45

ImportError: No module named six

ImportError: No module named six I'm trying to build OpenERP project, done with dependencies. It's giving this error now ``` Traceback (most recent call last): File "openerp-client.py", line 105, in ...

14 Sep at 13:36