웹에서 파이썬 모둘 임포트하기

Posted at 2010/01/21 14:20// Posted in python/py-urlimport
파이썬에는 다양한 모듈들이 이미 내장되어 있지만,
지원되지 않거나 특화시켜야 하는 모듈들은 직접 만들어야 할 경우가 종종 있습니다.

그런데 매번 자기가 가진 모듈을 들고 다니는건 아니기 때문에
만든걸 또 만들어야 하는 경우가 종종 있습니다.

물론 다시 만드는게 어려운일은 아니지만 꽤나 귀찮죠 ~(-_-)~ 시간낭비하는 것 같기도 하고요.

이런 경우에 유용하게 사용할 수 있는 방법이 웹에서 파이썬 모듈 임포트입니다 -_-)/

실은 오늘 1시간동안 만들었는데...
약간 문제가 있어 개선점을 찾기 위해 웹을 검색해보니
이미 Jure Vrscaj 라는 훌륭한 분이 만드셨더군요;;

이름인 즉...

두둥! urlimport !!

꽤나 좋습니다.
문제가 하나 있다면 링크가 깨졌다는 겁니다-_-
구글 검색 계속 해도 계속 꺠진 링크만 나오더군요

다행인 점은 freebsd port 에 백업본이 남아있더군요 >ㅁ<)/
http://www.freebsd.org/cgi/ports.cgi?query=urlimport&stype=all


Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import urlimport
| | Url importing enabled. Add urls to sys.path.
| | Use urlimport.config(key=value) to manipulate settings:
| | debug=1
| | ssl_key=''
| | ssl_cert=''
| |
| | This stuff is experimental, use at your own risk. Enjoy.
>>> import sys
>>> sys.path.append("http://www.myevan.net/python")
>>> import hello
| | find_module: got 'http://www.myevan.net/python/hello.py'.
>>> hello.hello()
hello -_-)/
>>>


다운로드 미러링:

짜잔~
이올린에 북마크하기(0) 이올린에 추천하기(0)
2010/01/21 14:20 2010/01/21 14:20