I have two Python programs, one is a IRC bot, using sockets to connect to an IRC server.
This program has a loop that reads every PRIVMSG from an specific channel.
The second program should get whatever the first program outputs (the PRIVMSG in this case) and runs functions with it.
So, it's basically:
while 1:
data = irc.recv(2048)
if data.find("PRIVMSG " + current_channel + " :") != -1:
send_to_second_program(data)
the second program is
while 1:
data = get_from_first_program()
do_stuff(data)
Is there a way to make this happen without using modules? The two programs should be separate.