diff options
| author | 2015-06-27 14:10:34 -0400 | |
|---|---|---|
| committer | 2015-06-27 14:10:34 -0400 | |
| commit | b35098a2039e432efc5f4b22e4f9e6dcd08aa66b (patch) | |
| tree | 7f8131c659ce80cd7f0bc72e0f11aeab86b66902 | |
| parent | df7830e8a9278588b878f9226752dae1cf79e099 (diff) | |
| download | pyrc-1.0.0.tar.gz pyrc-1.0.0.tar.bz2 pyrc-1.0.0.zip | |
| -rw-r--r-- | README.md | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ff3a957 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# PyRC # + +An IRC library written in Python + +## License ## + +[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause). See LICENSE. + +## Usage ## + +``` +#!/usr/bin/python + +import PyRC +import sys +import time + +Irc = PyRC.Client() + +Irc.connect(host='irc.example.com') + +# Give the server a moment to respond +time.sleep(2.0) + +print Irc.main_loop() + +Irc.join("#example) + +print Irc.main_loop() + +Irc.message('#example', 'PyRC Bot is listening') + +print Irc.main_loop() + +while True: + try: + msgs = Irc.main_loop() + if msgs: + for line in msgs: + print line + time.sleep(1.0) + msgs = [] + except KeyboardInterrupt: + Irc.quit('Powered by PyRC Bot') +``` + +<br /> +Copyright (c) 2009-2015, Daniel Washburn. All rights reserved. |