dogtail test suite test harness

Josh Sled jsled at
Wed Jul 25 16:19:29 EDT 2007

Derek Atkins <warlord at MIT.EDU> writes:
> PS: I realize it might be easier now to have all your classes in
> a single "", but eventually I think it might be better
> to separate the various classes into separate files, like,
>,,, etc.  But this
> doesn't have to happen right away.

Ah, Derek, one thing about this I forgot when we talked on irc ...
In python, files correspond to "modules"; there's no ability to group
multiple files into the same module/namespace/"package".  Thus, the file, e.g.:

    class NewAccountDialog (Dialog):
        # ... a NewAccountDialog module containing the NewAccountDialog class.  It's
referenced both other files as:

    import NewAccountDialog
    foo = NewAccountDialog.NewAccountDialog()

If each class corresponds to a file corresponds to a module, it can be very

There is a different form of the import statement, like:

    # from $module import $name
    from NewAccountDialog import NewAccountDialog
    foo = NewAccountDialog()

But it's frowned upon.  There's also:

    import NewAccountDialog as NAD
    foo = NAD.NewAccountDialog()

But it not really great either.

A different approach is to separate the classes into related groups such as
"" or "".  Then the fully-qualified names are more

   import dialogs, register
   new_account = dialogs.NewAccountDialog()
   basic = register.BasicViewRegister()
   # ...

We stay "pythonic", but the code gets factored a bit better.

Hopefully this is a good middle-ground.

...jsled - a=jsled;; echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : 

More information about the gnucash-devel mailing list