English

How To: Alter upgrade geodatabase Python scripts to run on Linux and UNIX

Summary

The input_example.py sample Python scripts in the ArcSDE 10 installation guides and ArcGIS Server help files provided with the installation media, create an sde connection file that is used to upgrade a geodatabase.

The syntax that defines the local variable specifying where the sde connection file is to be stored is specific to Windows operating systems. To run the scripts on Linux or UNIX, alter the content of the local variables code block to use Linux/UNIX syntax as outlined below.

Note:
Updated versions of the scripts are also available in the topics listed in the Related Information section of this article.

Procedure

  1. Add an operating system environment variable named TMP, and set it to a temporary directory on the server.
  2. In the input_example.py sample script, change the following piece of code from this:

    Code:
    # Local variables...
    temp = os.environ.get("TEMP")
    Connection_File_Name = temp+"\\connection.sde"


    To this:

    Code:
    # Local variables...
    temp = os.environ.get("TMP")
    Connection_File_Name = temp+"/connection.sde"

Related Information