Changeset 2962
- Timestamp:
- 03/23/07 19:29:16 (2 years ago)
- Files:
-
- trunk/dabo/dApp.py (modified) (2 diffs)
- trunk/dabo/dReportWriter.py (modified) (1 diff)
- trunk/dabo/dSecurityManager.py (modified) (1 diff)
- trunk/dabo/dUserSettingProvider.py (modified) (1 diff)
- trunk/dabo/db/dBackend.py (modified) (2 diffs)
- trunk/dabo/db/dCursorMixin.py (modified) (1 diff)
- trunk/dabo/db/dbFirebird.py (modified) (1 diff)
- trunk/dabo/db/dbGadfly.py (deleted)
- trunk/dabo/db/dbMsSQL.py (modified) (1 diff)
- trunk/dabo/db/dbMySQL.py (modified) (1 diff)
- trunk/dabo/db/dbPostgreSQL.py (modified) (1 diff)
- trunk/dabo/db/dbSQLite.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/dApp.py
r2932 r2962 1 """2 dApp.py : The application object for Dabo.3 4 5 This object gets instantiated from the client app's main.py,6 and lives through the life of the application.7 8 -- set up an empty data connections object which holds9 -- connectInfo objects connected to pretty names. If there10 -- is a file named 'default.cnxml' present, it will import the11 -- connection definitions contained in that. If no file of that12 -- name exists, it will import any .cnxml file it finds. If there13 -- are no such files, it will then revert to the old behavior14 -- of importing a file in the current directory called15 -- 'dbConnectionDefs.py', which contains connection16 -- definitions in python code format instead of XML.17 18 -- Set up a DB Connection manager, that is basically a dictionary19 -- of dConnection objects. This allows connections to be shared20 -- application-wide.21 22 -- decide which ui to use (wx) and gets that ball rolling23 24 -- make a system menu bar, based on a combination25 -- of dabo defaults and user resource files.26 27 -- ditto for toolbar(s)28 29 -- look for a mainFrame ui resource file in an expected30 -- place, otherwise uses default dabo mainFrame, and31 -- instantiate that.32 33 -- maintain a forms collection and provide interfaces for34 -- opening dForms, closing them, and iterating through them.35 36 -- start the main app event loop.37 38 -- clean up and exit gracefully39 """40 1 import sys 41 2 import os … … 147 108 >>> app = dabo.dApp 148 109 >>> app.start() 110 111 Normally, dApp gets instantiated from the client app's main Python script, 112 and lives through the life of the application. 113 114 -- set up an empty data connections object which holds 115 -- connectInfo objects connected to pretty names. If there 116 -- is a file named 'default.cnxml' present, it will import the 117 -- connection definitions contained in that. If no file of that 118 -- name exists, it will import any .cnxml file it finds. If there 119 -- are no such files, it will then revert to the old behavior 120 -- of importing a file in the current directory called 121 -- 'dbConnectionDefs.py', which contains connection 122 -- definitions in python code format instead of XML. 123 124 -- Set up a DB Connection manager, that is basically a dictionary 125 -- of dConnection objects. This allows connections to be shared 126 -- application-wide. 127 128 -- decide which ui to use (wx) and gets that ball rolling 129 130 -- look for a MainForm in an expected place, otherwise use default dabo 131 -- dMainForm, and instantiate that. 132 133 -- maintain a forms collection and provide interfaces for 134 -- opening dForms, closing them, and iterating through them. 135 136 -- start the main app event loop. 137 138 -- clean up and exit gracefully 139 149 140 """ 150 141 _call_beforeInit, _call_afterInit, _call_initProperties = False, False, True trunk/dabo/dReportWriter.py
r2327 r2962 6 6 # dReportWriter is simply a raw ReportWriter/dObject mixin: 7 7 class dReportWriter(dObject, ReportWriter): 8 """The Dabo Report Writer Engine, which mixes a data cursor and a report 9 format file (.rfxml) to output a PDF. 10 11 For each row in the Cursor, a detail band is printed. For each page in the 12 report, the pageBackground, pageHeader, pageFooter, and pageForeground 13 bands are printed. For each defined grouping, the groupHeader and groupFooter 14 bands are printed. 15 16 Report variables can be defined as accumulators, or for any purpose you 17 need. All properties of the report form are evaluated at runtime, so that 18 you can achieve full flexibility and ultimate control. 19 20 There is also a pure-python interface available. 21 """ 8 22 def _getEncoding(self): 9 23 try: trunk/dabo/dSecurityManager.py
r2853 r2962 5 5 6 6 class dSecurityManager(dObject): 7 7 """Class providing security services for Dabo applications, such as the 8 user logging in. 9 """ 8 10 def login(self): 9 11 """Ask the ui to display the login form to the user. trunk/dabo/dUserSettingProvider.py
r2936 r2962 5 5 6 6 class dUserSettingProvider(dObject): 7 """Class that manages saving and restoring user settings, such as form 8 size and position. 9 """ 7 10 def getUserSettingKeys(self, spec): 8 11 """Return a list of all keys underneath <spec>. trunk/dabo/db/dBackend.py
r2904 r2962 1 """ dabo.db.backend.py : abstractions for the various db api's """2 1 import sys 3 2 import re … … 17 16 18 17 class dBackend(dObject): 19 """ Abstract object: inherit from this to define new dabo db interfaces."""18 """Abstract class inherited by the specific Dabo database connectors.""" 20 19 # Pattern for determining if a function is present in a string 21 20 functionPat = re.compile(r".*\([^\)]+\)") trunk/dabo/db/dCursorMixin.py
r2942 r2962 27 27 28 28 class dCursorMixin(dObject): 29 """Dabo's cursor class, representing the lowest tier.""" 29 30 _call_initProperties = False 30 31 def __init__(self, sql="", *args, **kwargs): trunk/dabo/db/dbFirebird.py
r2851 r2962 7 7 8 8 class Firebird(dBackend): 9 """Class providing Firebird connectivity. Uses kinterbasdb.""" 9 10 10 11 # Firebird treats quotes names differently than unquoted names. This trunk/dabo/db/dbMsSQL.py
r2761 r2962 4 4 5 5 class MSSQL(dBackend): 6 """Class providing Microsoft SQL Server connectivity. Uses pymssql.""" 6 7 def __init__(self): 7 8 dBackend.__init__(self) trunk/dabo/db/dbMySQL.py
r2921 r2962 10 10 11 11 class MySQL(dBackend): 12 """Class providing MySQL connectivity. Uses MySQLdb.""" 12 13 13 14 # MySQL uses the backtick to enclose names with spaces. trunk/dabo/db/dbPostgreSQL.py
r2927 r2962 4 4 5 5 class Postgres(dBackend): 6 """Class providing PostgreSQL connectivity. Uses psycopg.""" 6 7 def __init__(self): 7 8 dBackend.__init__(self) trunk/dabo/db/dbSQLite.py
r2827 r2962 8 8 9 9 class SQLite(dBackend): 10 """Class providing SQLite connectivity. Uses sqlite3 or pysqlite2 package.""" 10 11 def __init__(self): 11 12 dBackend.__init__(self)
