[issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory)

2010-07-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Yes, this is the way it works.  There is no copy of the lines kept in memory, 
the only lines that can be displayed in the traceback are the ones currently on 
disk.

Although your speaking about a script is a bit confusing: if you are running 
a script from the command line, then the update to the source file should be 
noticed and the code reinterpreted.  I'm guessing you aren't running a 
standalone script, but are running and editing something out of an interpreter 
session that doesn't restart.  If this is correct then my statement above 
applies.  If not, you can give more details, but I doubt that there is a real 
python bug here so I'm closing the issue.  It can always be reopened if it 
turns out I'm wrong.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory)

2010-07-27 Thread Guy

Guy g...@openmail.cc added the comment:

I was running a script that I was editing, and, after making changes, the code 
wasn't reinterpreted, but listed the line that the error occured on (I had 
corrected the error on the file that was on disk, but yet, Python didn't 
reinterpret the code).

I'm guessing you aren't running a standalone script, but are running and 
editing something out of an interpreter session that doesn't restart - do you 
mean that it's assumed I will restart the session after a change to the code?  
Judging by the data the traceback shows, wouldn't the results of the 
traceback/exception be misleading, citing a line of Python code on disk that 
was interpreted differently in memory?

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory)

2010-07-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Yes, when you change the code on disk, you must restart the Python interpreter 
in order for it to see those changes.  And as I said, the source code is 
never held in memory, so the only source code the traceback can show is what is 
on disk.  This is just how Python works, it is not a bug.

To learn more about this, you should ask questions on the python-list mailing 
list.

--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory)

2010-07-26 Thread Guy

New submission from Guy g...@openmail.cc:

When an exception is raised and Python's showing a traceback, the lines of the 
Python scripts are that of those on-disk, not in memory.

For example, if I run a Python script which raises an exception, but I edit the 
line the exception occurs on and save the script in the same location, the new 
line (The one that's not interpreted), will be shown in the traceback.

--
components: Interpreter Core
messages: 111685
nosy: Guy
priority: normal
severity: normal
status: open
title: Traceback: Exception Shows Code that's On-Disk (Not in memory)
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com