- Building a Java ORM Facility
- A Note About Running Python Example Code
A Note About Running Python Example Code
One of the many merits of Python is its lightweight nature. So, it's pretty straightforward to get started coding in Python - no need to install (at least initially) and learn to use complex IDEs such as Eclipse. Instead, you can simply run up a Python console. In Linux, this is as simple as running the command: python. This results in something similar to that illustrated in Listing 7:
Listing 7The Python Console: Checking Whether SQLAlchemy Is Installed.
Python 2.7.3 (default, Sep 26 2013, 20:08:41) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> Here's how to check if sqlalchemy is installed: >>> import sqlalchemy >>> sqlalchemy.__version__ '0.7.4' >>>
Obviously, as the code examples become more complex, copying and pasting into a console becomes a bit clunky. But the console approach is useful for getting started, or just for testing a code snippet.