View Single Post
Old 9th March 2007, 01:38   #602  |  Link
Eggroll
Registered User
 
Join Date: Nov 2005
Posts: 14
I don't know python, I happened to research about it. I've been programming for the past 7-8 years, mostly c, c++ and c# so I still understand what's going on without being familiar with python's syntax and all that.

I thought of using a temp file at first but it seemed like an awful lot of mess to create a file (and eventually delete it), possibly dealing with ntfs permission, file lock and all that. I know it's possible and easy to do, but I was looking for a 'cleaner' way of storing temporary variables in memory since it's usually where I'll want to store it anyway.

The problem with a file is that it persists even when the application is closed.

As a temporary solution, I wrote my variables in the clipboard so I don't have to manage files on disk.

Anyways, thanks for your answer, if no change is made, I'll just either use clipboard like I do now or use cPickle. Not my favorite method but it'll work just as good since my purpose is to write macros to ease the creation of script, even at the expense of creating a few intermediary files that the user can clean out whenever it is needed.
Eggroll is offline   Reply With Quote