Print module infomation : Module : Language Basics PYTHON examples


PYTHON examples » Language Basics » Module »

 

Print module infomation



//File: module2.py
print 'starting to load...'

import sys
name = 42

def func(): pass

class klass: pass

print 'done loading.'



///////////////////////////////////////////////////////////////////////////////////
//Main.py

import module2
starting to load...
done loading.

module2.sys
print module2.name

print module2.func, module2.klass

print module2.__dict__.keys()

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Language Basics
» Module


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0