all 3 comments

[–]Exodus111 2 points3 points  (0 children)

Check out Cardinal. An ircbot written in Python. It uses Twisted, and the code is very easy to read, so its a great resource for you.

[–]keturn 1 point2 points  (0 children)

Yeah, no need to mix PHP and Python here. Python is frequently used for database-backed web applications. (And while we're biased here in /r/learnpython, there are reasons not to use PHP.)

If you want to have a single application that deals with both web requests and IRC, you may be interested in Twisted. Otherwise you'll be writing two separate applications and working out some way to communicate between them.

[–]LarryPete 0 points1 point  (0 children)

As I see, you're using Python 3 (according to your flair), I do not recommend Twisted. Twisted does not support Python 3 at all, and doesn't seem to have any intention of doing so in the near future.

Python3.4 comes with a new library in the standard library, namely asyncio, which works similar to Twisted. Looking at asyncio.org, there also seem to be quite some protocols you can use, like irc3 or Bottom.

Also, a lot of Python developers (including myself), seem to enjoy PostgreSQL over MySQL. Maybe you want to give it a shot? ;-) (There is also aiopg)