Image from string instead of a disk file

Jack Wilkinson <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
This is one of those cases where better planning in the beginning might have been a good idea.  But now we're deep in production without resources or time to go back and work out a better solution.

Our reporting mechanism looks something like:

main_program
                result = report_lab_script(some parameters)
                back to main program that processes the result

This works well for now.  But we expect to see the quantity of data increase by major quantities.

The report_lab_script, depending on the parameters handed to it, may open and use between four and nine images each time it gets called.  (It uses the "Image" routine.) That means a lot of file I/O for each page or group of pages produced in each iteration.

I'm curious if there's a way to read all of the images in the beginning of the main_program into strings and then just pass those strings to the report_lab_script so it doesn't have to do the file I/O to read the files every time.  However, "Image" seems to only take a filename.

Just grasping for straws before I end-up re-writing the world.

Appreciate any thoughts...
jack

Jack Wilkinson, Programmer
Services | VPay(r)
P: 972.367-6622
[email protected]<mailto:[email protected]>
www.stoneeagle.com<http://www.stoneeagle.com/>
www.vpayusa.com<http://www.vpayusa.com/>

111 W. Spring Valley Rd., #100
Richardson, TX 75081

CONFIDENTIALITY NOTICE: This email, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you received this email and are not the intended recipient, please inform the sender by email reply and destroy all copies of the original message.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.