Top "Module" questions

A logical subdivision of a larger, more complex system.

Typescript: How to export a variable

I want to open 'file1.ts' and write: export var arr = [1,2,3]; and open another file, let's say 'file2.ts' and …

typescript import module export
Typescript image import

I found a solution here: Webpack & Typescript image import But i am getting error for this: [ts] Types of …

reactjs typescript module tsconfig react-tsx
Running a python package

Running Python 2.6.1 on OSX, will deploy to CentOS. Would like to have a package to be invoked from a command …

python module package main python-2.6
Pass options to ES6 module imports

Is it possible to pass options to ES6 imports? How do you translate this: var x = require('module')(someoptions); to …

javascript module ecmascript-6 es6-modules
App base path from a module in NodeJS

I'm building a web app in NodeJS, and I'm implementing my API routes in separate modules. In one of my …

node.js module path fs
How do I call setattr() on the current module?

What do I pass as the first parameter "object" to the function setattr(object, name, value), to set variables on …

python module global-variables getattr setattr
How can I install a specific version of a set of Perl modules?

I'm tasked with replicating a production environment to create many test/sit environments. One of the things I need to …

perl version module cpan
Bypass confirmation prompt for pip uninstall

I'm trying to uninstall all django packages in my superuser environment to ensure that all my webapp dependencies are installed …

python django module pip easy-install
In Lua how do you import modules?

Do you use require "name" or local name = require "name" Also, do you explicitly declare system modules as local variables? …

import module lua declaration require
How to change a module variable from another module?

Suppose I have a package named bar, and it contains bar.py: a = None def foobar(): print a and __init__.…

python import module