O'Reilly logo

Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ by Dan Scott, George Baklarz, Paul C. Zikopoulos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Apache Derby Applications with Python

Using Python Modules

To use a Python module in a Python script, you must tell the Python interpreter to load the module through the import statement. Most Python scripts collect their import statements at the top of the script to ensure that all of the dependencies are met before the rest of the script is run. It is also an easy way to inform other users of your script about the required modules.

All of the Python scripts developed in this chapter start with the following lines:

#!/usr/bin/python
import DB2

When you invoke a script on Windows operating systems from the command line, the first line is ignored. However, on UNIX-based operating systems and in a Web server's CGI handler, the special ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required