Tag: jython
-
WebSphere Jython scripting, add the script directory to the import path
If you’re running a script with wsadmin and it tries to import other modules that live in the same directory, you’ll discover another difference between Python and wsadmin. Python will always look for modules in the path that the script was run from. wsadmin won’t. This is kind of annoying if you have a few […]
-
WebSphere Jython scripting, sys.argv[0] and __file__
Today’s problem is that wsadmin sets up sys.argv differently from normal Python (or Jython). In Python, sys.argv[0] is the name of the script you invoked. What you’d normally think of as the command line arguments start at index 1. For whatever reason, wsadmin doesn’t pass the script name. The arguments are passed in starting at […]
-
WebSphere Jython scripting, __name__ == ‘__main__’
Fix __name__ in wsadmin so it returns ‘__main__’ when it’s supposed to.
-
WebSphere Jython scripting: bool, True and False
A bool type and True/False constants for Jython 2.1.
-
WebSphere Jython scripting, importing the Admin objects
Now you can import AdminApp, AdminConfig, AdminControl, and AdminTask anywhere.
-
My collection of fixes for WebSphere Jython scripting part 1 – os.environ, os.system, os.path.expandvars, …
For WebSphere Administrators and other fans of Jython 2.1: a fix for the “os” functions that fail on post-2001 versions of Windows.