473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

execfile eats memory

On friday i wrote a this message:
[...]
I'm writing an application who needs to handle a lot of information of several files.
So, i think the better way is design a batch process to catch that information in a dictionary and write it in a file.
So, after that when a user wants to retrieve something, only with an execfile i'll have all the information avaiable.

Creating the file with pythonic syntax will be a hard job so,

is there some module to do that?
is there a better way?

The information will be used no more than 3-4 days a month and install databases is not allowed.
[...]
Someone suggest me the pickle module. I'll try it and it works, but pickle dumps is slower than writing the file with pythonic syntax. (26 seconds vs 6)
After that, i have a DIC.txt to execfile with it. The application dies there.
The memory grow up till de limit.
Is possible that execfile of a 19 mb file takes more than 600 mb of memory?
thanks
Sep 19 '05 #1
0 999

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jonathan | last post by:
I'm puzzled by Python's behavior when binding local variables which are introduced within exec() or execfile() statements. First, consider this simple Python program: # main.py def f() : x = 1...
4
by: Roman Suzi | last post by:
hi! One of my old web projects uses execfile alot, because its data are stored in Python. How do I suppress all those warnings DeprecationWarning: Non-ASCII character '\xd2' in file ffff.py...
1
by: Bo Jacobsen | last post by:
I have a number of files compiled to bytecode using py_compile.compile(). The .pyc files can be invoked by python directly ($python file.pyc), but "loading" them by execfile just throws an...
3
by: Brano Zarnovican | last post by:
Hi ! I have a python script represented by a string. I need to execute it in a context. 'exec' does the job, but doesn't display the filename in tracebacks. 'execfile' is displaying the...
2
by: Alex Popescu | last post by:
Hi all! not be present in Py3k. So, I am wondering what will be its replacement? Considering that most probably Py3k will keep eval and exec, this will still be possible (indeed requiring manual...
1
by: Fernando Perez | last post by:
Hi all, I'm finding the following behavior truly puzzling, but before I post a bug report on the site, I'd rather be corrected if I'm just missing somethin obvious. Consider the following...
5
by: George Sakkis | last post by:
I maintain a few configuration files in Python syntax (mainly nested dicts of ints and strings) and use execfile() to read them back to Python. This has been working great; it combines the...
1
by: moijes12 | last post by:
Hi i have 3 python files and i want to execute the files sequentially using the execfile command.Hence ,i have written the following program fileList = for fileName in fileList :...
6
by: Max Ivanov | last post by:
I'm playing with pyprocessing module and found that it eats lot's of memory. I've made small test case to show it. I pass ~45mb of data to worker processes and than get it back slightly modified....
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.