Re: Best GUI for Python

2015-04-28 Thread Dave Cook
On 2015-04-26, Cecil Westerhof ce...@decebal.nl wrote:
 I want to use a GUI for Python. When searching I found (beside some
 others) Tkinter and wxPython. From what I found it looks like Tkinter
 is slightly better. What would be the pros/cons of these two? Would
 there be a compelling reason to use another GUI?


For cross-platform work, I think it comes down to wx or Qt.  I've used
them on Windows, Mac and Linux.  Qt has the more polished and
consistent API, and is more popular with the big scientific Python
distros. wx has the most liberal license, and I think having to deal
with only one Python binding is somewhat an advantage.  I've gone back
and forth between them, and could probably live with either one.

Gtk is also worth looking at if you only care about Linux.

Dave Cook
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Future of Pypy?

2015-02-23 Thread Dave Cook
On 2015-02-22, Dave Farrance davefarra...@omitthisyahooandthis.co.uk wrote:

 It's still quicker to do a re-write in the more cumbersome C

You should try Cython.

Dave
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI toolkit(s) status

2014-11-26 Thread Dave Cook
On 2014-11-22, Michael Torrie torr...@gmail.com wrote:

 I can't speak for wxWidgets, but when I last looked at it years ago it
 fairly reeked of MFC-style GUI programming with event tables instead of
 a nice, flexible signal/callback interface.  Has this changed?

In Python?  I've been using wxpython for 6 or 7 years, and it's always
used callbacks in Python.  The API is not as polished or extensive as
Qt, but it's still very capable.  I think it's easier to write custom
widgets in wxpython because there are so many examples to follow.

Recently I decided to use PyQt for a project that was required to run
on win32 and OS X, and for some reason my layout, wich was fine under
win32, was screwed up on OS X.  I switched back to wxpython 3.0, which
looks very good under OS X.  

Dave Cook
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Mac vs. Linux for Python Development

2014-02-23 Thread Dave Cook
On 2014-02-23, twiz twiza...@gmail.com wrote:

 I've been developing with python recreationally for a while on
 Ubuntu but will soon be transitioning to full-time python development.
 I have the option of using a Mac or Ubuntu environment and I'd like to
 hear any thoughts on the pros and cons of each. Specifically, how's
 the support for numpy and scipy?

I had problems trying to build my own scipy stack on Maverick, but
installing Anaconda's Python distribution solved that.

Overall, Python works very well on OS X, but feels better integrated
to me under Linux.

I'll note that Macs are very popular among the members of pythonsd.  I
think this is particularly true of the Django developers.

Dave Cook

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python GUI?

2013-09-15 Thread Dave Cook
On 2013-09-14, Wolfgang Keller felip...@gmx.net wrote:

 If much of the code for a GUI is boiler-plate, busy-code etc. than I
 would suggest that the framework is not really as efficient as it
 should be.

There are very few Python GUI frameworks as such.  They are almost all
just toolkits, not frameworks in the sense of, say, Django.

Enthought has some interesting GUI framework projects which I haven't
tried:

http://code.enthought.com/projects/

Dabo would be another example.

Dave Cook

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python GUI?

2013-09-12 Thread Dave Cook
On 2013-09-12, Michael Torrie torr...@gmail.com wrote:
 Not me.  wxWidgets' event model is way too MFC-esque for me.  Does it
 still use event numbers that you define?  Shudder.

You don't have to define IDs explicitly.  That's been the case for a
long time.

 Gtk and Qt's method of signals and slots is by far the most powerful and
 flexible.

wxPython's event manager adds some flexibility.

Dave Cook
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python GUI?

2013-09-12 Thread Dave Cook
On 2013-09-12, Dave Cook davec...@nowhere.net wrote:
 There's also a markup language available, enaml:

 http://docs.enthought.com/enaml/

I should have mentioned that it's *Python*-based markup, not an XML
horrorshow.

http://pyvideo.org/video/1231/enaml-a-framework-for-building-declarative-user

Dave Cook
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python GUI?

2013-09-12 Thread Dave Cook
On 2013-09-12, Robert Kern robert.k...@gmail.com wrote:

 There is nothing forcing you to use the GUI designers if you don't want to.

There's also a markup language available, enaml:

http://docs.enthought.com/enaml/

Dave Cook
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-21 Thread Dave Cook
On 2013-07-20, Aseem Bansal asmbans...@gmail.com wrote:

 Do I need to use QtCreator with PySide if I want drag-and-drop
 feature for GUI development? 

No, you just need the layout part of QtCreator, called QtDesigner, and
any decent Python editor or IDE (e.g. Idle):

http://wiki.python.org/moin/IntegratedDevelopmentEnvironments

There's another Qt IDE that uses QtDesigner called Monkey Studio
(seems to be PyQt only).

Designers can be really nice for learning the toolkit widgets and
layout, but I'd like to get away from them in my own projects,
actually, and move to something like enaml:

http://docs.enthought.com/enaml/

 Do I need to install Qt? If yes, which version - 4.8 or 5.1? 

PySide does not support 5.x yet, according to their website.  I
installed the PySide windows download, and it seems to work without
needing any Qt packages.

 Can I use cxfreeze to make exe files from the GUI developed? 

Probably.  We use py2exe for our wxPython/numpy application. 
Depending on the complexity and number of external modules used by
your application, bundling tools like this can require some google-fu
and trial and error to get working.  

http://qt-project.org/wiki/Packaging_PySide_applications_on_Windows

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-21 Thread Dave Cook
On 2013-07-21, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote:

 …and one more thing: pyside-uic, for transforming the .ui files into
 (ugly) .py files.  It seems to be in /PythonXY/Scripts according to
 Stack Overflow if you have PySide installed.

Also, it looks like it's possible to directly load the .ui files:

http://srinikom.github.io/pyside-docs/PySide/QtUiTools/QUiLoader.html

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Ideal way to separate GUI and logic?

2013-07-13 Thread Dave Cook
On 2013-07-13, fronag...@gmail.com fronag...@gmail.com wrote:
 I'm wondering what is the best, 'most pythonic' way 

I recommend PyPubsub:

http://pubsub.sourceforge.net/

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-05 Thread Dave Cook
On 2013-07-04, Aseem Bansal asmbans...@gmail.com wrote:

 I have been searching all over google but couldn't find any IDE that
 has drag-and-drop feature for Python GUI development.

If you want something like Visual Studio, you could try IronPython:

http://www.ironpython.net/tools/

For any moderatley complex cross-platform application, I would suggest
moving on to wxPython, PyQt, or PySide (the latter two both based on
Qt).  Then try wxFormBuilder, wxGlade, or Qt Designer.

Generally, I'd prefer using PyQt/PySide, because Qt has the more
uniform API.  I use wxPython for commercial work because it had the
more liberal license at the time I started using it (PySide was not
available at that time).  

As far as features and maturity go, I think both wx and Qt are fairly
equal. Qt has become more popular for scientific work.

PyGtk and Glade are another option, particularly on Linux, though I
think wx or Qt still have better compatibility with Win32 or OS X.  

For OS X only, PyObjC and XCode are an option.

While they are a tool that can save time, it's pretty easy to bump
into the limitations of form designers.  It's best to lower ones
expectations about how much coding can be offloaded onto a form
designer.

http://sourceforge.net/projects/wxformbuilder/
http://qt-project.org/doc/qt-4.8/designer-manual.html
http://wxglade.sourceforge.net/

 I came across somewhere that eclipse's pydev plugin can be used but
 couldn't find anything on its website.

The only form builders for Eclipse that I'm aware of are for Swing or
SWT.  You would need to use Jython (if you want to stick with a Python
implementation) to interface with these.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN] IPython 0.13 is officially out!

2012-07-01 Thread Dave Cook
On 2012-07-01, Virgil Stokes v...@it.uu.se wrote:
 I have tried to update 0.12 in Ubuntu 12.04 but as of now it can not find 
 0.13. 
 Any suggestions on how to get it into Ubuntu 12.04 would be appreciated.

Install pip and use it to upgrade ipython:

sudo apt-get install python-pip
sudo pip install --upgrade ipython

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


multiprocessing: excepthook not getting called

2012-06-12 Thread Dave Cook
Why doesn't my excepthook get called in the child process?

import sys
import multiprocessing as mp

def target():
name = mp.current_process().name
def exceptHook(*args):
print 'exceptHook:', name, args
sys.excepthook = exceptHook
raise ValueError

if __name__=='__main__':
p = mp.Process(target=target)
p.start()
p.join()
# try it here in main
target()

Thanks,
Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: what gui designer is everyone using

2012-06-07 Thread Dave Cook
On 2012-06-05, Mark R Rivet markrri...@aol.com wrote:
 I want a gui designer that writes the gui code for me. I don't want to
 write gui code. what is the gui designer that is most popular?
 I tried boa-constructor, and it works, but I am concerned about how
 dated it seems to be with no updates in over six years.

I've been using wxFormBuilder since last summer.  It's reasonably easy
to use, and there are regular releases by the developers. 

I have a coworker who's had a lot of success using Boa for everything.
It would be a shame if Boa is allowed to bitrot in to complete
unuseability.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Dave Cook
On 2011-07-10, Ivan Kljaic iklj...@gmail.com wrote:
 a lot of times. But seriously. Why is the not even one single RAD tool
 for Python. I mean what happened to boa constructor that it stopped
 developing. I simply do not see any reasons why there isn't anything.

I prefer spec-generators (almost all generate XML these days) like
QtDesigner to code-generators like Boa. I've only seen one good
argument for code generation, and that's to generate code for a layout
to see how it's done.  But code could always be generated
automatically from a spec.

I already have an editor I like, I don't see the need to tie GUI
layout to a code editor.  If you want something with more
sophisticated Python specific features, there's PyDev.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python gui builders

2009-11-18 Thread Dave Cook
On 2009-11-18, sturlamolden sturlamol...@yahoo.no wrote:

 GPL

If it's an issue for your project, I suggest wxPython.  It's
cross-platform, fairly complete, and extensible.  But the API is
clunky compared to Qt.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python gui builders

2009-11-17 Thread Dave Cook
On 2009-11-16, me not_h...@nowhere.com wrote:

 Also looked at the frames/forms created with QtDesigner, which 
 can be used by Python via pyuic. 

That's what I would recommend.  What did you not like about it?

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Choosing GUI Module for Python

2009-11-10 Thread Dave Cook
On 2009-11-09, Antony anthonir...@gmail.com wrote:

  1. PyGTK
  2. PyQT
  3. PySide
  4.  wxPython
  5 . TKinter

For cross-platform work, I'd choose either PyQt or wxPython.

If you're not too worried about the dual license, I find PyQt the best
combination of ease of use and features, particularly when used with
Qt Designer.

For commercial work, I'd use wxPython, which has a very liberal
license.  It's fairly featureful, but not very pleasant to use.

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cross-platform GUI development

2007-10-13 Thread Dave Cook
On 2007-10-13, David Tremouilles [EMAIL PROTECTED] wrote:

  I would recommend pyGTK http://www.pygtk.org/

Native GTK on OSX is still in its infancy.  For early adopters only at
this point.  See

http://www.oreillynet.com/articles/author/2414

That leaves PyQt and WxPython as the only other realistic choices.
Licensing issues aside, I think Qt has the most polished and well
thought out API.  The OSX Tiger dev tools include WxPython, though you
may want to install a newer version.  I suggest installing both and
trying some of the included examples.

Another possibility is Jython, if you like the Java way of doing
things.  

Dave Cook





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cross-platform GUI development

2007-10-13 Thread Dave Cook
On 2007-10-13, David Tremouilles [EMAIL PROTECTED] wrote:
 No issue with pygtk on mac!

If running on top of X11 is no problem. 

 Actually I develop on this platform everyday. Macport take care of the
 installation for me http://www.macports.org/ (Fink should do the work
 too).

In that case I'd recommend kiwi as well

http://www.async.com.br/projects/kiwi/

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Hot subject: a good python editor and/or IDE?

2007-08-20 Thread Dave Cook
On 2007-08-19, Sébastien [EMAIL PROTECTED] wrote:

 I am currently using Eclipse+PyDev when developping Python projects but 
 I lack a fast, simple editor for tiny bit of scripts. So here is my 
 question: what is, for you, the current best ( but still kind of light! 
 ) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking 
 for a linux compatible editor.

JED has a nice python mode for fast, simple editing.  

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pygtk: how to make a screenlocking window?

2007-03-29 Thread Dave Cook
On 2007-03-28, André Wyrwa [EMAIL PROTECTED] wrote:

 can anyone please point me to the relevant pygtk window properties i
 need to set to make a window
 - fullscreen
 - stay in front
 - grab all input focus
 so that i can use it as a screen lock the likes that gksu or
 gnome-power-manager do?

See the reference page for gtk.Window:

http://pygtk.org/docs/pygtk/class-gtkwindow.html

Methods of interest are fullscreen(), set_modal(), set_type_hint(),
set_keep_above().

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Beginner GTK question

2007-03-25 Thread Dave Cook
On 2007-03-25, dashawn888 [EMAIL PROTECTED] wrote:

 gui.py:79: GtkWarning: Quit: missing action
   menubar = uimanager.get_widget('/MenuBar')

   menuitem name=Quit/

This should probably be action=Quit.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help Required for Choosing Programming Language

2007-02-18 Thread Dave Cook
On 2007-02-16, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 i have read about Python, Ruby and Visual C++. but i want to go
 through with GUI based programming language like VB.net

You might take a look at http://dabodev.com

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [Linux] What toolkit for a good grid/spreadsheet widget?

2006-08-04 Thread Dave Cook
On 2006-08-04, Vincent Delporte [EMAIL PROTECTED] wrote:

 Thx for the two pointers. Are those widgets more than just tables, ie.
 can I edit the contents, including displaying a combo box, can items
 be grouped or hierarchized, or are they just basic, read-only tables
 to display results?

You can display combo boxes in cells in pygtk, as well as edit cells.

But both pyqt and wxpython also offer that.  Try running the demos for each.

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Which Python API for PostgreSQL?

2006-08-04 Thread Dave Cook
On 2006-08-04, Redefined Horizons [EMAIL PROTECTED] wrote:

 What are the advanatages and disadvantages of each? Which one do you
 use? What do you like about it?

I would use psycopg:

http://www.initd.org

I believe it's the most full-featured postgres module.  There's a windows
installer.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python database access

