Skip to content

AndyKhang404/noimport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

noimport v0.0.1

A simple package to prevent the abusive use of the import statement in Python.

Installation

To install, just run:

pip install noimport

Usage

After importing the noimport package, any attempts of importation would result in an error

>>> import noimport
>>> import time			# Built in modules won't work, ...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: import of time halted; None in sys.modules

>>> import foo			# ... nor local modules, ...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'foo'

>>> import PIL			# ... nor pip installed packages
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PIL'

License

This project is licensed under the MIT license


Python without modules and packages, how bad can it be? 😈😈😈

About

A simple package to prevent the abusive use of 'import' statement in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages