RE: How to automatically get the indent level from code?

2013-03-17 Thread Mark Shroyer
I realize this isn't yet precisely what you're asking for, but look at the inspect and ast modules: import ast, inspect def indent_level(): lineno = inspect.currentframe().f_back.f_lineno with open(__file__) as source_file: tree =

[issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16

2012-12-07 Thread Mark Shroyer
New submission from Mark Shroyer: When debugging a Python process in GDB with output-radix 16, the py-bt, py-locals, py-value, etc. commands from python-gdb.py fail with messages like (unable to read python frame information). The problem comes down to the int_from_int function attempting

[issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16

2012-12-07 Thread Mark Shroyer
Mark Shroyer added the comment: Example of GDB session exhibiting this error: https://gist.github.com/4228342#file_gdb_output.txt Thread on python-list: http://mail.python.org/pipermail/python-list/2012-December/636244.html -- ___ Python tracker

Problem using py-bt, py-locals, etc. during GDB debugging

2012-12-06 Thread Mark Shroyer
I'm having trouble with the py-bt, py-locals, etc. GDB commands (from Python's python-gdb.py) while using GDB 7.4 to debug Python 2.7.3; I was wondering if anyone here could offer advice. Briefly, py-bt seems to identify the python stack frames correctly, but shows (unable to read python frame

Re: Problem using py-bt, py-locals, etc. during GDB debugging [solved]

2012-12-06 Thread Mark Shroyer
On Thu, Dec 06, 2012 at 04:39:41PM -0500, Mark Shroyer wrote: I'm having trouble with the py-bt, py-locals, etc. GDB commands (from Python's python-gdb.py) while using GDB 7.4 to debug Python 2.7.3; I was wondering if anyone here could offer advice. Briefly, py-bt seems to identify

Re: Problem using py-bt, py-locals, etc. during GDB debugging [solved]

2012-12-06 Thread Mark Shroyer
On Thu, Dec 06, 2012 at 07:37:22PM -0500, MRAB wrote: On 2012-12-07 00:22, Mark Shroyer wrote: [...] 2. Patch Python 2.7.3's python-gdb.py as follows: === 8 = --- python-gdb.py.orig 2012-12-06 15:12:18.666760664 -0500 +++ python-gdb.py

Re: Which way is best to execute a Python script in Excel?

2012-07-05 Thread Mark Shroyer
On Thu, Jul 05, 2012 at 03:22:01AM -0400, Maurizio Spadaccino wrote: Hi all I'm new to Python but soon after a few days of studying its features I find it my favourite mean of programming scripts to allow for data storing and mining. My idea would be to inplement python scripts from inside

Re: Is massive spam coming from me on python lists?

2008-04-21 Thread Mark Shroyer
on their knees and begging *you* for forgiveness. ;) (I haven't seen any such spam messages myself; but the way I'm set up, I wouldn't receive them even if that is the case.) -- Mark Shroyer, http://markshroyer.com/contact/ I have joined others in blocking Google Groups due to excessive spam

Re: Inheritance confusion

2008-04-19 Thread Mark Shroyer
time import time or from time import * Otherwise, the token time refers to the time module, which is not callable, and not the desired function therein. -- Mark Shroyer, http://markshroyer.com/contact/ Due to extreme spam, I block all articles originating from Google Groups. If you want

Re: What can we do about all the spam that the list is getting?

2008-04-17 Thread Mark Shroyer
In article [EMAIL PROTECTED], Grant Edwards [EMAIL PROTECTED] wrote: On 2008-04-16, Mark Shroyer [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Mensanator [EMAIL PROTECTED] wrote: On Apr 16, 12:01?pm, [EMAIL PROTECTED] wrote: What can we do about all the spam

Re: What can we do about all the spam that the list is getting?

2008-04-16 Thread Mark Shroyer
on and give its spam filter a shot; clearly Google is not interested in fighting spam itself. -- Mark Shroyer http://markshroyer.com/contact/ -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython faster than CPython?

2007-12-18 Thread Mark Shroyer
that the bulk of the execution time of any Python app worth profiling is going to be after this initial Python-to-bytecode compilation, during the execution of the program's bytecode itself. -- Mark Shroyer http://markshroyer.com/contact/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Portrait of a real life __metaclass__

2007-11-11 Thread Mark Shroyer
as a rather big surprise to me), then I don't want to be right. -- Mark Shroyer http://markshroyer.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Portrait of a real life __metaclass__

2007-11-10 Thread Mark Shroyer
On 2007-11-10, Jonathan Gardner [EMAIL PROTECTED] wrote: On Nov 9, 7:12 pm, Mark Shroyer [EMAIL PROTECTED] wrote: I guess this sort of falls under the shameless plug category, but here it is: Recently I used a custom metaclass in a Python program I've been working on, and I ended up doing

Portrait of a real life __metaclass__

2007-11-09 Thread Mark Shroyer
such a thing themselves. http://markshroyer.com/blog/2007/11/09/tilting-at-metaclass-windmills/ So what's the verdict? Incorrect? Missed the point completely? Needs to get his head checked? I'd love to hear what comp.lang.python has to (anthropomorphically) say about it. -- Mark Shroyer http