2006-06-26 Thread Dave Cook
On 2006-06-26, Serge Orlov [EMAIL PROTECTED] wrote:
 On 25 Jun 2006 21:19:18 -0700, arvind [EMAIL PROTECTED] wrote:

 I am going to  work on Python 2.4.3 and MSSQL database server on
 Windows platform.

 The module you're looking for is the first result if you search
 python mysql on google or if you search mysql on python package
 index http://www.python.org/pypi

I think he meant Microsoft SQL Server.  In which case, google searches on
python mssql and python odbc should be helpful.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Entity GUI tool?

2006-06-25 Thread Dave Cook
On 2006-06-22, icebear [EMAIL PROTECTED] wrote:

 Ubuntu Drake comes with or allows you to install something called entity
 which sounds like it ought to be the world's ultimate Python GUI tool. 

Looks like it only supports gtk 1.2.

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python texts?

2006-06-17 Thread Dave Cook
On 2006-06-17, nate [EMAIL PROTECTED] wrote:

 reading Learning Python 2nd edition by O'Reilly. I am enjoying it at the 

I'd get the Python Cookbook, next.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: a good programming text editor (not IDE)

2006-06-15 Thread Dave Cook
On 2006-06-15, John Salerno [EMAIL PROTECTED] wrote:

 I know there's a request for a good IDE at least once a week on the ng, 
 but hopefully this question is a little different. I'm looking for 
 suggestions for a good cross-platform text editor (which the features 
 for coding, such as syntax highlighting, etc.) but not a full IDE with 
 all the fancy jazz (GUI developer, UML diagrams, etc.).

For something very light, jed has a pretty good python mode that is based on
the emacs python-mode.

I still swear by XEmacs with python-mode, though I do wish for intelligent
code completion sometimes (pycomplete just gives me errors).  The XEmacs
features that keep me from switching to Gnu Emacs are buffer tabs and
hyperlinked error messages.

Most IDEs are rather weak as text editors compared to emacsen.

On the Mac, you might try Aquamacs; though I don't like the default
behavior, a new user would probably have less of a problem with it.

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: a good programming text editor (not IDE)

2006-06-15 Thread Dave Cook
On 2006-06-15, Dave Hansen [EMAIL PROTECTED] wrote:

 Very small, very fast, very powerful, and very portable (though I'm
 not sure about Mac...): Take a look at Jed from www.jedsoft.org.

 You might not find it pretty, however...

But if your distro includes xjed (ubuntu/debian, but not newer fedoras) try

xjed -fn mono -fs 16

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python / glade fundamentals

2006-03-16 Thread Dave Cook
On 2006-03-16, Doug [EMAIL PROTECTED] wrote:

 Can someone tell me why I do not get a connection between the events and
 the functions in the sample below.  GUI window appears OK, just no
 connections seem to be made.
 I am new to this so may be missing something fundamental. 

This might be relevant:

http://www.async.com.br/faq/pygtk/index.py?req=showfile=faq03.003.htp

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK

2006-02-09 Thread Dave Cook
On 2006-02-08, Huy [EMAIL PROTECTED] wrote:

 Hi, I'm new to Python, and GUI development, but am no novice to backend
 programming.  Aside from mastering the standard language, I will
 eventually be developing applications dealing with images and controls.
  Thus forth I have been testing out PyGTK  it appears to be quite
 robust (that and I like the fact of cross-platform compatibility).

This article may be of interest

http://pygtk.org/articles/bitpodder/BitPodder.htm

particularly the last section on how to create an EXE from your pygtk program.

Found at 

http://pygtk.org

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python, GUI, and GTK+

2006-02-06 Thread Dave Cook
On 2006-02-05, Piotr Husiatynski [EMAIL PROTECTED] wrote:

 I'm new at GUI programming. I've heard about Gazpacho but I couldn't find
  any tutorial about it on Internet (even on the gazpacho page). Becouse of
 that fact, I've installed Glaze, but there's probably no tutorials for
 python too.
 Can anyone point me an introdutory tutorial on how to implement a very
 simple application in GTK+ based on a XML file?

Gazpacho tries to follow Glade closely, but adds some things like support
for actions and kiwi widgets.  So look for tutorials on Glade, and then read
up on actions.  Then what Gazpacho is trying to do should be more clear.

You should be able find everything you need at pygtk.org in the righthand
sidebar.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython in Action book

2006-01-24 Thread Dave Cook
On 2006-01-24, Iain King [EMAIL PROTECTED] wrote:
 New book on wxPython: http://www.manning.com/books/rappin

 Release date of this month.  Does anyone know if it's out yet / has
 anyone read it and has an opinion?

Someone (the author?) on the wxpython-users mailing list said it was delayed
by 6 weeks.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Object-Relational Mapping API for Python

2005-11-01 Thread Dave Cook
On 2005-11-01, Aquarius [EMAIL PROTECTED] wrote:

 I explored Java's Hibernate a bit and I was intrigued by how you can
 map entity objects to database tables, preserving all the relations and
 constraits. I am interested if there is something like this for Python
 - I noticed some APIs in the Cheeseshop, but most of them were alpha,
 better, or seemed to be forsaken a long time ago. Can you recommend me
 anything?

SQLObject is quite mature and actively maintained.  I have to say that I
don't care for ORMs much (or at least many of the Python ones); you usually
lose a lot of the power of relational databases.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Any Pythonic GTK Undo library?

2005-10-29 Thread Dave Cook
On 2005-10-29, Tony Nelson [EMAIL PROTECTED] wrote:

 I'm looking for a pythonic GTK Undo library/class.  It would have a 

You might ask the authors of Kiwi if they plan to add undo/redo.  Or help
them add it if you can.

http://www.async.com.br/projects/kiwi/

It would be great to have this feature in the Gtk C API, though.  I do see
some relevant bugzilla entries:

http://bugzilla.gnome.org/show_bug.cgi?id=316551

You might want to make a new request for a general undo/redo interface.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python vs Ruby

2005-10-19 Thread Dave Cook
On 2005-10-20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Languages are very similar but Python has more cale avaliable. Much
 more.

Cale?  You mean Python has more ruffage?

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: O'Reilly book on Twisted

2005-09-14 Thread Dave Cook
On 2005-09-14, Steve M [EMAIL PROTECTED] wrote:

 Is this book fully up to date with Twisted 2.0?

Yes, according to an email from the author on the twisted-python mailing list

  Does the book cover Nevow at all?

Doesn't look like it.  More info here:

http://fettig.net/weblog/2005/06/30/my-book-on-twisted/
http://fettig.net/weblog/

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-24 Thread Dave Cook
On 2005-07-24, Torsten Bronger [EMAIL PROTECTED] wrote:

 Is PyGTK more Pythonic by the way?  

I find it more Pythonic than raw wxpython.  However, the API still has the
fingerprints of C programmers all over it.  Compare the gtk's clunky
treemodel/treeview API to Cocoa's elegant delegates.

There is a higher level interface for pygtk called kiwi:

http://async.com.br/projects/kiwi/

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-22 Thread Dave Cook
On 2005-07-22, TPJ [EMAIL PROTECTED] wrote:

 7. (...) The pygtk (and gtk port in general) does not yet support
 threading on windows. (...) GTK 2.0 is supposed to fix it but support
 isn't available *yet*. (...) May 17 2002

Pretty sure this hasn't been the case for a long time.  The current stable
version of gtk is 2.6.

 sure if PyGTK is stable on Windows... For now I know that wxPython runs
 well on Windows.

I've used pygtk with success on windows.  I suggest installing the gladewin
package and pygtk, then perhaps hacking some of the demos in the pygtk
distro.

http://gladewin32.sourceforge.net/index.php
http://www.pcpm.ucl.ac.be/~gustin/win32_ports/

One advocacy point: There are complete reference docs, an extensive
tutorial, and a constantly evolving FAQ for pygtk.

One point against: requires X11 on a Mac; definitely not native there,
though that's where I do a lot of my pygtk development.

 I be able to make an executable (using Py2Exe) of an application that
 uses PyGTK?

Yes.  http://www.async.com.br/faq/pygtk/index.py?req=showfile=faq21.005.htp

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python IDE

2005-07-19 Thread Dave Cook
On 2005-07-19, linuxfreak [EMAIL PROTECTED] wrote:

 you guys using and what do you think is the best IDE...or should i
 stick with Xemacs/emacs???

http://pydev.sf.net

You get the stability of Eclipse with that, but also the fat.

I swear I had code completion working in this, but last time I tried to set
it up I got frustrated and gave up, so put aside some time to learn your way
around Eclipse if you intend to use this.  I still don't feel quite at home
there.  

Personally, I don't find code completion compelling enough a feature to give
up my beloved XEmacs and python-mode. 

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Web Framework Reviews

2005-07-19 Thread Dave Cook
On 2005-07-19, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 On the other hand I even in its current form I don't see how I would to
 the simple things that I need every day. Create a session, set a
 cookie, redirect to another url,  perform HTTP autentication, create
 filter,  use another templating language? This is also integral part of
 the  functionality that I expect from an web framework. Web specific
 things exposed in some python ic way.

Take a look at the Nevow FAQ and examples.  Also, Nevow sits on top of
Twisted, so you have all of Twisted's features available.

http://divmod.org/users/wiki.twistd/nevow/moin.cgi/FrequentlyAskedQuestions

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OO design

2005-07-19 Thread Dave Cook
On 2005-07-19, chris [EMAIL PROTECTED] wrote:

 I've been scripting with python for a while now. Basically writing a few
 functions and running in the ipython shell. That's been very useful. But the
 more I do this the more I see that I'm doing more or less the same thing
 over and over again. 

When that happens, it's probably a good sign that you need to create a
module for that functionality.

As for OO in Python, IMO it's best just to dive in and not worry about being
methodologically correct at first.  Unfortunately, most books on OO use
static languages for their examples, which usually obscures concepts that
are extremely simple in Python.  Books using Smalltalk are not too bad,
though, for example _Smalltalk, Objects, and Design_ by Chamond Liu.

Book chapters on Python OO basics:

http://diveintopython.org/object_oriented_framework/index.html
http://www.ibiblio.org/g2swap/byteofpython/read/oops.html
http://www.pasteur.fr/formation/infobio/python/ch18.html

fraca7 series on design patterns, where the moral of the story is often
You don't need to do that in Python.:

http://fraca7.free.fr/blog/index.php?Python

Dave Cook






-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What is your favorite Python web framework?

2005-07-18 Thread Dave Cook
On 2005-07-17, Admin [EMAIL PROTECTED] wrote:

 I favor speed of development, intensive OO development, performance under  
 heavy load, short learning curve, good documentation and community.

I like the design of nevow (nevow.com), but I don't have any practical
experiences with other frameworks.  The documentation is not very good, but
folks on IRC have been helpful.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: PyDev 0.9.5 released

2005-06-29 Thread Dave Cook
On 2005-06-28, Fabio Zadrozny [EMAIL PROTECTED] wrote:

 PyDev - Python IDE (Python Development Enviroment for Eclipse) version 
 0.9.5 has just been released.

Does it work with the newly released Eclipse 3.1?

Dave COok
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: a dictionary from a list

2005-06-24 Thread Dave Cook
On 2005-06-24, infidel [EMAIL PROTECTED] wrote:

 dict((x, None) for x in alist)

Whoa, I thought dictionary comprehensions were still planned feature.  I
guess I gotta start paying closer attention.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database recommendations for Windows app

2005-06-23 Thread Dave Cook
On 2005-06-23, Peter Hansen [EMAIL PROTECTED] wrote:

 Your list didn't mention a few things that might be critical. 
 Referential integrity?  

You can implement it in sqlite with triggers.  I only bother with cascading
delete triggers, myself.

Type checking?  SQLite currently supports 
 neither.  

sqlite3 has a strict affinity mode, but I'm not exactly sure how one sets
it.

http://www.sqlite.org/datatype3.html

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database recommendations for Windows app

2005-06-23 Thread Dave Cook
On 2005-06-23, Joel Rosdahl [EMAIL PROTECTED] wrote:

 Or APSW http://www.rogerbinns.com/apsw.html.

Interesting.  I was hoping it would not have one pysqlite2 limitation: if
you have an empty database, cursor.description always returns None, even if
you have pragma empty_result_callbacks=1 (pysqlite 1.x doesn't have the
problem).  But apsw also requires data to be avaliable before you can get
column descriptions.

However, the tracing stuff and the various hooks you can set look really
interesting.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database recommendations for Windows app

2005-06-22 Thread Dave Cook
On 2005-06-22, Will McGugan [EMAIL PROTECTED] wrote:

 I'd like to write a windows app that accesses a locally stored database. 
 There are a number of tables, the largest of which has 455,905 records.

 Can anyone recommend a database that runs on Windows, is fast / 
 efficient and can be shipped without restrictions or extra downloads?

http://pysqlite.org

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Database recommendations for Windows app

2005-06-22 Thread Dave Cook
On 2005-06-22, Cameron Laird [EMAIL PROTECTED] wrote:

 Are you saying that Python-based applications are particularly
 vulnerable in this all-too-common scenario?  If so, I'm not
 getting it; why is the architecture described more fragile than
 more traditional Windows-oriented development patterns?  If not,
 then, ... well then I truly don't get your point.

Maybe the point is the downside of depending on installed DLLs rather than
shipping your own.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Migrating from Windows to OS X

2005-06-19 Thread Dave Cook
On 2005-06-18, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 How are the development tools for the Mac?  I'll use IDLE if it's
 available, but I like Scintilla better.

Idle is

/System/Library/Frameworks/Python.framework/Versions/2.3/bin/idle

First thing you want to do is install readline to make the interactive
interpreter useable:

http://pythonmac.org/packages/

Other things to try:
  Aquamacs with python-mode
http://www.aquamacs.org
http://sourceforge.net/projects/python-mode/
http://www.emacswiki.org/cgi-bin/wiki/CustomizeAquamacs (instructions)

I prefer a less aggressively aquafied emacs like:
  http://www.emacswiki.org/cgi-bin/emacs-en/CarbonEmacsPackage
but someone who has never used emacs before might not care.
   
  Eclipse + pydev:
http://www.eclipse.org
http://pydev.sourceforge.net/

  SPE or Eric3:
http://www.wordtech-software.com/python.html

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pysqlite - Checking the existance of a table

2005-06-19 Thread Dave Cook
On 2005-06-17, rh0dium [EMAIL PROTECTED] wrote:

 I am starting to play with pysqlite, and would like to know if there is
 a function to determine if a table exists or not.

sqlite_master has already been mentioned, so I'll point out some useful
pragmas (under Pragmas to query the database schema):

http://sqlite.org/pragma.html

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: extreme newbie

2005-06-19 Thread Dave Cook
On 2005-06-18, cpunerd4 [EMAIL PROTECTED] wrote:

 thanks all for the advice. The reason I was thinking about using java
 (or C or something) was that it is a little more secure than
 distributing the source code isn't it? 

sigh 14 and he already wants to horde his source code.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: extreme newbie

2005-06-19 Thread Dave Cook
On 2005-06-18, cpunerd4 [EMAIL PROTECTED] wrote:

 I see your point, although I don't think there is much a 14 year old
 can do to sue someone. . . I'm sure my code won't be that valuable
 untill I'm older though. Thanks

It's valuable as something to show prospective employers or clients: I wrote
and maintained blahblah.sourceforge.net and foobar.sourceforge.net.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie Here

2005-06-02 Thread Dave Cook
On 2005-05-31, Mark Sargent [EMAIL PROTECTED] wrote:

 for the same things, what do you primarily use it for. Could you show me 

Web apps using nevow/twisted for work, and pygtk apps for fun.

You might browse around sourceforge a bit:

http://sourceforge.net/softwaremap/trove_list.php?form_cat=178

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Which IDE is recommended?

2005-05-02 Thread Dave Cook
On 2005-04-29, John J. Lee [EMAIL PROTECTED] wrote:

 Dave Cook [EMAIL PROTECTED] writes:
 Pydev has some compelling features, but I wish I didn't have to run eclipse

 On 2005-04-27, monkey [EMAIL PROTECTED] wrote:
 What are those compelling features of Pydev, for an emacs user?

For me, the code completion feature.  Also, modern anti-aliased font
rendering under Linux doesn't hurt.

Emacs python-mode is still ahead on code formatting.  For example, the way
you can line up code by hitting tab once anywhere on the line.  And I miss
emacs things like M-^ (delete-indentation; joins the line to the previous
line and removes whitespace).  

Eclipse has an emacs keybinding mode, but it's not very comprehensive.

I'm not ready to switch, but I played around enough to know I could get
fairly comfortable if I wanted to.

I exaggerated memory usage a bit.  Eclipse only uses about twice as much RAM
as XEmacs on my Linux box.  Still, I probably wouldn't find it as usable if
this wasn't an AMD64 3200 with 1G RAM.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OOP

2005-04-28 Thread Dave Cook
On 2005-04-28, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I'm new to Python and I love it. Now I can get most of the topics
 covered with the Python tutorials I've read but the one thats just
 stumping me is Object Orientation. I can't get the grasp of it. Does
 anyone know of a good resource that could possibly put things in focus
 for me? Thanks.

I haven't seen anything specifically written for Python that gets much
beyond the mechanics.

One of the best books I've read on OOP is _Smalltalk, Objects, and Design_
by Chamond Liu.  It would be nice to have something like that for Python.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Which IDE is recommended?

2005-04-27 Thread Dave Cook
On 2005-04-27, monkey [EMAIL PROTECTED] wrote:

 Read through python site for programming tool, really plenty of choices :-)
 (For c++, I just can't breath with very very limited choices)

 Tried Spe, it come with wxGlade built-in very nice(is Spe still actively
 develop?). But seem that Boa Constructor and PyDev(the plug-in for Eclipse)
 also worth looking. Actually which one are you guys using? and why? I think
 it is also valuable for those who are new to python as me.

Pydev has some compelling features, but I wish I didn't have to run eclipse
to get them.  I use XEmacs.  Once upon a time emacs was considered bloated,
but it's tiny compared to eclipse.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Glade for Windows and Python

2005-04-15 Thread Dave Cook
On 2005-04-15, Richard Lyons [EMAIL PROTECTED] wrote:

 Has anyone been successful in using Glade for Windows with Python?

Yes, it works fine.

http://gladewin32.sourceforge.net/
http://www.pcpm.ucl.ac.be/~gustin/win32_ports/

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: workaround for generating gui tools

2005-04-10 Thread Dave Cook
On 2005-04-09, flupke [EMAIL PROTECTED] wrote:

 i create my GUIs mainly via wxGlade. However when you start of to 
 program and want to do some rearranging to the gui, wxglade overwrites 
 your file and you've got to put your own code back in.

How about generating XRC files instead of Python?  I admit I've never tried
it with wxGlade, so I don't know how well it works, but with the original
Glade one only uses XML, you can't generate Python at all.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What's the best GUI toolkit in Python,Tkinter,wxPython,QT,GTK?

2005-03-28 Thread Dave Cook
On 2005-03-27, Tom [EMAIL PROTECTED] wrote:

 1) Portable to Windows, Unix-like platforms, and the Macintosh;
 2) Powerful, GUI is very beautiful ;
 3) Efficiency of development is high;

 What's the best, Tkinter, wxPython, QT, GTK or other?

Don't forget Swing and SWT via Jython.  Of course that brings with it all
the joys and sorrows of Java.

GTK on the Mac (OS X) requires installing and running an X server (an X
server is included on Apple's OS X install discs, but not installed by
default; it can also be downloaded for free from Apple).  This may be enough
of an annoyance to turn some users off.  I've had success with using GTK on
win32, and it's very standard on Linux systems.

I'm not sure what the status of QT on OS X is.

Tkinter still seems viable for things that don't require a lot of complex
controls. Also, it has a very powerful canvas widget.  However, it won't
look very good on unix systems (no anti-aliasing, for one thing).

If you don't need a lot of complex controls, you might consider the embedded
webserver + browser route using CherryPy or Twisted.web + Nevow.

wxPython seems to have the best cross-platform support among CPython
toolkits, but it never seemed very Pythonic to me.  There's a higher-level
package called wax that aims to remedy that.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: what would you like to see in a 2nd edition Nutshell?

2004-12-30 Thread Dave Cook
On 2004-12-29, Alex Martelli [EMAIL PROTECTED] wrote:

 the coverage of Twisted and adding just a few things (numarray --

I'd rather have a whole book on Twisted :p.  But I'll take a more extensive
section in PiaN if I can't have it.

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best GUI for small-scale accounting app?

2004-12-23 Thread Dave Cook
On 2004-12-21, Paul Rubin http wrote:

 Dave Cook [EMAIL PROTECTED] writes:
 Web browser widgets seem pretty limited to me, though. 

 You might not care.

And in that case Tk is much simpler than just about anything else, unless
looks are really important.

 You don't even have something as simple as a combo box (i.e. an
 editable entry with a drop down),

 Just put an input field and a dropdown on the page.

Takes up twice as much space and is potentially confusing as the dropdowns
tend to look like real combo boxes in IE and Mozilla (only Konquerer seems
to make it visually clear that you can't edit the text.)  

 Also web development doesn't seem as coherent to me as development
 with a good GUI framework.

 I'm not sure what that means.  

Basically it means that I find it harder and less intuitive.  I don't think
I'm stupid, just pragmatically lazy.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Dave Cook
On 2004-12-20, Bulba! [EMAIL PROTECTED] wrote:

 I'll soon start development of a specialized small app and need 
 to choose GUI for it. 

I've had success with pygtk on win32 and Linux (and OS X with the X11
server installed.)

http://www.pcpm.ucl.ac.be/~gustin/win32_ports/
http://gladewin32.sourceforge.net/index.php (for the C devel and runtime
packages)

The pygtk manual, tutorial, and FAQ are all very good.  You don't have to
wade through C or C++ documentation.

The only complaints I have are that the glade GUI builder hasn't caught up
with gtk development (particularly the new UIManager), and that the list
widget is relatively slow.

Lately I've been evaluating jython and Swing, though.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Dave Cook
On 2004-12-20, Paul Rubin http wrote:

 I think I can put together a useable (but not visually stunning) web
 interface faster than I can put together any pure client-side
 interface.  

Web browser widgets seem pretty limited to me, though.  You don't even
have something as simple as a combo box (i.e. an editable entry with a drop
down), let alone the rich set of widgets something like wxwidgets offers.
Also web development doesn't seem as coherent to me as development with a
good GUI framework.

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Design Patterns

2004-12-02 Thread Dave Cook
Tony Ha [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]...
 Hello Dave,
 
 Thanks for pointing me to the Cookbook website.


  On 2004-11-29, Tony Ha [EMAIL PROTECTED] wrote:
 
   I wonder, can any Python guru out there translate the Java examples in

For anyone translating Java to Python, I think this article has good advice:

http://dirtsimple.org/2004/12/python-is-not-java.html

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Design Patterns

2004-11-30 Thread Dave Cook
On 2004-11-29, Tony Ha [EMAIL PROTECTED] wrote:

 I wonder, can any Python guru out there translate the Java examples in the 

Should be a good exercise, and not just for gurus ;}.

 book into Python examples, or write a similar book in Python, perhaps

I've also wished for a design patterns book aimed at Python, or at least
dynamic languages with first class functions and modules.  There's a paper
Python book with Patterns in the title, but it has precious little content
in it related to design patterns, at least not the GOF variety.

This web book has the word Patterns in it, too:

http://www.brpreiss.com/books/opus7/

But looks like it's mainly data structures.  

If you do a google search, and also search the Python Cookbook

http://aspn.activestate.com/ASPN/Python/Cookbook/

you can find examples of:

Singleton
Borg
Null
Factory
Observer (including a Publish/Subscribe recipe)
Memento
State
Decorator
Masquerading and Adaptation patterns (Alex Martelli paper)
Template (another Alex Martelli paper)
Chain of Responsibility
Proxy
Prototype

There must be good examples in actual source code out there, too.

 called Head First Design Patterns in Python. I think, this will be a 
 great addition to Python books, and a great benefit to Python community.

I just bought this book as well.  I must have adult ADD, because I do enjoy
the Head First format, though I disdained it at first.

 P.S. I am not sure is this the right news group to post this request.

Yup, this is the place. 

Dave Cook
-- 
http://mail.python.org/mailman/listinfo/python-list