Skip to content

Lazily access modules without importing them first.

License

Notifications You must be signed in to change notification settings

agoose77/xontrib-mod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xontrib-mod

pypi-badge

image

Xonsh pushes the user towards Pythonic contructs over shell pipelines of general purpose tools (think xargs and friends), but these constructs are generally more verbose to use. This is in part due to the need to import them from the Python path with import .... Given that the shell rewards ease-of-writing over verbosity, this can make writing shell script in Python a less enjoyable experience for shell programmers.

Enter mod. mod is a simple xontrib that defines a mod builtin that attempts to resolve modules and their attributes:

>>> xontrib load mod
>>> mod.json.loads($(echo "[1, 2, 3]"))
[1, 2, 3]

About

Lazily access modules without importing them first.

Topics

Resources

License

Stars

Watchers

Forks

Languages