Re: [PyQt] Global Interpreter Lock

2009-04-11 Thread Chris Withers

Jason Voegele wrote:
I answered this in my reply to Giovanni.  My QThread derivatives are in 
Python.  From what I've read so far, that sounds like bad news. :(


Well, only in so much as you should spawn of processes to do this 
work... Encoding sounds like something that should be pretty easily 
wrapped up in separate spawnable processes.


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Re: Any Large PyQt Projects?

2009-02-20 Thread Chris Withers

Toby Dickenson wrote:

* Startup time while your modules are imported. Plan to have a splash screen
with a progress bar :-(


How do you do this with PyQt?

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Scripting framework and licensing

2009-02-19 Thread Chris Withers

Giovanni Bajo wrote:

http://code.activestate.com/recipes/496746/


The RestrictedPython package is probably a more robust and maintained 
version of this...


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt4.Qtcore defines 'hex'

2009-01-07 Thread Chris Withers

Neal Becker wrote:
If the pyqt examples did not use *, and if you could import a useful enough 
subset without doing that, I'd agree.  If the suggestion is to explicitly 
qualify everything, I don't think that's reasonable.


Yes, python, well know for believing that implicit is better than 
explicit ;-)


Chris . o O ( import this )

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt4.Qtcore defines 'hex'

2009-01-07 Thread Chris Withers

Phil Thompson wrote:

This has been discussed thousands of times and it starts getting
annoying. 
Yes, it is annoying that all the example code continues to be in a form 
that confuses users trying to learn PyQt.


*None* of the PyQt4 examples uses star imports.


Hmmm, apologies then, must have been exclusively a problem with Mark 
Summerfield's tutorial stuff.


(and in my previous mail when I said "David" I actually meant "Mark", 
happy new year ;-) )


FWIW, I still think sticking a _ on the end of the name is silly...

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt4.Qtcore defines 'hex'

2009-01-07 Thread Chris Withers

Giovanni Bajo wrote:

On mer, 2009-01-07 at 09:26 +, Chris Withers wrote:

Phil Thompson wrote:

On Tue, 06 Jan 2009 14:19:50 -0500, Neal Becker 
wrote:

A bit nasty, since I see (and follow) lots of examples that say:
from PyQt4.QtCore import *

This redefines the builtin hex.

Check the Roadmap.
Appending a _ just to make an unpleasant style of programming work seems 
like a pretty silly idea.


I, along with everyone else who's tryng to learn a new python package, 
absolutely *hate* "from x import *" as it makes it much more difficult 
figure out where something is coming from.


So don't use it.


You rather miss my point.

I don't ever use star imports anyway.

However, like most people, I learn by example, and when the examples 
contain exclusively start imports, they are much less helpful than they 
could be.


It's a shame PEP8 doesn't make a pronouncement on this. PEP 328 is 
pretty clear though...



This has been discussed thousands of times and it starts getting
annoying. 


Yes, it is annoying that all the example code continues to be in a form 
that confuses users trying to learn PyQt.



There are many people (including myself and all our customers)
that simply love using star-imports with PyQt, since the leading Q* on
most symbols is already a clear enough indication of where the symbol is
coming from.


What you and/or your customers do in the privacy of your own homes and 
offices is none of my concern ;-)



Appending the underscore to those symbols is a perfect fix IMO. I don't
see why people that don't use star-imports in the first place should
care about it at all.


Because it looks butt ugly for no reason.

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt4.Qtcore defines 'hex'

2009-01-07 Thread Chris Withers

Phil Thompson wrote:

On Tue, 06 Jan 2009 14:19:50 -0500, Neal Becker 
wrote:

A bit nasty, since I see (and follow) lots of examples that say:
from PyQt4.QtCore import *

This redefines the builtin hex.


Check the Roadmap.


Appending a _ just to make an unpleasant style of programming work seems 
like a pretty silly idea.


I, along with everyone else who's tryng to learn a new python package, 
absolutely *hate* "from x import *" as it makes it much more difficult 
figure out where something is coming from.


I did raise this with David when this very issue tripped me and a number 
of other people up at the PyConUK tutorial last year.


If this were done sanely, you'd likely have:

from PyQt4.QtCore import hex

...somewhere, which, if it's causing problems, can easilly be changed to:

from PyQt4.QtCore import hex as qt_hex

Or, if you don't want do have a load of import statements, you can use 
the style that xlrd seems to prefer:


from PyQt4 import QtCore
...
QtCore.hex(...)

Either way, you end up knowing where stuff if coming from...

cheers,

Chris (who's still putting off using PyQt as he's dreading fighting his 
way through a load of *'s)


--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] newbie questions...

2008-08-22 Thread Chris Withers

David Boddie wrote:

http://www.riverbankcomputing.com/software/sip/intro


IS there no way to package up an application such that you don't need to
  seperately install python, pyqt4 and then the app?


In theory:

http://www.diotavelli.net/PyQtWiki/Deploying_PyQt_Applications


Cool, thanks for these. I assume I'll see you at PyConUK?
(http://www.pyconuk.org/)

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] newbie questions...

2008-08-16 Thread Chris Withers

Andreas Pakulat wrote:

Get it from your distribution under linux or use the ready-made
installer from Phil for windows. I don't know what the state on MacOSX
is. In worst case you're fetching sip+pyqt4 


what's sip?

- How do I package an app up that uses PyQt4 as a double-click-installer  
for non-technical users?


Same as the first thing above: They should use the PyQt4 installer from
Phil or distro packages and then just execute your python script.


IS there no way to package up an application such that you don't need to 
 seperately install python, pyqt4 and then the app?


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] newbie questions...

2008-08-16 Thread Chris Withers

Phil Thompson wrote:

PyPI is a PIA to use when you are not using eggs.

Okay, let me rephrase: how come PyQt4 isn't available as an egg?
(for the record, I hate eggs, but the python community has adopted them, 
so I'm just attempting to put up and shut up. zc.buildout does offer 
some analgesic for the agony)


It's never seemed important. I'm also not sure that distutils is up to the
job of building PyQt.


Oh? How so?

This does bring me back to my question about how you build/distribute 
applications that use Qt/PyQt4/etc in a way that a windows or mac user 
might expect?



PS: You going to be at PyConUK?


Yes.


Cool, I do hope I can bend your ear about all this. I'm gonna see if I 
can make the tutorials too :-)


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] newbie questions...

2008-08-12 Thread Chris Withers

Andreas Pakulat wrote:
- how come PyQt4 isn't on PyPI? (Nowadays I'm used to just specifying  
packages as egg requirements in a buildout.cfg  
(http://buildout.zope.org/) but I guess I can't do that with PyQt4?)


Because so far there's little interest in that I think, plus PyQt4
doesn't use distutils/setuptools and hence one would need to change the
buildsystem first probably.


Hmm, I meant to ask this in my reply to Phil, but I guess it makes sense 
here...


So, given all this:

- how do I install PyQt4 and any dependencies it has as someone who 
wants to develop some guis for apps I have?


- How do I package an app up that uses PyQt4 as a double-click-installer 
for non-technical users?


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] newbie questions...

2008-08-12 Thread Chris Withers

Phil Thompson wrote:
That seems weird to put it politely. I would have thought they both had 
the same interfaces?


It's not a technical limitation. It is to prevent people developing a
commercial product with the GPL version and then switching to the
commercial version at the last minute. The PyQt commercial license has the
same restriction. In reality we would be open to discussion (usually
involving backdating the purchase of the commercial licenses).


Heh, I'd *love* to see this one come to court ;-)
Seriously, I'm all for licensing that sees companies rewarded for their 
hard work, but I'd be seriously interested in how this would be argued 
in court...


Thankfully all the stuff I'm developing is open source, so I don't have 
that problem :-)



Anyway, some questions:

- where do I get the Qt Designer from?


It's part of Qt.


Is this Qt for Java or Qt for C++? Which one do I install?

- how come PyQt4 isn't on PyPI? (Nowadays I'm used to just specifying 
packages as egg requirements in a buildout.cfg 
(http://buildout.zope.org/) but I guess I can't do that with PyQt4?)


PyPI is a PIA to use when you are not using eggs.


Okay, let me rephrase: how come PyQt4 isn't available as an egg?
(for the record, I hate eggs, but the python community has adopted them, 
so I'm just attempting to put up and shut up. zc.buildout does offer 
some analgesic for the agony)


cheers,

Chris

PS: You going to be at PyConUK?

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] newbie questions...

2008-08-08 Thread Chris Withers

Hey All,

Apologies for the newbie questions, I'm still trying to decide what gui 
toolkit I want to use and so would like to give Qt4 a go. Everything I 
do is in python, so that leads me to PyQt4 ;-)


I'm currently doing entirely open soruce development on Windows. 
However, I wouldn't like to rule out developing some commercial apps 
later. What's the licensing position on this? This, from the Trolltech 
website was more than a little weird:


"""
The Commercial License does not allow you to incorporate code developed 
with the Open Source Editions of Trolltech software into a proprietary 
project

"""

That seems weird to put it politely. I would have thought they both had 
the same interfaces?


Anyway, some questions:

- where do I get the Qt Designer from?

- how come PyQt4 isn't on PyPI? (Nowadays I'm used to just specifying 
packages as egg requirements in a buildout.cfg 
(http://buildout.zope.org/) but I guess I can't do that with PyQt4?)


thanks for any help!

Chris :-)

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyKDE] Cant install PyKDE

2005-08-31 Thread Chris Withers

Output is as follows:


PyKDE version 3.11.3
  ---

Python include directory is /usr/include/python2.4
Python version is 2.4.0

sip version is 4.2.1 (4.2.1)

Qt directory is /usr/lib/qt-3.3
Qt version is 3.3.4

PyQt directory is /usr/share/sip
PyQt version is 3.14.1 (3.14.1)

KDE base directory is /usr
KDE include directory is /usr/include/kde
KDE lib directory is /usr/lib
KDE version is 3.4.2 (0x30402)

PyKDE modules will be installed in /usr/lib/python2.4/site-packages
PyKDE .sip files will be installed in /usr/share/sip

PyKDE modules to be built:
  dcop kdecore kdesu kdefx kdeui kio kutils kfile kparts khtml kspell
kdeprint kmdi

Generating the C++ source for the dcop module...
Creating the Makefile for the dcop module...

Generating the C++ source for the kdecore module...
sip: sip/kdecore/kshortcutlist.sip:85: There is already an enum in scope 
with

the same Python name
Error: Unable to create the C++ code.


___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde