print is not a function

Gerrit Holl gerrit at nl.linux.org
Wed Oct 8 13:58:56 EDT 2003


Karl Scalet wrote:
> So my own (best??) solution is:
> 
> >>> from pprint import pprint as prt # cannot overcome this line :-(
> >>> from qt import * # now the secret unveils
> >>> [ prt(x) for x in locals() if x[:2]=='QA' ]
> # sorry Signore Alex, but it's shorter than startswith :-)
> # gives me
> >>> 'QAssistantClient'
> >>> 'QAccel'
> >>> 'QActionGroup
> >>> 'QApplication'
> >>> 'QAction'
> >>> [None, None, None, None, None] # well, I can live with
> 
> In the case of doing such interactive inspections, i don't
> mind about potential side-effects, i actually don't see them here.

How about:

import qt
pprint.pprint(qt)

?

Gerrit.

-- 
138. If a man wishes to separate from his wife who has borne him no
children, he shall give her the amount of her purchase money and the dowry
which she brought from her father's house, and let her go.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
	http://www.sp.nl/





More information about the Python-list mailing list