Eric Promislow added the comment:
I found a workaround in our debugger code, so you can lower the priority on
this, or even mark it "Wontfix", although I still
think the frame stack is getting messed up.
One thing about our debugger, it essentially runs all the Python code in a
Eric Promislow added the comment:
I'm running it inside gdb to see if I can figure it out.
I don't see a way of isolating this from the whole product.
--
___
Python tracker
<http://bugs.python.o
New submission from Eric Promislow:
While much of Komodo's source code has been released under MIT/GPL/LGPL, the
Python debugger hasn't, so I can't post it here. We can work out an
arrangement later, although it might not be necessary once I describe
the problem:
Komodo
New submission from Eric Promislow:
>>> import re
>>> p = re.compile(r'^(?:\\"|.|)*?"', re.S|re.M)
>>> s = 'sub foo {\n\tprint "\n\t\tbar\n\t\t";\n}\n'
>>> m = p.findall(s)
Python doesn't return.
Dropping the
New submission from Eric Promislow :
This regular expression takes a few seconds to be evaluated
against any text:
(.*?)((?:X|\s+)*)$
This reg ex is much faster:
(.*?)((?:X|\s)*)$
To be fair, Ruby's performance with the first regex is the same as Python's.
PHP and JavaScript bo
New submission from Eric Promislow :
I see that going from Python 3.1.1 to 3.1.2
instances of io.StringIO no longer have a __dict__ field.
Why? Is this to make them unpicklable?
--
components: IO
messages: 143344
nosy: ericp
priority: normal
severity: normal
status: open
title
New submission from Eric Promislow :
The following code throws an exception in Python 3.1 (and 3.2 alpha),
but runs with 2.x:
>>> exec('if True:\nprint("Hello")\n\n')
Traceback (most recent call last):
File "", line 1, in
File "&quo
Eric Promislow added the comment:
David, that won't work for a reason I'll get into in a bit.
I would drop the priority of this ... Komodo has a had a
Python debugger since late 2000, we only fixed updating
variables while debugging (using the variable viewer) yesterday,
and rece
Eric Promislow added the comment:
Thanks for the response.
Note that our use case *is* to implement Python-console
functionality, but sometimes we do this in the context
of a currently running Python program, inside a function.
That's why I wrote the repro that way.
Eric Promislow added the comment:
I've modified the bug status so anyone can read it. You
don't need an account to read ActiveState bugs, only to
add or comment on one.
Please note that I closed bug
http://bugs.activestate.com/show_bug.cgi?id=87405, as we're now w
New submission from Eric Promislow :
Similar to bug http://bugs.python.org/issue5215 which found
a workaround in pdb. Here I want to use code.InteractiveInterpreter
to modify code interactively (see Komodo bug
http://bugs.activestate.com/show_bug.cgi?id=87405 )
I can do this at the top-level
Eric Promislow added the comment:
I'm working on a debugger, trying to identify instances of
old-style classes in Python 2, and any class in Python 3.
The getattr formulation will work, but because I already
need to maintain an "is_v3" flag, I might as well use it
here.
As a sid
New submission from Eric Promislow :
Title should be self-explanatory.
--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 101543
nosy: ericp
severity: normal
status: open
title: 2to3 doesn't convert 'types.InstanceType' to 'object
Eric Promislow added the comment:
Thanks. For the record, I want
textwrap.TextWrapper(..., break_long_words=False)
or it will break after a non-breaking space if that
gives an optimum length.
--
status: closed -> open
___
Python tracker
&l
New submission from Eric Promislow :
ActivePython 2.6.1.1 ...
>>> a = u"abc\x0adef"
>>> a.split()
[u'abc', u'def']
>>>
"\x0a" is a non-breaking space. This behavior means we can't
easily use split() to reflow text.
Eric Promislow added the comment:
Understood. Could the tool emit a warning when it encounters
something like this?
--
___
Python tracker
<http://bugs.python.org/issue6
New submission from Eric Promislow :
Given this code:
import thread
print thread
$ python
ActivePython 2.6.1.1 (ActiveState Software Inc.) based on
Python 2.6.1 (r261:67515, Dec 5 2008, 13:58:38) [MSC v.1500 32 bit
(Intel)] on
win32
>>> from lib2to3.main import main
>>> pr
Eric Promislow added the comment:
Not in Sridar's patch, but 'pathname2url' is also misspelled
as 'pahtname2url' in the MAPPING struct.
--
nosy: +ericp
___
Python tracker
<http
Eric Promislow added the comment:
Similar problem with 3.1rc1:
C:\...>c:\Python31rc1\python.exe -m pdb hello01.py
--Return--
> c:\python31rc1\lib\encodings\cp437.py(19)encode()->b'Hello'
-> return codecs.charmap_encode(input,self.errors,encoding_map)[0]
(Pdb) b 2
*** Bl
New submission from Eric Promislow :
I have a simple test file, test01.py, with this output:
$ cat test01.py
#!/usr/bin/env python
print("Line 1")
print("Line 2")
print("Line 3")
$
$ # Now try debugging it.
$ python3.0 -mpdb test01.py
--Return--
> /home/eri
20 matches
Mail list logo