Skip to content

dmibaranov/py_curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About
=====

Python (a)sync modules loader. Based at idea from curl.js


Usage
=====

So, lets try to import anything

$ echo 'def run():\n    return 2' > two.py
$ python
>>> from py_curl import curl
>>> curl('two.py')
>>> two.run()
2

Whats about remote file?

$ python
>>> from py_curl import curl
>>> curl('https://raw.github.com/django/django/master/django/utils/tree.py')
>>> tree.Node
<class 'tree.Node'>

And python 3?

$ python3
>>> from py_curl import curl
>>> curl({'my_hello': 'https://raw.github.com/d9frog9n/py_curl/master/hello.py'})
>>> my_hello.hello()
'Hello, World!'


Thanks
======

My kudos to Brett Cannon with `How Import Works` talk at PyCon 2013

About

Python (a)sync modules loader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages