This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Pinku Surana
Recipients Pinku Surana
Date 2016-11-04.16:18:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478276308.14.0.744834650748.issue28610@psf.upfronthosting.co.za>
In-reply-to
Content
I am using Python as a hosted scripting runtime for a product. All the user scripts are stored in a database. I use "compile" and "exec" to run the scripts. I'd like to use PDB to debug scripts. Unfortunately, PDB makes a call to linecache, which calls tokenize.open assuming the code is in a file. I'd like to pass in a function that takes a filename and returns the source code in a string. 

At the very least, moving the call to "linecache.getline" into a separate method in PDB ("self.get_lines") would allow me to override that method with my own.
History
Date User Action Args
2016-11-04 16:18:28Pinku Suranasetrecipients: + Pinku Surana
2016-11-04 16:18:28Pinku Suranasetmessageid: <1478276308.14.0.744834650748.issue28610@psf.upfronthosting.co.za>
2016-11-04 16:18:28Pinku Suranalinkissue28610 messages
2016-11-04 16:18:27Pinku Suranacreate