This file contains hidden or 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
import myPackage | |
obj = myPackage.Backplane() | |
print obj.getArg0 | |
print obj.getArg0() |
This file contains hidden or 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
public void performSetup(java.lang.String arg) { | |
... | |
} |
This file contains hidden or 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
import java.awt | |
f = java.awt.Frame() | |
f.title = "Hello AWT" | |
f.visible = True |
This file contains hidden or 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
/** | |
* Creates package/updates statically known classes info. Uses | |
* {@link PyJavaPackage#addPackage(java.lang.String, java.lang.String) }, | |
* {@link PyJavaPackage#addPlaceholders}. | |
* | |
* @param name package name | |
* @param classes comma-separated string | |
* @param jarfile involved jarfile; can be null | |
* @return created/updated package | |
*/ |
This file contains hidden or 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
import sys | |
sys.packageManager.makeJavaPackage("javax.swing", "JWindow", None) | |
import javax.swing | |
f = javax.swing.JFrame() | |
f.title = "Jython/Swing" | |
f.visible = True |
This file contains hidden or 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
try: | |
import javax.swing | |
except ImportError: | |
import sys | |
sys.packageManager.makeJavaPackage("javax.swing", "JWindow", None) | |
import javax.swing |
This file contains hidden or 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
def isValid(self): | |
if self.name in (True, False, None): | |
return False | |
#if self.handlerClass in (True, False, None): | |
# return False | |
#return True | |
x = self.handlerClass | |
return (x != None) and (x != True) and (x != False) |
This file contains hidden or 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 Demo: | |
def inspect(self): | |
return type(self) in (None, True, False) | |
print Demo().inspect() |
This file contains hidden or 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(a) | |
{ | |
// do something... | |
} | |
if(b) | |
{ | |
// do something else... | |
} |
This file contains hidden or 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(a) | |
{ | |
// do something... | |
if(c) | |
// special case | |
} | |
if(b) | |
{ | |
// do something else... | |
if(c) |