ANNOUNCE : and Pythonutils

Discussion in 'Python' started by Fuzzyman, Apr 6, 2004.

  1. Fuzzyman

    Fuzzyman Guest

    Various Python Resources

    Home of :

    Nanagram - anagram finder. Tkinter GUI version and a CGI for including
    in your own websites.
    Voidspace Python Guestbook

    Modules :
    *NEW* - a definable binary to ascii encoding with
    timestamping and binary interleaving.
    ConfigObj 2 - a simple config file parser that behaves like a
    listparser - parsing strings into lists, elements of lists can
    themselves be lists
    dateutils - functions for handling dates, leap years, future
    dates etc
    csv_s - simple and straightforward CSV file reading and

    Dataenc :
    Version 1.1.0

    This is a set of functions that provide a binary to ASCII encoding
    (based on a user definable TABLE) and binary interleaving which can be
    used for combining files or time/datestamping data.

    The purpose of this is that an encrypted password can be timestamped
    and then included as ASCII in a hidden form field - in the HTML output
    of a CGI. This gives a convenient way of providing a 'user login' with
    a CGI - but the password (or it's SHA hash) that is hidden in the HTML
    is 'time stamped' so that even if is extracted from the HTML it can't
    be used once it has expired. Conceivably, the binary interweave
    functions could be used for combining, 'watermarking' or timestamping
    any data. The binary to ascii function is no 'better' than the
    binascii module - but the mapping is user definable. It can be used
    for storing *any* binary data as ascii - e.g. an SHA hash in a
    ConfigObj !

    Dateutils :
    Version 1.0.2

    This is a set of functions for dealing with dates - written for a
    little tool called 'Victory Days'. They are particularly useful for
    dealing with appointments - e.g. the second Tuesday in March etc...

    The functions will tell you what day of the week a date is, work out
    the 'Julian day number' of a date is, correctly add numbers of days
    (weeks, months etc) to a date and tell you the number of days between
    a date, format a datestring etc. Full correction for leap years and
    much more.

    ConfigObj :
    Version 2.0.0

    ConfigObj is a lightweight and easy to use config file parser. It
    allows you and your users to write simple text config files - and for
    you to easily load, parse, change and save them. In practise, you hand
    ConfigObj a filename and it parses the values from keywords in the
    file. For adding, retreiving or changing values/keywords it then
    behaves like a normal python dictionary. You can then write the edited
    data back to file if you need to with a simple configobj.write()
    command. You can give it a list of keywords to parse - or simply have
    it find all the keywords in the file. Comments inline with keywords
    are preserved.

    Listparse :

    Not only this, but each value can either be a single value *or* a list
    of values. This now includes lists of lists !! In other words each
    element of a list, can itself be a list. This is implemented using
    listparser - a simple module with functions for reading lists from a
    string and also turning lists back into strings. A useful way of
    storing data in a readable format. This module is available seperately
    if you want but included in the configobj2 zip.

    csv_s :

    Functions for reading, writing and comparing CSV files. Very simple to
    use. Useful for places where you haven't got Python 2.3 installed or
    don't need the complexity of the CSV module.

    A few other 'simple' goodies that some may find useful............

    *Also* :

    YAPLP - Yet Another Python Links Page


    Fuzzyman, Apr 6, 2004
    1. Advertisements

  2. Fuzzyman

    Peter Hansen Guest

    No tests? :-( How do you know it works?

    Peter Hansen, Apr 6, 2004
    1. Advertisements

  3. Fuzzyman

    Fuzzyman Guest

    I use it in various applications... particularly the application
    'victorydays' on the same page. (also a Customer Contact database I am
    writing for our company intranet).

    In fact there are a couple of tests in the module - but not many...
    still - I use it regularly and haven't made any changes for quite some
    time - I consider it stable now.... :)


    Fuzzyman, Apr 6, 2004
  4. Fuzzyman

    Fuzzyman Guest

    Python Utils

    Already a few updates :

    *NEW* StandOut 2
    Well, sort of new... actually an update - but a complete rewrite.
    StandOut is a Flexible Output Object - it allows you to implement vary
    degrees of 'verbosity' for command line programs *and* to allow
    logging to a file (with the same or a different degree of verbosity) -
    yet messages are printed just using the normal print command.

    Messages can be given a general 'priority', a priority for individual
    messages can be specified, an additional function can be passed in to
    print with - to display output to a GUI window, or perhaps to format
    ouput - plus a few other bits besides. Very easy to use and with full

    dataenc Version 1.1.1
    Fixes two bugs - one in interleaving files with a watermark file
    bigger than 64k, the other when watermarking files with a watermark
    less than 65536 times the size of the main file.
    Made the ouput from the tests look a bit nicer.

    ConfigObj Version 2.1.0
    Made a couple of the parameters keywords, and added a couple of extra
    keywords that affect the way it treats creating configobjs for config
    files that don't yet exist. (Throw an error ? Create the file ?)


    Fuzzyman, Apr 8, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.