Skip to content

tomcola512/AsyncPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

AsyncPy

Threaded python shell for asynchronous execution.

Problems

  • Needs urwid or curses equivalent to multiplex terminal so that output and input can be actually asynchronous.
  • Needs support for multiline input

Info:

  • agents dict: should contain objects with a run method. These are evaluated every tick.
  • i: global increment counter

Example run:

AsyncPy Shell
=====
Press Enter to aquire lock
Input single line python expression or statement to be evaluated or executed

Input exit to exit



> a = Agent(lambda: i)

> agents['a'] = a
Agent output
=====
'a' >: 31
=====

Agent output
=====
'a' >: 32
=====


> b = Agent(lambda: agents['a'].run()/2 + 5)
Agent output
=====
'a' >: 33
=====

Agent output
=====
'a' >: 34
=====


> agents['b'] = b
Agent output
=====
'a' >: 35
=====

Agent output
=====
'a' >: 36
'b' >: 23
=====

Agent output
=====
'a' >: 37
'b' >: 23
=====


> 

About

Threaded python shell for asynchronous execution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages