ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-Tutor
python-Tutor
[Tutor] Help with vars()
by Charlie Clark other posts by this author
Aug 10 2001 8:37AM messages near this date
[Tutor] 1.5.2 threading, wxDialog and wxstaticText | Re: [Tutor] Help with vars()
I'd like to use vars() in together with a database command (Marc André 
Lemburg's mxODBC) but seem to have missed something.

articles = {'sternzeichen': 'Wassermann', 'text': 'Es wird besser', 
'headline': 'Horoskop f\xc3\xbcr Peter'}

when I use
insert = "%headline, %text, %sternzeichen" %vars(articles)

I get a TypeError:
TypeError: vars() argument must have __dict__ attribute

but articles is a dictionary... what screamingly obvious thing am I missing?

Charlie


_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Charlie Clark
Danny Yoo
Steven Burr
Charlie Clark
Steven Burr
Charlie Clark
lonetwin
Charlie Clark
Steven Burr

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved