On 10/21/2012 08:02 PM, Anatoli Hristov wrote: > Hello, > > I need an advice about a small script I run 24/24 7/7. > > It's a script converted to EXE using py2exe and this script takes - > grows 30kb RAM on each loop which means that for 10hours it grows up > with 180mb memory. is there something I can do ? > >From the ini file I'm loading only the URL and the interval of > downloading the file > The script: > > import time > import urllib > > exec(open("iccm.ini").read())
This line doesn't do anything useful. And I would start by eliminating the exec() call. > > loop = 0 > while loop == 0: Since nothing ever modifies loop, you should just make it while True: > > time.sleep(interval*60) NameError: name 'interval' is not defined > try: > urllib.urlretrieve ('"'URL'"'+"/hours.xml", "c:\\config\\hours.xml") SyntaxError: invalid syntax > except IOError: > pass > > Thanks Please post the actual code you're running, as well as the Python version. Also, explain how you decided that it grows by 30kb each loop. You also should try the same code without py2exe; see if it runs any differently. The two errors I show are from Python 2.7. Naturally, if you post an error, you should give the full traceback. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list