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 > in

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 in

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

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< = > > > > ---

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

2013-03-16 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 = ast.parse(source_file.read()

Portrait of a "real life" __metaclass__

2007-11-09 Thread Mark Shroyer
e who may never have seen 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) s

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

Re: Portrait of a "real life" __metaclass__

2007-11-11 Thread Mark Shroyer
ful to realize that all those years learning OO design and > design patterns just to make Java usable are wasted in the world of > Python. I understand that because I've invested years mastering C++ > and perl before discovering Python. Your solace comes when you embrace > that and see how much simpler life really is when the language gets > out of your way. It's just as harmful as to ignore the occasional usefulness of object-oriented patterns as it is to abuse them left and right. My approach on this project feels right, it produces legible and easily extensible code, it's been a breeze to test and maintain so far... if implementing different types of matching logic as classes here is "wrong" by Python convention (and that would come 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: IronPython faster than CPython?

2007-12-18 Thread Mark Shroyer
machine code, is unimportant. Even if a significant performance difference did result from this, keep in mind 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 by

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

2008-04-16 Thread Mark Shroyer
a "real" NNTP client for whatever platform you're 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: 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

Re: Inheritance confusion

2008-04-19 Thread Mark Shroyer
message is actually trying to tell you is that you are attempting to call a module as a function somewhere -- and in this particular case, I think it's referring to the time module. Are you sure that line 98 in Hook_m.py should not instead be: dt = self.Date(time.time()) The time mod

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

2008-04-21 Thread Mark Shroyer
luge of backscatter and filling up your inbox, should be groveling 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://marks