摘要: IPython supplies you the convenience of editing code from command prompt, the magic command %edit. However in Windows it will use notepad as default editor which is not suitable for editing python source code. Here is the method to config the editor option.As IPython official doc said:Editor configu 阅读全文
posted @ 2013-04-02 13:00 n0p 阅读(1598) 评论(0) 推荐(0) 编辑
摘要: With importing the model, the methods mainly depends on the os.path model:# method 1import _module_print _module_.__file__ # method 2import os.path print os.path.abspath(_module_.__file__) print os.path.dirname(_model_.__file__) # method 3import sys sys.modules['_model_']Without importing th 阅读全文
posted @ 2013-04-02 10:57 n0p 阅读(199) 评论(0) 推荐(0) 编辑
摘要: In python, class and instance are both objects.<Learning Python> says that,When we run a class statement, we get a class object.When we call a class object, we get an instance object.Such confusing definitions. 阅读全文
posted @ 2013-04-02 00:11 n0p 阅读(144) 评论(0) 推荐(0) 编辑