Re: program loaded in memory

Discussion in 'Python' started by Anatoli Hristov, Oct 22, 2012.

  1. 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

    Thanks


    On 22 Oct 2012, at 02:21, Dave Angel <> 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
    >
     
    Anatoli Hristov, Oct 22, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marcelo Birnbach [MS]
    Replies:
    0
    Views:
    3,330
    Marcelo Birnbach [MS]
    Jun 28, 2003
  2. Udo Corban
    Replies:
    0
    Views:
    3,855
    Udo Corban
    Jan 23, 2004
  3. koolViru
    Replies:
    7
    Views:
    4,581
    Chris Uppal
    Sep 4, 2005
  4. Anatoli Hristov

    program loaded in memory

    Anatoli Hristov, Oct 22, 2012, in forum: Python
    Replies:
    2
    Views:
    191
    Grant Edwards
    Oct 22, 2012
  5. Dave Angel

    Re: program loaded in memory

    Dave Angel, Oct 22, 2012, in forum: Python
    Replies:
    0
    Views:
    144
    Dave Angel
    Oct 22, 2012
Loading...

Share This Page