printNicely('')
except:
printNicely(red('Sorry I can\'t understand.'))
- g['prefix'] = False
def home():
"""
t = Twitter(auth=authen())
t.statuses.update(status=g['stuff'])
- g['prefix'] = False
def retweet():
t.statuses.retweet(id=tid, include_entities=False, trim_user=True)
except:
printNicely(red('Sorry I can\'t retweet for you.'))
- g['prefix'] = False
def reply():
t.statuses.update(status=status, in_reply_to_status_id=tid)
except:
printNicely(red('Sorry I can\'t understand.'))
- g['prefix'] = False
def delete():
Clear screen
"""
os.system('clear')
- g['prefix'] = False
def quit():
"""
if g['reset']:
printNicely(green('Need tips ? Type "h" and hit Enter key!'))
- g['prefix'] = True
g['reset'] = False
]
))
init_interactive_shell(d)
- first = True
+ reset()
while True:
- if g['prefix'] and not first:
- line = raw_input(g['decorated_name'])
- else:
- line = raw_input()
+ line = raw_input(g['decorated_name'])
try:
cmd = line.split()[0]
except:
# Save cmd to global variable and call process
g['stuff'] = ' '.join(line.split()[1:])
process(cmd)()
- first = False
def stream(domain, args, name='Rainbow Stream'):
p.start()
# Start listen process
- g['prefix'] = True
+ time.sleep(0.5)
g['reset'] = True
g['stream_pid'] = p.pid
listen()