Help! Identical code doesn't work in Wing IDE but does in Komodo.

2006-04-20 Thread fyleow
I create a new Python file with the following using Wing IDE. import feedparser d = feedparser.parse("http://feedparser.org/docs/examples/atom10.xml";) print d.feed.title I get this error when I debug. AssertionError: Traceback (innermost last): File "c:\Documents and Settings\abc\Application

i18n hell

2006-04-23 Thread fyleow
I just spent hours trying to figure out why even after I set my SQL table attributes to UTF-8 only garbage kept adding into the database. Apparently you need to execute "SET NAMES 'utf8'" before inserting into the tables. Does anyone have experience working with other languages using Django or Tur

Elegent solution to replacing ' and " ?

2006-05-05 Thread fyleow
I'm trying to replace the ' and " characters in the strings I get from feedparser so I can enter it in the database without getting errors. Here's what I have right now. self.title = entry.title.encode('utf-8') self.title = self.title.replace('\"', '\\\"') self.title = self.title.replace('\'', '\\

Re: Elegent solution to replacing ' and " ?

2006-05-06 Thread fyleow
I'm using PyGreSQL on a PostgreSQL db. I didn't even include my SQL but Serge guessed right and that's what I had. I changed it and it works now. Thanks for the help! :) -- http://mail.python.org/mailman/listinfo/python-list

Should I learn Python instead?

2006-04-14 Thread fyleow
Hi guys, I'm a student/hobbyist programmer interested in creating a web project. It's nothing too complicated, I would like to get data from an RSS feed and store that into a database. I want my website to get the information from the database and display parts of it depending on the criteria I

Re: Should I learn Python instead?

2006-04-15 Thread fyleow
Thanks guys. I picked up the Apress book on Python and downloaded the Komodo IDE trial to get me started. I'm going to try using Django to build my website and since my brother already has hosting I'll just borrow some space. He does PHP for a living, so it would probably be better for me to use

How do I ignore the errors thrown by the DB api?

2006-06-13 Thread fyleow
Here's the code I have in place right now. cursor.execute("SELECT link FROM feeds_feed WHERE link=%s", (self.link,)) db.commit() if cursor.rowcount == 0: cursor.execute("INSERT INTO feeds_feed (release_group, title, link, category, pub_date) VALUES (%s, %s,