String --> int

Skip Montanaro skip at pobox.com
Thu Jun 21 08:31:49 EDT 2001


    Romain>     Assuming fsock is a File objet, when I do:
    Romain> var = fsock.read(4)

    Romain> I get a String. I'd like to convert it into an integer. 

Check out the struct module.





More information about the Python-list mailing list