ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pythoncard
pythoncard
[Pythoncard-users] flatfileDatabase updates and release 0.6.8
by Kevin Altis other posts by this author
Jul 16 2002 7:53PM messages near this date
[Pythoncard-users] Email app | [Pythoncard-users] JPEG EXIF header parsing
I'm trying to do some last minute cleanup so I can do a 0.6.8 release by
tomorrow. I want to make a release that incorporates the various fixes and
additions since 0.6.7 before I leave for OSCON on Sunday. If you have any
bugs you want to report and have held off for some reason, today is the day
to speak up ;-)

I probably won't include fpop in the samples this release since it is quite
rough; it is harmless in that it doesn't delete or even mark any messages on
a POP3 server as read, so if you getting it from cvs there is nothing to
worry about if you fire it up and fill in the required config info for your
email account. I want Fred to have a chance to look at the direction I'm
taking with it and then we can decide if I'll just do a separate sample that
is focused on being a full email client, while Fred's fpop will focus on
just deleting unwanted emails from a POP3 server.

Andy Todd, who usually puts together the .tar.gz release file will be away
until the end of July, so Linux and Mac OS X users will need to download and
install from the .zip that I'll build. If that's going to be a problem, let
me know.

I moved the flatfileDatabase.py module into framework so that it can be used
by both the companies and flatfileDatabase samples. This means that the
flatfileDatabase.py sample module is extremely simple since it gets all of
its capabilities from the framework file. All it has to do is load the
config to figure out what resource file to use. The code is at the end of
this message.

I expect that the actual filename, flatfileDatabase.py in the framework will
be changed in a later release, maybe putting the Document class into some
storage module or sub-package and the view into another module.

I updated openBackground so that the dataFile used can be set by a subclass
and that allows the companies sample to avoid having a .ini file. So, we
have two different ways to use the same underlying classes.

ka
---

from PythonCardPrototype import flatfileDatabase, model
import os, sys
import ConfigParser

CONFIG_FILE = 'flatfileDatabase.ini'

if __name__ == '__main__':
    # assume the ini file is in the same directory as the script
    path = os.path.join(os.path.dirname(sys.argv[0]), CONFIG_FILE)
    parser = ConfigParser.ConfigParser()
    parser.read(path)
    # the resourceFile is settable via the ini file
    resourceFile = parser.get('ConfigData', 'resourceFile')

    # KEA 2002-07-16
    # since all of the needed functionality is in the framework
    # classes, we don't have to subclass in this module, we can
    # just use the base class directly
    app = model.PythonCardApp(flatfileDatabase.FlatfileDatabase,
resourceFile)
    app.MainLoop()



-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
_______________________________________________
Pythoncard-users mailing list
Pythoncard-users@[...].net
https://lists.sourceforge.net/lists/listinfo/pythoncard-users

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved