This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fri, 04 Nov 14:17 E0][cibak@localhost:~/test]> python test.py | |
##### creating child | |
in child, gX is there? False | |
in child, foo is there? False | |
##### baseClass.run() exectuion | |
in base class run | |
gX = 1 | |
function foo called | |
##### testChild.myRun() execution | |
in testChildMyRun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__": | |
print "#"*5, "creating child" | |
child = testChild() | |
print "#"*5, "baseClass.run() execution" | |
child.run() | |
print "#"*5, "testChild.myRun() execution" | |
child.myRun() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from testBase import baseClass | |
class testChild( baseClass ): | |
def __init__( self ): | |
baseClass.__init__( self ) | |
print "in child, gX is there? ", "gX" in globals() | |
print "in child, foo is there? ", "foo" in globals() | |
def myRun( self ): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fri, 04 Nov 14:32 E0][cibak@localhost:~/test]> python -m a | |
<type 'module'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fri, 04 Nov 14:29 E0][cibak@localhost:~/test]> python | |
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) | |
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from a import A | |
>>> a = A() | |
<type 'dict'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A: | |
def __init__( self ): | |
print type(__builtins__) | |
if __name__ == "__main__": | |
a = A() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class baseClass( object ): | |
def __init__( self ): | |
from testGlobal import gX, foo | |
try: | |
__builtins__["gX"] = gX | |
__builtins__["foo"] = foo | |
except: | |
setattr( __builtins__, "gX", gX ) | |
setattr( __builtins__, "foo", foo ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gX = 1 | |
def foo( ): | |
print "function foo called" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
## | |
# @file svn-policy.py | |
# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMgmail.com) | |
# @date 06/05/2009 | |
# @brief pre-commit hook | |
# | |
import os | |
import sys | |
import getopt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once("System.php"); | |
/** | |
* @class graphviz | |
* @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMgmail.com) | |
* @brief class for making Graphviz plots online | |
*/ | |
class graphviz { | |
var $directed = True; |