[BangPypers] Re :Use of module (Include file) in Python???

Deepak Patel dpatel_07 at rediffmail.com
Sat Sep 6 14:03:15 CEST 2008

Hello,I am new to Python and need some help. Can someone please tell me whether I can use the Python Module like include file? Is there a way to use the "include" file in Python? If I try to include a file with "# include", that line is treated as comment. What is the directive to include the include file in Python?I have created a Python prgram, say RegDesc.py for my registers class definitions, for example, called as:class Reg:with all the register methods, like ReadReg(), WriteReg() etc.In the same file, I have description of various registers, like:ConfigReg = Reg(.....).Now I want to treat my RegDesc.py as include file to my other programs and use the Reg class methods in my other programs. How can I do this? Do I need to use module?Thanks,Deepak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20080906/55536ec6/attachment.htm>

More information about the BangPypers mailing list