1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Rep Power

    Red face how to Store Dictionary data in a File - Python

    Hey guys,

    I have a sample code,

    where i have a Dictionary

    {'username': 'kunal', 'gender': 'Male', 'postal': '45621', 'Country': 'U.K', 'Sport': 'Sport', 'Music': 'Music', 'repassword': 'jainjain', 'address': 'sdfsdf', 'password': 'jainjain', 'email': 'kunal@fsdf.com'}

    I want to way to store this data in a file

    any file

    and later read the content of the file

    please help me in this,


  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    Look at your python documentation for pickle, cpickle or marshall modules. I would use cpickle because of its speed as well as flexibility.

    Comments on this post

    • jacktasia agrees
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo