VISTA: Known Problems and Solutions

 

This is a list of known problems that are caused by incompatibilities between the new and old version of VISTA.  If you discover a problem not included here, please report it here.

 

Changes to os module:

To make Jython 100% Java their development team dropped all components that related to a specific OS.  Most of this functionality can be recovered by importing the os module from the jnios package.  This affects the os functions os.getpid() and os.system()

Replace:
import os
with:
from jnios import os

For the os.builtin_module_names variable, there is no direct replacement to identify the name of the OS being used.  To find out which OS is being used the function java.lang.System.getProperty("os.name") will have to be used.  This returns a string of the operating system being used (Solaris, Windows NT, etc).

 

Appending to files:

The function write('','a+') apparently no longer appends an existing file, but opens the file as new (destroying any existing contents).  To avoid this behavior do not close the file until you are done writing to it.

 

Use of the variable x:

Due to a global variable conflict, using a variable named x within VPlotter will create errors.  Avoid defining any variables by this name for exporting purposes.

 

Regular expression searching for blank lines:

The regular expression (re module) "^[\t]*$" no longer returns false in a search if the string has contents.  The old behavior would return true for an empty line only.

Replace:
if re.search("^[ \t]*$",stringName):
with:
if len(string.split(stringName)) <= 0:

 

Back | Home Available Studies Computer Models Reports

Section Home Pages

Site Map
Hydrology &
Operations
Delta Modeling Computer Assistance

Disclaimer
Comments or Questions
Webmaster: Tawnly Pranger, phone (916) 653-8698

URL http://modeling.water.ca.gov/delta
Last modified: September 30, 2002.

Copyright © 2000.
California Department of Water Resources.
All rights reserved.