On Feb 14, 2009, at 4:00 PM, Ricardo Aráoz wrote:
> No, not so. Just want to have some comfortable commands. I archieved
> them in Tkinter, in wx they would have been harder but doable. I'd
> like
> to have them in dabo better. The point is sometimes I'd like to change
> the cwd while working in the interpreter (PyCrust, Idle, PythonWin)
> and
> do it easily, I'd also like to have something that gives me the access
> path to a file (in order to copy/paste into some program, let's say),
> I'd also like to be able to connect to a database, execute a query and
> browse the results without having to set complicated things up (other
> than defining the connection and the select statement). I'd rather do
> all of this with dabo tools if possible, without having to set
> things up
> in complicated manners, import something and then use the
> functionality
> straight away. So I'm trying to see if I can accomplish this from
> dabo.
> I hit some walls, for example :
If you want to do any GUI stuff in Dabo (or wx, for that matter), you
need to have an application loop running. Dabo works fine from the
command line without GUIs, such as when connecting to a database and
running queries. But displaying them in a browse requires an app to be
running.
To do this, set the MainFormClass of the app to None, and you can use
the UI:
[...@homer ~/projects/dabo/ui/uiwx]$ python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dabo
>>> app = dabo.dApp(MainFormClass=None)
>>> app.start()
>>> print dabo.ui.getFile("py")
/Users/ed/projects/dabo/db/dCursorMixin.py
> Or the other wall I mentioned in a previous mail (different thread).
> Now that you know what I'm aiming at, do you think I might accomplish
> this in dabo, or should I better look straight into Tkinter or wx?
All GUIs need an event loop; you just need to know how to do it in
Dabo. However, when I want to interact with the Python interpreter and
have access to a GUI, I usually just run dabo/ui/uiwx/dShell.py. It's
a wrapping of the PyShell, but with lots of nice additions. And since
it's already running a GUI, you don't have to 'import dabo' or create
an app to do GUI stuff.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]