IRCclient (version 0.93, jeudi 07 02 2013, at 23h:17m:30s)
index
IRCclient.py
IRCclient.py.html

./IRCclient.py [HOST PORT [OPTIONS]] | -z [OPTIONS]
 
Create a socket on HOST at PORT, and run it a client socket.
 
Options:
========
 *      -i, --interactive, -z, --zenity 
        Force Zenity interactivity : read args HOST and PORT interactively.
                 with Zenity and PyZenity (don't use it unless you are sure to have both).
 *      -ni, --non-interactive  Disable Zenity interactivity : read args HOST and PORT from command line, Default.
 *      -w      Print << in beginning of every output (experimental).
 *      -v      Be verbous (print usefull informations about connections).
 *      -h, --help      Print this help message.
 *      -a      Print all message incomming from the client or outcomming to the server.
 *      --debug Launch program in debug mod with pygdb.
 
Example:
========
        $ ./PyRlwrap.py ./IRCclient.py naereen-corp.crans.org 9312 -v -a
 
Copyrigths:
===========
 (c) 09/2012
   By Lilian BESSON
    ENS de Cachan (M1 Mathematics & M1 Computer Science MPRI)
    mailto:lbesson[AT]ens-cachan.fr
    
   For Naereen Corp.
    mailto:naereen-corporation[AT]laposte.net
    https:sites.google.com/site/naereencorp/liste-des-projets/irc.

 
Modules
       
ANSIColors
PyZenity
ToolReadline
os
socket
sys
thread

 
Functions
       
ColorOff(verb=False)
Turn off the support of ANSI Colors.
Can be used other somewhere else, or on other modules, AFTER importing ANSIColors module !
ColorOn(verb=False)
Turn on the support of ANSI Colors.
Can be used other somewhere else, or on other modules, AFTER importing ANSIColors module !
action_on_readstr(readstr)
Reaction to special message readed from the keyboard !
ask_arg(HOST, PORT)
Use PyZenity to ask interactivly the arguments of the program.
create_socket_client(server=('0.0.0.0', 12882))
Create a socket designed to be a client, and connect it to @server.
Return a socket.
exit_with_Zenity(msg_erreur)
A remplacement for sys.exit : print an error message with Zenity before executing sys.exit.
main(args, HOST='0.0.0.0', PORT=12882)
Create a socket on an host=args[1] with port=int(args[2]), and run a client on it.
run_client(msocket, server, PRINT_ALL_MESSAGE=1, WRAPPER_PRINTED=0)
An infinite loop over the @msocket, which have to be a client socket assumed te be connected with @server (just used to print some usefull informations).
Concurrently, read from stdin on client and write on stdout on server, and read on stdin on server and write on stdout on client. Use thread.
 
DEBUG, PRINT_ALL_MESSAGE, WRAPPER_PRINTED: are options for parametrize behaviour of client.

 
Data
        AsZenity = False
HELP = './IRCclient.py [HOST PORT [OPTIONS]] | -z [OPTIO...ogle.com/site/naereencorp/liste-des-projets/irc.\n'
HOST = '0.0.0.0'
PORT = 12882
PORT_INIT = 12882
PRINT_ALL_MESSAGE = 1
SERVEUR_INIT = '0.0.0.0'
WRAPPER_IN = ''
WRAPPER_OUT = '<< '
WRAPPER_PRINTED = 0
__author__ = 'Lilian BESSON (mailto:lilian.besson[AT]normale.fr)'
__date__ = 'jeudi 07 02 2013, at 23h:17m:30s'
__version__ = '0.93'
help_User = '\nWelcome in IRC client v0.93.\n\tWrote by Lilian B... : logout violently (not like Ctrl+D or Ctrl+C).\n'
kwargs = {'title': 'IRC server', 'window-icon': 'server'}

 
Author
        Lilian BESSON (mailto:lilian.besson[AT]normale.fr)