1
1
# Alternate Event Loops
2
2
3
- Throughout this documentation we have focused on the ** 90%** use case, that is the use case we
4
- believe around ** 90+% ** of our user base is looking for . This focuses on ease of use and the best
5
- out-of-the-box experience where developers get the most functionality for the least amount of
6
- effort. We are talking about running ` cmd2 ` applications with the ` cmdloop() ` method:
3
+ Throughout this documentation, we have focused on the 90% use case, which we believe applies to over
4
+ 90% of our user base. This focuses on ease of use and the best out-of-the-box experience, where
5
+ developers get the most functionality for the least amount of effort. We are talking about running
6
+ ` cmd2 ` applications with the ` cmdloop() ` method:
7
7
8
8
``` py
9
9
from cmd2 import Cmd
@@ -21,8 +21,8 @@ Many Python concurrency libraries involve or require an event loop which they ar
21
21
such as [ asyncio] ( https://docs.python.org/3/library/asyncio.html ) , [ gevent] ( http://www.gevent.org/ ) ,
22
22
[ Twisted] ( https://twistedmatrix.com ) , etc.
23
23
24
- ` cmd2 ` applications can be executed in a fashion where ` cmd2 ` doesn't own the main loop for the
25
- program by using code like the following:
24
+ ` cmd2 ` applications can be executed in a way where ` cmd2 ` doesn't own the main loop for the program
25
+ by using code like the following:
26
26
27
27
``` py
28
28
import cmd2
@@ -64,9 +64,9 @@ normal fashion:
64
64
1 . Stop redirecting output if it was redirected
65
65
1 . Call methods registered with [ cmd2.Cmd.register_cmdfinalization_hook] [ ]
66
66
67
- Running in this fashion enables the ability to integrate with an external event loop. However, how
68
- to integrate with any specific event loop is beyond the scope of this documentation. Please note
69
- that running in this fashion comes with several disadvantages, including:
67
+ Running in this way enables the ability to integrate with an external event loop. However, how to
68
+ integrate with any specific event loop is beyond the scope of this documentation. Please note that
69
+ running in this fashion comes with several disadvantages, including:
70
70
71
71
- Requires the developer to write more code
72
72
- Does not support transcript testing
0 commit comments