<s> from gevent import monkey <EOL> from pubnub import Pubnub <EOL> monkey . patch_all ( ) <EOL> pubnub = Pubnub ( publish_key = "<STR_LIT>" , subscribe_key = "<STR_LIT>" , <EOL> secret_key = "<STR_LIT>" , ssl_on = False ) <EOL> def a ( ) : <EOL> channel_wc = "<STR_LIT>" <EOL> channel = "<STR_LIT>" <EOL> def callback ( message1 , channel1 , real_channel = None ) : <EOL> print ( channel1 + "<STR_LIT>" + real_channel + "<STR_LIT>" + str ( message1 ) ) <EOL> def error ( message ) : <EOL> print ( "<STR_LIT>" + str ( message ) ) <EOL> def connect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> print ( pubnub . publish ( channel = channel , message = "<STR_LIT:a>" ) ) <EOL> def disconnect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> def reconnect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> pubnub . subscribe ( channels = channel_wc , callback = callback , error = callback , <EOL> connect = connect , disconnect = disconnect , reconnect = reconnect ) <EOL> def b ( ) : <EOL> channel_wc = "<STR_LIT>" <EOL> channel = "<STR_LIT>" <EOL> def callback ( message1 , channel1 , real_channel = None ) : <EOL> print ( channel1 + "<STR_LIT>" + real_channel + "<STR_LIT>" + str ( message1 ) ) <EOL> def error ( message ) : <EOL> print ( "<STR_LIT>" + str ( message ) ) <EOL> def presence ( message1 , channel1 , real_channel = None ) : <EOL> print ( channel1 + "<STR_LIT>" + real_channel + "<STR_LIT>" + str ( message1 ) ) <EOL> def connect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> print ( pubnub . publish ( channel = channel , message = "<STR_LIT:b>" ) ) <EOL> def disconnect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> def reconnect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> pubnub . subscribe ( channels = channel_wc , callback = callback , error = callback , <EOL> connect = connect , disconnect = disconnect , reconnect = reconnect , presence = presence ) <EOL> def c ( ) : <EOL> channel_wc = "<STR_LIT>" <EOL> channel = "<STR_LIT>" <EOL> def callback ( message1 , channel1 , real_channel = None ) : <EOL> print ( channel1 + "<STR_LIT>" + real_channel + "<STR_LIT>" + str ( message1 ) ) <EOL> pubnub . unsubscribe ( channel = "<STR_LIT>" ) <EOL> print ( pubnub . publish ( channel = channel , message = "<STR_LIT>" ) ) <EOL> def error ( message ) : <EOL> print ( "<STR_LIT>" + str ( message ) ) <EOL> def connect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> print ( pubnub . publish ( channel = channel , message = "<STR_LIT:c>" ) ) <EOL> def disconnect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> def reconnect ( channel1 = None ) : <EOL> print ( "<STR_LIT>" + channel1 ) <EOL> pubnub . subscribe ( channels = channel_wc , callback = callback , error = callback , <EOL> connect = connect , disconnect = disconnect , reconnect = reconnect ) <EOL> a ( ) <EOL> b ( ) <EOL> c ( ) </s>
