Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: program loaded in memory

Thread Tools

Re: program loaded in memory

Anatoli Hristov
Posts: n/a
Yes sorry, the name var(interval) is loaded from the ini file and also
the Url. The reason is that the ini file will be configured from
someone else. Example of the file

URL = www # define your url
interval = 1 # minutes for sync

I see in the task manager each time it downloads the file that it
grows up with 30kb.
And I'm using Python 2.7 on windows 7


On 22 Oct 2012, at 02:21, Dave Angel <(E-Mail Removed)> wrote:

> 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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
program loaded in memory Anatoli Hristov Python 2 10-22-2012 02:19 PM
Re: program loaded in memory Dave Angel Python 0 10-22-2012 12:47 AM
How JVM is loaded in your program ? koolViru Java 7 09-04-2005 10:37 AM
java -verbose doesn't show "loaded from" for classes loaded from custom jars in the classpath Udo Corban Java 0 01-23-2004 09:32 AM
Re: how to programatically give assembly loaded from network the same trust as those loaded from local host? Marcelo Birnbach [MS] ASP .Net 0 06-27-2003 11:51 PM