Skip to content

Readm/MagicFork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagicFork

Fork in a new terminal to interactive in python.

Usage:

use magicfork.magicfork() in stead of fork()

magicfork() takes one argument: terminal, valid value:

  • 'gnome'or'gnome-terminal' (defualt)
  • 'xterm'

Sample:


import magicfork

a = 'a'
b = 'b'
if magicfork.magicfork():
    print a
    a = raw_input('a?')
    print 'a:', a
else:
    print b
    b = raw_input('b?')
    print 'b:', b

You will get:

sample


Others

Report any bug in issue. Star this if you like it.

About

Fork in a new terminal in python. (for Linux)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages