Re: hotspot profiler experience and accuracy?

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 19:24:20 -0800, aurora wrote: > I have a parser I need to optimize. It has some disk IO and a lot of > looping over characters. > > I used the hotspot profiler to gain insight on optimization options. The > methods show up on on the top of this list seems fairly trivial and do

how to use python scripts in zope3

2005-02-01 Thread vijay
hi Recently i started learning zope3 framework. Unlike in zope2.7 , there is no Script(Python) component in the addlist of zope3. Also by inserting scripts in zpt it gives me error. Somebody help me in using python script in zope3. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Tkinter on dual screen

2005-02-01 Thread nik
hello, i am writing an app which is running on a dual screen setup on windows and OS X. is anyone doing this using Tkinter? are there problems with it? i know Tk() takes a "screenname" argument which specifies the screen. but i am not sure about how well Tkinter copes with having two Tk objects a

Python Code Auditing Tool

2005-02-01 Thread Robey Holderith
Does anybody know of a tool that can tell me all possible exceptions that might occur in each line of code? What I'm hoping to find is something like the following: given all necessary python source and a given line ( my.py:40 ) it would generate a list of possible exception classes sorted by fun

Re: Python Code Auditing Tool

2005-02-01 Thread Paul Rubin
Robey Holderith <[EMAIL PROTECTED]> writes: > Does anybody know of a tool that can tell me all possible exceptions that > might occur in each line of code? What I'm hoping to find is something > like the following: That is impossible. The parameter to the raise statement is a class object, which

Re: curl and popen2

2005-02-01 Thread Robey Holderith
On Tue, 01 Feb 2005 17:48:53 -0800, lists04 wrote: > Hi, > > I have a problem with a curl request and running it under popen2. > > If I run this request from the command line: > curl -i http://www.yahoo.com/test --stderr errfile > (also tried redirecting stdderr to a file 2>, nothing) the file e

a quick question about namespaces

2005-02-01 Thread Jay donnell
in the code below 'print locals()' shows mc2. What is the equivalent way to see the namespace that mc resides in? class myClass: --def func1(self): self.mc = 1 mc2 = 3 print 'in myClass.func1' print 'printing locals' print locals() print Google mungs up the spacing so I p

How run valgrind on Python C extensions?

2005-02-01 Thread [EMAIL PROTECTED]
I have Python C extensions that are giving me seg faults that I'd like to run valgrind on. Can I use valgrind on these through python?? HOW??? Is it easy or must I do some work like recompiling python source with the -g extension? Thanks! Chris -- http://mail.python.org/mailman/listinfo/pyth

Re: Python Code Auditing Tool

2005-02-01 Thread Robey Holderith
On Tue, 01 Feb 2005 21:52:28 -0800, Paul Rubin wrote: > Robey Holderith <[EMAIL PROTECTED]> writes: >> Does anybody know of a tool that can tell me all possible exceptions that >> might occur in each line of code? What I'm hoping to find is something >> like the following: > > That is impossible

Re: Newbie Question

2005-02-01 Thread Robey Holderith
On Tue, 01 Feb 2005 17:47:39 -0800, Joel Eusebio wrote: > > Hi Everybody, > > I'm pretty new to Python and would like to ask a few questions. I have this > setup on a Fedora Core 3 box. > > Python 2.3.4 > wxPython-common-gtk-ansi-2.5.3.1-fc2_py2.3 > mod_python-3.1.3-5 > Apache/2.0.52 > > I hav

Re: Where are list methods documented?

2005-02-01 Thread Bryan
Skip Montanaro wrote: Grant> where are the methods of basic types documented? The other day I suggested the most valuable doc page to bookmark is the global module index. Here's a demonstration. Start at: http://www.python.org/dev/doc/devel/modindex.html Click "__builtin__", which take

Re: variable declaration

2005-02-01 Thread Eric Pederson
"Thomas Bartkus" wrote > As has been pointed out, it's not a big deal for a programmer who's > been > there, done that. But the original posters example is a beginners trap > for > certain. > > *If* Python were a "beginners language", then it would be missing one > of > it's training wheels.

Re: a quick question about namespaces

2005-02-01 Thread Steven Bethard
Jay donnell wrote: in the code below 'print locals()' shows mc2. What is the equivalent way to see the namespace that mc resides in? class myClass: --def func1(self): self.mc = 1 mc2 = 3 print 'in myClass.func1' print 'printing locals' print locals() print I think you're loo

Re: How do you do arrays

2005-02-01 Thread Erik Max Francis
Dennis Lee Bieber wrote: Classic BASIC actually splits the difference. dim a(10) allocates 11 elements, indexed 0..10 -- but most classes tend to ignore element 0, and algorithms are as if only 10 elements exist starting at 1. Basic also has the OPTION BASE instruction, which affects that.

how to separate hexadecimal

2005-02-01 Thread jrlen balane
i have a 4 digit hex number (2 bytes) and i want to separate it into 2 digit hex (1 byte each) meaning i want to get the upper byte and the lower byte since i am going to add this two. how am i going to do this? should i treat it just like a normal string? please help, thanks. ex. hexa = '0x87BE"

Re: type of simple object

2005-02-01 Thread Pierre Barbier de Reuille
[EMAIL PROTECTED] a écrit : Thank you guys. My function should multiply every element of a list, for example "something" and "something" can be an integer or another list. If it deals with integer than it is ok, but If it deals with list than it become false for example list*2 = listlist, and what

Re: how to separate hexadecimal

2005-02-01 Thread Nick Coghlan
jrlen balane wrote: i have a 4 digit hex number (2 bytes) and i want to separate it into 2 digit hex (1 byte each) meaning i want to get the upper byte and the lower byte since i am going to add this two. how am i going to do this? should i treat it just like a normal string? please help, thanks. e

Re: how to separate hexadecimal

2005-02-01 Thread Paul Rubin
jrlen balane <[EMAIL PROTECTED]> writes: > ex. hexa = '0x87BE" # what i want to do is: > a = 0x87, b = 0xBE# so that i could do this: > c = a + b#which should be equal to 0x145 Assuming you really want hexa to begin with the characters '0x', the string slicing way is:

mixing SWIG generated and Python-level usertype?

2005-02-01 Thread Bo Peng
Dear list, My SWIG generated module (myModule) needs an array-like object (carray) to work. Carray objects are created both internally (in C++ level) and through Python so I have to load it when myModule initializes. carray is modified from arraymodule.c and is quite simple: static PyMethodDef a

<    1   2   3