RE: properly delete item during "for item in..."

2008-07-17 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Ratko > Sent: Thursday, July 17, 2008 12:27 PM > To: [email protected] > Subject: properly delete item during "for item in..." > > Say you have something like this: > > for item in myLis

Re: trying to match a string

2008-07-18 Thread Andrew Freeman
oj wrote: On Jul 18, 12:10 pm, John Machin <[EMAIL PROTECTED]> wrote: On Jul 18, 9:05 pm, oj <[EMAIL PROTECTED]> wrote: On Jul 18, 11:33 am, [EMAIL PROTECTED] wrote: Hi, Hi, I am taking a string as an input from the user and it should only contain the chars

Re: trying to match a string

2008-07-18 Thread Andrew Freeman
Andrew Freeman wrote: oj wrote: On Jul 18, 12:10 pm, John Machin <[EMAIL PROTECTED]> wrote: On Jul 18, 9:05 pm, oj <[EMAIL PROTECTED]> wrote: On Jul 18, 11:33 am, [EMAIL PROTECTED] wrote: Hi, Hi, I am taking a string as an input from the user an

Re: x, = y (???)

2008-07-18 Thread Andrew Freeman
kj wrote: I just came across an assignment of the form x, = y where y is a string (in case it matters). 1. What's the meaning of the comma in the LHS of the assignment? 2. How could I have found this out on my own? (Regarding (2) above, I consulted the index of several Python reference boo

Re: trying to match a string

2008-07-18 Thread Andrew Freeman
>> def match(var): >>> if re.search(r'^[LRM]*$', var): ... print 'Valid' ... else: ... print 'Invalid' >>> >>> eg = 'LRLRLRLRLM' >>> match(eg) Valid >>> fg = 'LRLRLRNL' >>> match(fg) Invalid -- Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to match a string

2008-07-19 Thread Andrew Freeman
John Machin wrote: On Jul 19, 12:04 pm, Andrew Freeman <[EMAIL PROTECTED]> wrote: To show if valid: if re.search(r'^[LRM]*$', 'LM'): print 'Valid' A couple of points: (1) Instead of search(r'^blahblah', ...) use match(r'bla

Re: trying to match a string

2008-07-19 Thread Andrew Freeman
Andrew Freeman wrote: John Machin wrote: A couple of points: (1) Instead of search(r'^blahblah', ...) use match(r'blahblah', ...) (2) You need to choose your end-anchor correctly; your pattern is permitting a newline at the end: I forgot to change search to match. This sh

Re: trying to match a string

2008-07-19 Thread Andrew Freeman
John Machin wrote: On Jul 20, 5:00 am, Andrew Freeman <[EMAIL PROTECTED]> wrote: Andrew Freeman wrote: John Machin wrote: A couple of points: (1) Instead of search(r'^blahblah', ...) use match(r'blahblah', ...) (2) You need to choose your end-anchor

Re: trying to match a string

2008-07-20 Thread Andrew Freeman
John Machin wrote: On Jul 20, 11:14 am, Andrew Freeman <[EMAIL PROTECTED]> wrote: John Machin wrote: (4) I highly doubt that this code was actually to be used in an interactive session, The offending code is a nonsense wherever it is used. the False/True outp

Re: Converting List of String to Integer

2008-07-21 Thread Andrew Freeman
9 0 ...: """ In [3]: In [4]: d = t.split("\n") In [5]: for x in range(1,len(d)-1): ...: a.append(d[x].split(" ")) ...: ...: In [6]: a Out[6]: [['1', '2'], ['3'], ['4', '5', '6'], ['7', '8', '9', '0']] In [7]: n = [[int(i) for i in k] for k in a] In [8]: n Out[8]: [[1, 2], [3], [4, 5, 6], [7, 8, 9, 0]] -- Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting List of String to Integer

2008-07-21 Thread Andrew Freeman
Samir wrote: On Jul 21, 6:15 pm, Andrew Freeman <[EMAIL PROTECTED]> wrote: Samir wrote: On Jul 21, 3:20 pm, Gary Herron <[EMAIL PROTECTED]> wrote: Samir wrote: Hi Everyone, I am relatively new to Python so please forgive me for what seems l

Re: Converting List of String to Integer

2008-07-21 Thread Andrew Freeman
ery time you use it. -- Andrew -- http://mail.python.org/mailman/listinfo/python-list

RE: New to Python, familiar with Perl - Seeking info sources

2008-07-24 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Brett Ritter > Sent: Thursday, July 24, 2008 9:54 AM > To: [email protected] > Subject: New to Python, familiar with Perl - Seeking info sources > > After many years happily coding Perl,

Class definition attribute order

2008-08-01 Thread Andrew Lentvorski
How do I determine the order of definition of class attributes? For example, if I have a class class Test(object): y = 11 x = 22 How do I tell that y was defined before x? Thanks, -a -- http://mail.python.org/mailman/listinfo/python-list

Interconvert a ctypes.Structure to/from a binary string?

2008-08-01 Thread Andrew Lentvorski
Basically, I'd like to use the ctypes module as a much more descriptive "struct" module. Is there a way to take a ctypes.Structure-based class and convert it to/from a binary string? Thanks, -a -- http://mail.python.org/mailman/listinfo/python-list

Re:Histogram and \lambda parameter of the laplacian curve.

2008-08-02 Thread Andrew Reed
even i am trying to generate this curve. are you able to generate this curve using matplotlib, because i was thinking to write a library for it. -- Andrew. >Thanks everyone for your earlier help. >I have to plot a histogram of values lets say [0.5,0.6,0.8,0.9].I guess the >histog

RE: Monitor and compare two log files in real time

2008-08-06 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of m > Sent: Wednesday, August 06, 2008 1:25 PM > To: [email protected] > Subject: Monitor and compare two log files in real time > > I have a script I would like to write but I am not sure

RE: Is this a good time to start learning python?

2008-03-31 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Rui Maciel > Sent: Monday, March 31, 2008 12:41 PM > To: [email protected] > Subject: Is this a good time to start learning python? > > Recently I woke up inclined to take up the task of l

RE: Is this a good time to start learning python?

2008-04-01 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Ant > Sent: Monday, March 31, 2008 5:58 PM > To: [email protected] > Subject: Re: Is this a good time to start learning python? > > On Mar 31, 5:40 pm, Rui Maciel <[EMAIL PROTECTED]> wrot

Re: Best way to check if string is an integer?

2008-04-05 Thread Andrew Warkentin
[EMAIL PROTECTED] wrote: >which is the best way to check if a string is an number or a char? >could the 2nd example be very expensive timewise if i have to check a >lot of strings? > >this > >value = raw_input() > >try: >value = int(value) >except ValueError: >print "value is not an intege

RE: Stripping scripts from HTML with regular expressions

2008-04-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Michel Bouwmans > Sent: Wednesday, April 09, 2008 3:38 PM > To: [email protected] > Subject: Stripping scripts from HTML with regular expressions > > Hey everyone, > > I'm trying to stri

RE: Stripping scripts from HTML with regular expressions

2008-04-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Michel Bouwmans > Sent: Wednesday, April 09, 2008 3:38 PM > To: [email protected] > Subject: Stripping scripts from HTML with regular expressions > > Hey everyone, > > I'm trying to stri

RE: basic python question about for loop

2008-04-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of jmDesktop > Sent: Wednesday, April 09, 2008 4:51 PM > To: [email protected] > Subject: basic python question about for loop > > >From the Python.org tutorial: > > >>> for n in range(2, 1

RE: basic python question about for loop

2008-04-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of jmDesktop > Sent: Wednesday, April 09, 2008 5:04 PM > To: [email protected] > Subject: Re: basic python question about for loop > > > > > > >>> for n in range(2, 10): > > > ...     for x

RE: How can I use quotes without escaping them using CSV?

2008-04-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of jeffself > Sent: Wednesday, April 09, 2008 5:11 PM > To: [email protected] > Subject: How can I use quotes without escaping them using CSV? > > > If I put an escape character in, it work

RE: Stripping scripts from HTML with regular expressions

2008-04-10 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Michel Bouwmans > Sent: Wednesday, April 09, 2008 5:44 PM > To: [email protected] > Subject: RE: Stripping scripts from HTML with regular expressions > > > Thanks! That did the trick. :) I

Re: Adding classes to modules at runtime from outside that module

2008-04-10 Thread Andrew Warkentin
[EMAIL PROTECTED] wrote: > In Python, is it possible to add classes to a module at run-time? > > Say I have a module foo and a module bar. Foo has class A and B, and >bar has class C. I want to add class C to foo so I can access it as >foo.C, but i want to do it without modifying foo's source. >

Suitable libraries for implementing a "push"-type matching engine?

2008-04-11 Thread Andrew Warkentin
I am trying to write a matching engine for a matching language for a filtering proxy compatible with that of The Proxomitron. The matching language is basically an extended superset of shell-style globs, with functionality comparable to regexps (see http://www.proxomitron.info/45/help/Matching%

PyGTK GUI update without signals from GUI

2008-04-12 Thread Andrew Lapidas
Hi All: I am currently having a problem updating a GUI. I am using PyGTK and Glade to design an interface for a project. This interface contains no buttons, just images, labels, and a progress bar. The code for the project is small, and it basically does some things independent of the GUI in an

Dynamic use of property() fails

2008-04-14 Thread andrew cooke
one) assertEqual(dao.name, "value") I get a failure because lookup of the attribute is returning "". That is quite reasonable, but I was under the expression that some magic was supposed to happen, as described in the document referenced above! Please can someone explain why there

Re: Dynamic use of property() fails

2008-04-14 Thread andrew cooke
values but class properties, so i'll rethink things. thanks very much! > __special__ names are reserved for Python internal usage; don't use them. > Implementation-only attributes ("private" ones) are spelled with a single > underscore. ah, yes, sorry about that. th

Re: Dynamic use of property() fails

2008-04-15 Thread andrew cooke
g was that the descriptor is only called in the class context, so would be called if, say, a subclass tried to redefine age. but maybe i am still confused. i am about to go to sleep. i guess i will try your code exactly tomorrow, but it looks very close to mine which showed this problem. are you sure your solution works? thanks, andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic use of property() fails

2008-04-15 Thread andrew cooke
ignore that - i was mistaken (my test was too complex). the problem seems to be that the attribute is deleted even though __delete__ is defined. i'll look at it tomorrow. thanks again, andrew On Apr 15, 4:50 am, andrew cooke <[EMAIL PROTECTED]> wrote: > i tried code very similar

Re: Dynamic use of property() fails

2008-04-15 Thread andrew cooke
OK, fixed my bug - it does work. Now sleep... Thanks again, Andrew -- http://mail.python.org/mailman/listinfo/python-list

RE: vary number of loops

2008-04-16 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Tim Chase > Sent: Wednesday, April 16, 2008 9:53 AM > To: [EMAIL PROTECTED] > Cc: [email protected] > Subject: Re: vary number of loops > > > > > If n=3, I want to have 3 sets of elements

Metaprogramming Example

2008-04-16 Thread andrew cooke
mming task that uses metaclasses and descriptors. I'd also appreciate further feedback if I've done anything stupid or if there's some interesting approach I've missed that might work better. Thanks again, Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Metaprogramming Example

2008-04-17 Thread andrew cooke
(and I'm unsure now why I didn't write it that way myself). Is there some common Python standard that prefers "foo == False" to "not foo"? Thanks, Andrew PS Is there anywhere that explains why Decorators (in the context of functions/methods) are so good? I've read

Re: Can't do a multiline assignment!

2008-04-17 Thread Andrew Lee
[EMAIL PROTECTED] wrote: >> Yuck! No way!! If you *want* to make your code that hard to read, I'm >> sure you can find lots of ways to do so, even in Python, but don't >> expect Python to change to help you toward such a dubious goal. >> > > Well, my actual code doesn't look like that. Trust me,

Re: Metaprogramming Example

2008-04-17 Thread andrew cooke
at python was a disaster, rather that the "iceberg" is still there (i am not 100% sure what the iceberg is, but it's something to do with making namespaces explicit in some places and not others). anyway, it was only a small point. thanks for all the replies. didn't respond earli

Re: Metaprogramming Example

2008-04-19 Thread andrew cooke
have a clear argument - something just feels "odd". at the same time, i know that language design is a practical business and so this is probably not important. finally, thank you for pointing me to sql alchemy (i think it was you?). it really is excellent. andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking if a text file is blank

2008-04-19 Thread Andrew Lee
[EMAIL PROTECTED] wrote: > Greetings! > > I've just started learning python, so this is probably one of those > obvious questions newbies ask. > > Is there any way in python to check if a text file is blank? > > What I've tried to do so far is: > > f = file("friends.txt", "w") >

Re: Checking if a text file is blank

2008-04-20 Thread Andrew Lee
David wrote: >> import os >> print os.lstat("friends.txt")[6] >> > > I prefer os.lstat("friends.txt").st_size MUCH easier to remember Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: "Help needed - I don't understand how Python manages memory"

2008-04-21 Thread Andrew MacIntyre
'this is a test string pattern' >>> z2 = 'this is a test string pattern' >>> z1 is z2 False Careful use of interning can get a double boost: cutting memory consumption and allowing comparisons to short circuit on identity. It does cost in maintainin

Re: help needed with classes/inheritance

2008-04-23 Thread Andrew Lee
good OOD. Does that make any sense? Seriously -- I have not had any coffee yet and I am still new at Python. -- Andrew My question is: can it be done using inheritance ? I recall that I need three distinct objects: the basic (non-oriented) body, the same body with positive ori

RE: Python Success stories

2008-04-23 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of azrael > Sent: Tuesday, April 22, 2008 6:26 AM > To: [email protected] > Subject: Python Success stories > > Hy guys, > A friend of mine i a proud PERL developer which always keeps making >

Logging ancestors ignored if config changes?

2008-04-25 Thread andrew cooke
he config file, are called. Is this a bug? Am I doing something stupid? To me the above seems like a natural way of using the system... Thanks, Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Logging ancestors ignored if config changes?

2008-04-26 Thread andrew cooke
n, in some module: from acooke.util.log import Log log = Log(__name__) [...] class Foo(object): def my_method(self): log.debug("this works as expected") Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: MatplotLib errors

2008-04-29 Thread Andrew Lee
Thomas Philips wrote: I have just started using MatPlotLib, and use it to generate graphs from Python simulations. It often happens that the graph is generated and a Visual C++ Runtime Library error then pops up: Runtime Error! Program C:\Pythin25\Pythonw.exe This application has requested the

ffmpeg hangs when executed from python

2008-04-29 Thread Andrew English
I have tried a few methods of executing ffmpeg from within python and it has hanged every time. Two of the configurations I tried are: def convertFileToFlash(filename): commandString = "./convertasftoswf.sh " + getSaveDirectory() + " " + filename logging.debug("RUNNING: " + commandString)

Re: Given a string - execute a function by the same name

2008-05-08 Thread Andrew Koenig
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm parsing a simple file and given a line's keyword, would like to call > the equivalently named function. No, actually, you woudn't :-) Doing so means that if your programs input specification ever changes, you have to rename all

RE: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of grbgooglefan > Sent: Friday, May 09, 2008 9:41 AM > To: [email protected] > Subject: How to modify meaning of builtin function "not" to "!"? > > I am creating functions, the return result o

RE: Good python equivalent to C goto

2008-08-18 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Kurien Mathew > Sent: Saturday, August 16, 2008 5:21 PM > To: [email protected] > Subject: Good python equivalent to C goto > > Hello, > > Any suggestions on a good python equivalent for

RE: how many nested for can we utilize?

2008-08-18 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Lie > Sent: Monday, August 18, 2008 11:04 AM > To: [email protected] > Subject: Re: how many nested for can we utilize? > > On Aug 17, 4:23 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >

RE: How to use win32com to convert a MS WORD doc to HTML ?

2008-08-19 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Lave > Sent: Tuesday, August 19, 2008 10:06 AM > To: [email protected] > Subject: How to use win32com to convert a MS WORD doc to HTML ? > > Hi, all ! > > I'm a totally newbie huh:) > >

Re: The Importance of Terminology's Quality

2008-08-20 Thread Andrew Reilly
out the power or other characteristics of programming languages. Certainly anyone who's programmed a machine in assembly language has a pretty fair understanding of what the machine and the machine language is doing, even though they don't choose to bang the bits together manually. Hope you get better. -- Andrew -- http://mail.python.org/mailman/listinfo/python-list

RE: Renaming Excel Spreadsheets

2008-08-26 Thread Reedick, Andrew
Excel object model: http://msdn.microsoft.com/en-us/library/bb149081.aspx I think the Sheets object is where you add more sheets to a workbook. You can google for code examples on how to use COM with Excel. You don't have to limit yourself to Python code examples since COM

Re: def X(l=[]): weirdness. Python bug ?

2008-08-28 Thread Andrew Lee
Bart van Deenen wrote: Hi all. I've stumbled onto a python behavior that I don't understand at all. Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) # function def X(l=[]): l.append(1) print l # first call of X X() [1] #second call of X X() [1, 1] Where does the list parameter 'l'

RE: decent interactive python shell on MS Windows?

2008-10-01 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Wednesday, October 01, 2008 12:54 PM > To: [email protected] > Subject: decent interactive python shell on MS Windows? > Is there an interactive Python shell

Re: linux clipboard?

2006-03-07 Thread Andrew Gwozdziewycz
On Mar 7, 2006, at 10:00 PM, [EMAIL PROTECTED] wrote: > ah.. ok. > gnome it is. > > are there py commands for gnome? > Since gnome uses gtk, you're best bet would be to check the pygtk documentation --- Andrew Gwozdziewycz [EMAIL PROTECTED] http://ihadagreatview.org

Re: ODBC module and strange date reference <...>

2006-03-08 Thread Andrew MacIntyre
e (as of VC7.0) changes. The standard installers for Python 2.1, 2.2 & 2.3 were all built with VC6, while Python 2.4 is built with VC7.1. ----- Andrew I MacIntyre "These thoughts are mine alone...&quo

embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
en struggling with this problem for about a week now. Having been seduced by Python's power and beauty I'd hate to have to abandon it and switch to Perl or some other crappy scripting language! Please help... Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
fect? That's the way I'm about > to go. I couldn't get the PyRun_*File* calls to work on Windows, presumably because of the FILE* problem mentioned in the docs. I'll be very surprised if it makes any difference to the memory leak problem. Let me know how you get on! Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Evangelism

2006-03-09 Thread Andrew Gwozdziewycz
me. Python has a ton of good projects and a ton of users. What we don't have is ruby on rails and the web 2.0 crowd, and I say, who the hell cares? We have everything else. -- Andrew Gwozdziewycz <[EMAIL PROTECTED]> http://ihadagreatview.org http://plasticandroid.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Evangelism

2006-03-09 Thread Andrew Gwozdziewycz
g something with Ruby On Rails knows that ruby is the language behind it. Does some non programmer care? No. If some non-programmer decided to create a new web app, and his friend said, 'I hear django is quick and oh, it use's this really cool easy to learn language python,' What's the difference? Is calling it Python on Trees any different? The guy doesn't know what python on is, let alone why it's on trees? --- Andrew Gwozdziewycz [EMAIL PROTECTED] http://ihadagreatview.org http://and.rovir.us -- http://mail.python.org/mailman/listinfo/python-list

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
Torsten Bronger <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Andrew Trevorrow) writes: > > > [...] > > > > I couldn't get the PyRun_*File* calls to work on Windows, presumably > > because of the FILE* problem mentioned in the docs. > > Whi

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
n which Python is embededded. Even worse, if a script has a (Python) memory leak then there's nothing the app can do about it. It would be great if wrapping each script inside Py_Initialize/Py_Finalize could avoid all that. I've been told that the next version of Python will release memory, so that's good news. You can get it now if you're willing to build Python from the latest source code. Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Evangelism

2006-03-10 Thread Andrew Gwozdziewycz
s the intended name... If the community then decides on some standardized automated package management, I'm sure PyPI (cheese shop) would probably be the definitive repository. $ pypi install hello is much better than $ bluecheese install hello -- Andrew Gwozdziewycz

What has become of the Python 2004 papers?

2006-03-11 Thread Andrew Koenig
http://www.python.org/community/pycon/dc2004 seems to have vanished... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pop random item from a list?

2006-03-11 Thread Andrew Gwozdziewycz
he main reason I am answering your mail is because you may have > intended to > post on c.l.py] > > Regarding your enhancement, I don't see any use cases that aren't > handled by > random.sample() already. > > Regards, > Peter I can see a us

RE: What has become of the Python 2004 papers?

2006-03-11 Thread Andrew Koenig
> Try here: > > http://us.pycon.org/zope/original/pycon/pastevents/dc2004 > I see summaries of the paper, but when I follow the link for the papers themselves, it leads to the same dead end. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cheese Shop -> BSOL?

2006-03-11 Thread Andrew Gwozdziewycz
a healthy language. I can read it and write it without going blind or crazy. Ok, maybe I'm pushing it here. >Better eggs.python.org. Would support the spread of the new file >format, too. eggs.python.org actually seems quite good to me. It'd be even cooler if we cou

Re: Python vs. Java gzip performance

2006-03-17 Thread Andrew MacIntyre
ity though). gzip is available for most systems, and the approach is easily modified to use bzip2 as well (though Python's bz2 module is implemented totally in C, and so probably doesn't have the performance issues that gzip has). --

Re: Multiplying sequences with floats

2006-03-24 Thread Andrew Koenig
"Christoph Zwerschke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Anyway this would be an argument only against the variant of typecasting a > float with a fractional part. But what about the other variant which > raises an error if there is a fractional part, but works if the

Re: What's The Best Editor for python

2006-03-25 Thread Andrew Gwozdziewycz
grams( for linux or windows ) --- Andrew Gwozdziewycz [EMAIL PROTECTED] http://ihadagreatview.org http://and.rovir.us -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting all permutations of a substring

2006-04-05 Thread Andrew Gwozdziewycz
easiest way to do that is to just check to see if the probestring starts a string at the current index of the string... def count_proper_substrings_equal_to(target, probe): i = 0 count = 0 while i < len(target): if target[i:].startswith(probe):

Re: How to parse a name out of a web page?

2006-04-05 Thread Andrew Gwozdziewycz
- > http://mail.python.org/mailman/listinfo/python-list Surely, this is a task for http://nltk.sourceforge.net/ . Especially if you want high accuracy. --- Andrew Gwozdziewycz [EMAIL PROTECTED] http://ihadagreatview.org http://and.rovir.us -- http://mail.python.org/mailman/listinfo/python-list

LINKFORSHARED problem on Mac OS 10.4

2006-04-05 Thread Andrew Trevorrow
mably that's not a good long-term solution. This is my first project using gcc, makefiles, frameworks, Python, etc, so I'm still somewhat foggy about lots of things. Any advice would be much appreciated! Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Splitting a string with extra parameters

2006-04-06 Thread Andrew Gwozdziewycz
d. This would fail if (and this too my knowledge is proper CSV): "Col 1 data 2,000", Col 2 data 3000, "Col 3 data 4,000" Since the second element doesn't have a comma, it doesn't have to be quoted. It's probably best to use the built in CSV parser assuming your

Tkinter problem on Mac OS X

2006-04-09 Thread Andrew Trevorrow
e root.mainloop() call? I've read Fredrik Lundh's excellent tutorial on Tkinter and done a lot of googling but haven't been able to find a solution. I can probably add some Mac-specific code to detect a menu change after a script ends and then rebuild our menus, but I'm hoping

Giving your C/C++ Application a Python Command Line...

2006-04-10 Thread Andrew McCall
have read the documents on embedding Python and I can give my application a command line, but I am having issues exposing my C/C++ functions to Python. Does anyone know of any tutorials or example code that show how to do this? Thanks, Andrew McCall -- http://mail.python.org/mailman/listinfo/p

Problem embedding Python...

2006-04-10 Thread Andrew McCall
\DOCUME~1\ANDY~1.MCC\LOCALS~1\Temp/cckhbaaa.o(.text+0x1c2):main.cpp: undefined reference to `_imp__PyImport_AddModule' C:\DOCUME~1\ANDY~1.MCC\LOCALS~1\Temp/cckhbaaa.o(.text+0x1f0):main.cpp: undefined reference to `_imp__Py_InitModule4' collect2: ld returned 1 exit status Execution terminated Can anyone help me please? Thanks, Andrew. -- http://mail.python.org/mailman/listinfo/python-list

buffer interface problem

2010-01-07 Thread Andrew Gillanders
erring to? Have some functions been changed to pass buffer objects instead of strings? How can I fix the source code to make it run? Any help appreciated Andrew (Python newbie) -- http://mail.python.org/mailman/listinfo/python-list

Re: buffer interface problem

2010-01-07 Thread Andrew Gillanders
port the buffer API (I am guessing a conflict between split and read?) Sorry, I am new to Python, so how do I get a Traceback? Thanks Andrew On 07/01/2010, at 7:13 PM, Chris Rebert wrote: On Thu, Jan 7, 2010 at 12:19 AM, Andrew Gillanders wrote: I have run into a problem running a Pyth

Re: ctypes for AIX

2010-01-24 Thread Andrew MacIntyre
Waddle, Jim wrote: Is there a policy concerning getting functions like ctypes working on AIX. If you can get it working, post a patch on the bug tracker. -- - Andrew I MacIntyre "These thought

Function name unchanged in error message

2010-01-29 Thread andrew cooke
eturn 7 ... >>> foo.__name__ = 'bar' >>> foo(123) Traceback (most recent call last): File "", line 1, in TypeError: foo() takes no arguments (1 given) Thanks, Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
i'm just reading through at the moment and this is the first one i've got to that will help me solve it, but i don't mean to exclude anything later...!) andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
in the standard lib, but couldn't find it. andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
e how the same functionality is available in the types module for 3 - am i missing something obvious? http://docs.python.org/library/new.html http://docs.python.org/3.1/library/types.html#module-types thanks, andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
On Jan 30, 7:17 pm, andrew cooke wrote: > On Jan 29, 5:37 pm, "Gabriel Genellina" > wrote: > > > The decorator module is a very fine addition to anyone's tool set -- but   > > in this case it is enough to use the wraps() function from the functools   >

Re: Function name unchanged in error message

2010-01-30 Thread andrew cooke
On Jan 29, 1:09 pm, Michele Simionato wrote: > On Jan 29, 2:30 pm, andrew cooke wrote: > > > Is there any way to change the name of the function in an error > > message?  In the example below I'd like the error to refer to bar(), > > for example (the motivation i

Re: importing with .m instead of .py

2009-09-25 Thread Andrew Svetlov
On Sep 25, 1:16 pm, Wanderer wrote: > execfile(x) does what I'm looking for. > Perhaps you are looking for Python import hook: http://www.python.org/dev/peps/pep-0302/ In you import hook you can do everything (and locate/import file with any extension :) -- http://mail.python.org/mailman/listi

Re: Comparison of parsers in python?

2009-09-26 Thread andrew cooke
python 2.6+ only, and while i have quite a few users (or, at least, downloads), i doubt that many use these more advanced features, and everything is pure python with little performance tuning so far. andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Python resident memory retention & Evan Jones' improvements

2009-10-02 Thread Andrew MacIntyre
x27;t kick in. To get a deeper understanding of your issue will require deeper debugging. I have done this at times by building Python with a wrapper around malloc() (& friends) to log memory allocation activity. -- ---

Problem with subprocess module on Windows with open file in append mode

2009-10-03 Thread Andrew Savige
When I run this little test program on Linux: import subprocess subprocess.call(["python","-V"], stderr=open("log.tmp","a")) the file log.tmp is appended to each time I run it. When I run it on Windows, however, the file log.tmp gets overwritten each time I run it. Though I can make it append on

Re: Checking a Number for Palindromic Behavior

2009-10-19 Thread Andrew Henshaw
> wrote in message >news:63dea9e7-97af-4b20-aa0a-c762d9944...@a21g2000yqc.googlegroups.com... >On Oct 18, 4:20 pm, MRAB wrote: >> Benjamin Middaugh wrote: >> > Thanks to everyone who helped with my query on reversing integers. I >> > have one more simple problem I'm having trouble solving. I want

Re: questions regarding stack size use for multi-threaded python programs

2009-11-13 Thread Andrew MacIntyre
ffect that threshold. -- ----- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: [email protected] (pref) | Snail: PO Box 370 [email protected] (alt) |Belconnen ACT 2616 Web:http://www.andymac.org/

recv_into(bytearray) complains about a "pinned buffer"

2010-01-31 Thread Andrew Dalke
hon 3.1.1 (r311:74480, Jan 31 2010, 23:07:16) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> sock = socket.socket() >>&

Re: recv_into(bytearray) complains about a "pinned buffer"

2010-01-31 Thread Andrew Dalke
ught it was, but I don't know if this was a deliberate choice or accidental. BTW, 2.7 (freshly built from version control) also has the same exception. > You could open an issue on the bug tracker for this. I've done that. It's http://bugs.python.org/issue7827 . Cheers!

Re: recv_into(bytearray) complains about a "pinned buffer"

2010-02-01 Thread Andrew Dalke
t's being used with an array. Why shouldn't people use it with Python 2.x? Andrew [email protected] -- http://mail.python.org/mailman/listinfo/python-list

Import question

2010-02-05 Thread Andrew Degtiariov
n submodule named c:\users\ad\project\src\project.api.config.project.api.config >>> There is setup.py for project.api.config: import os from setuptools import setup, find_packages name = "project.api.config" install_requires = [ 'zc.buildout', 'setuptools',

<    12   13   14   15   16   17   18   19   >