mirror of https://github.com/Shizmob/pydle.git
Port pydle.utils.run to asyncio.
This commit is contained in:
parent
1934064ddb
commit
c5485195f6
|
@ -1,11 +1,14 @@
|
|||
## run.py
|
||||
# Run client.
|
||||
import asyncio
|
||||
import pydle
|
||||
from . import _args
|
||||
|
||||
def main():
|
||||
client = _args.client_from_args('pydle', description='pydle IRC library.')
|
||||
client.handle_forever()
|
||||
client, connect = _args.client_from_args('pydle', description='pydle IRC library.')
|
||||
loop = asyncio.get_event_loop()
|
||||
asyncio.ensure_future(connect(), loop=loop)
|
||||
loop.run_forever()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue