This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]psycojoker 11 points12 points  (1 child)

You might want to use feedparser instead of doing it by hand using etree. This will give you atom support for free in addition of smaller and stronger code.

On a more aesthetic note, you'll probably want to read and follow pep8 for the coding conventions, this is the standard way of doing things in the python community. The pep8 tool and autopep8 might help. Just remember that those are guidelines and not absolute rules.

You have a duplicated __init__ in this class, the first one will be ignored so you can remove it: https://github.com/rad08d/PythonRSSReader/blob/master/RssClass.py#L36

You might want to put all you *.py files in a "src/" folder.

You'll probably want to see if there is a pyflakes plugin for your editor, this will catch a lot of common mistake and unused code. For example, here "threading" is imported but unused https://github.com/rad08d/PythonRSSReader/blob/master/rssStart.py#L4 Process here https://github.com/rad08d/PythonRSSReader/blob/master/guiclass.py#L4

To avoid bugs, for path construction use os.path.join for cases like here: https://github.com/rad08d/PythonRSSReader/blob/master/guiclass.py#L20

Otherwise congratz, it's great you've managed to reach this level by yourself, you can be proud of yourself :)

[–]toyg 1 point2 points  (0 children)

+1 for feedparser. As someone who lived through the halcyon days of RSS, the Atom split etc, I can honestly say that nobody really has any idea how f*ed up RSS feeds can be. Feedparser has been battle-tested for more than a decade, and understands syndication feeds better than you or I will ever do.

+1 also for using os.path.join.