Express thanks

2017-08-21 Thread Hamish MacDonald
I wanted to give a shout out to the wonderfully passionate contributions to python I've witnessed following this and other mailing lists over the last little bit. The level of knowledge and willingness to help I've seen are truly inspiring. Super motivating. Probably the wrong forum for such a

Re: How do you refer to an iterator in docs?

2012-04-20 Thread Jacob MacDonald
On Friday, April 20, 2012 6:41:25 AM UTC-7, Roy Smith wrote: > In article <4f910c3d$0$29965$c3e8da3$54964...@news.astraweb.com>, > Steven D'Aprano wrote: > > > I refer you to your subject line: > > > > "How do you refer to an iterator in docs?" > > > > In documentation, I refer to an iterator

Re: can I overload operators like "=>", "->" or something like that?

2012-04-20 Thread Jacob MacDonald
On Thursday, April 19, 2012 11:09:52 PM UTC-7, Ben Finney wrote: > alex23 writes: > > > On Apr 20, 5:54 am, Jacob MacDonald wrote: > > > > > On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: > > > > can I somehow overload operators like &q

Re: can I overload operators like "=>", "->" or something like that?

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: > hi all, > can I somehow overload operators like "=>", "->" or something like > that? (I'm searching for appropriate overload for logical implication > "if a then b") > Thank you in advance, D. I don't believe that you could overload t

Re: os.system()

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 11:09:22 AM UTC-7, Yigit Turgut wrote: > When I use os.system() function, script waits for termination of the > windows that is opened by os.system() to continue thus throwing errors > and etc. How can i tell Python to let it go and keep on with the next > execution afte

Re: with statement

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 10:15:23 AM UTC-7, Kiuhnm wrote: > A with statement is not at the module level only if it appears inside a > function definition or a class definition. > Am I forgetting something? > > Kiuhnm That sounds about right to me. However, I haven't really used with's very mu

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 5:21:20 AM UTC-7, Roy Smith wrote: > Let's say I have a function which takes a list of words. I might write > the docstring for it something like: > > def foo(words): >"Foo-ify words (which must be a list)" > > What if I want words to be the more general case of

Strange affinity side effect with multiprocessing.

2010-11-21 Thread Greg MacDonald
Hi Everyone, I'm having a strange problem with the multiprocessing package and Panda3D. Importing panda modules causes multiprocessing to only use one of my cores. I've created an example test case. It uses an infinite loop to ping the cores so you'll have to manually kill the python processes.

Re: Python Developer - HFT Trading firm - Chicago, IL

2010-08-21 Thread Scott MacDonald
Possibly relevant: http://www.nanex.net/FlashCrash/FlashCrashAnalysis_NBBO.html On Sat, Aug 21, 2010 at 4:22 PM, Lawrence D'Oliveiro wrote: > In message > , > Raymond > Hettinger wrote: > > > On Aug 21, 2:30 am, Lawrence D'Oliveiro > > > wrote: > > > >> Wasn’t HFT an exacerbating factor in jus

Re: import urllib2 fails with Python 2.6.1 on Vista

2009-01-19 Thread Scott MacDonald
I think I set it a long time ago to get the python VTK bindings working... On Mon, Jan 19, 2009 at 5:58 AM, Gabriel Genellina wrote: > En Sun, 18 Jan 2009 16:08:07 -0200, Scott MacDonald < > scott.p.macdon...@gmail.com> escribió: > > Ah yes, with your help I seem to have sol

Re: import urllib2 fails with Python 2.6.1 on Vista

2009-01-18 Thread Scott MacDonald
Ah yes, with your help I seem to have solved my own problem. I had PYTHONPATH defined to point to the 2.5 directory. Thanks! Scott On Sun, Jan 18, 2009 at 11:01 AM, Scott MacDonald < scott.p.macdon...@gmail.com> wrote: > Yes, I see your point. Not sure how that would happen. It is

Re: import urllib2 fails with Python 2.6.1 on Vista

2009-01-18 Thread Scott MacDonald
something like that? Thanks, Scott On Sun, Jan 18, 2009 at 12:44 AM, Gabriel Genellina wrote: > En Sat, 17 Jan 2009 17:13:00 -0200, Scott MacDonald > escribió: > > I googled a bit this morning search for an answer to this problem but have >> come up empty so far. Can anyone

import urllib2 fails with Python 2.6.1 on Vista

2009-01-17 Thread Scott MacDonald
I googled a bit this morning search for an answer to this problem but have come up empty so far. Can anyone help? Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 Traceba

Re: Python Dictionary Algorithm Question

2008-12-16 Thread Scott MacDonald
You might be interested in the "Beautiful Code" book: http://oreilly.com/catalog/9780596510046/ It has a chapter on Python's dict implementation that is pretty good. On Tue, Dec 16, 2008 at 10:51 AM, Brigette Hodson wrote: > Hello! I am in a beginning algorithms class this semester and I am work

Re: Programming exercises/challenges

2008-11-18 Thread Scott MacDonald
What size of a project are you looking to work on? I enjoy learning in a similar way as you it seems. Recently I have been interested in data visualization problems. Maybe trying to replicate something from a website like: http://www.visualcomplexity.com/vc/ would interest you? Scott On Tue, N

Re: import pysqlite2 or import sqlite3?

2007-11-22 Thread Mike MacDonald
On Nov 21, 3:02 pm, Hertha Steck <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using Python 2.5.1, Pysqlite 2.3.5 and SQLite 3.4.1 on Gentoo Linux. > I've always imported pysqlite using > > from pysqlite2 import dbapi2 > > and that works. If I try > > import sqlite3 > > I get > > Traceback (most rece

Re: Probably simple syntax error

2007-07-02 Thread Dustin MacDonald
Ah. Thank you everyone. Sorry for not replying earlier, real life got in the way :) Gerry Herron, Tim Delaney, Mark Peters: Thank you. Switching from parentheses to square brackets fixed the code, and yes, Tim, you were right. It was a list I was working with. And thanks for those links Tim. John

Probably simple syntax error

2007-07-01 Thread Dustin MacDonald
Hi everyone. This is my first time posting to this newsgroup, and although I maintain my netiquette I might've missed something specific to the newsgroup, so hopefully you can avoid flaming me if I have :) I apologize for the length of this post but I figure the more information the better. My pr

Re: Confusion over calling a nested function inside a parent function

2006-12-22 Thread MacDonald
Pyenos wrote: > [code] > class WORK: > def getwork(self): > def choosetable(self):pass > choosetable() #TypeError: choosetable() takes exactly 1 > #argument (0 given) > [/code] > > Calling choosetable() at the above location gives me the error > described

Re: how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread MacDonald
yichao.zhang wrote: > I'm trying to match the characters from u'\uff00' to u'\uff0f'. > the code below and get a TypeError. > p = re.compile(u'\uff00'-u'\uff0f') > Traceback (most recent call last): > File "", line 1, in ? > TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode' >

Re: Killing a thread

2006-06-11 Thread MacDonald
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > >> it cannot be done in a portable way, so that's not very likely. > > > def __run(self): > > """Hacked run function, which installs the trace.""" > > sys.settrace(self.globaltrace) > > self.__run_backup() > > self.run = self.__r

Re: Interpreting Unicode scripts

2006-02-05 Thread Keith MacDonald
That document did help, thanks, although I was initially disconcerted to see that it's written in the future tense. Anyway, it works with Python 2.4. Keith MacDonald "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > reading PEP

Interpreting Unicode scripts

2006-02-05 Thread Keith MacDonald
, Keith MacDonald -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading in external file - error checking and line numbers...

2005-09-07 Thread Hugh Macdonald
dependency to non frame-based node' Unfortunately, I don't know how many 'ripple' stack items there will be... This is why I'd much rather, if I can, do this without exceptions and just be able to print out my own error message with the problem line number marked Or am I asking too much? ;) -- Hugh Macdonald -- http://mail.python.org/mailman/listinfo/python-list

Reading in external file - error checking and line numbers...

2005-09-07 Thread Hugh Macdonald
to flag it accurately to the user Hope this made sense - let me know if I've confused you at all. -- Hugh Macdonald -- http://mail.python.org/mailman/listinfo/python-list

Re: C API : Creating a Py_Method object from a C function.

2005-07-12 Thread Hugh Macdonald
Thanks Martin - that worked wonderfully For the record (and for anyone searching for this in future), here's the code that worked (with names changed to protect my job...) myPython is the C++/Python interface class containing static methods which pass on calls to the underlying python modul

C API : Creating a Py_Method object from a C function.

2005-07-11 Thread Hugh Macdonald
allow me to do this... Thanks for any advice! -- Hugh Macdonald -- http://mail.python.org/mailman/listinfo/python-list

Re: Hacking the scope to pieces

2005-05-24 Thread Hugh Macdonald
Maybe I misunderstood what you meant, but I couldn't quite manage to get this one working My initial hopes about __import__() were that I could define it inside my new module (moduleLoader) and, when the module is imported, it could do stuff (like try to hold onto the vars() and globals() from

Re: Hacking the scope to pieces

2005-05-24 Thread Hugh Macdonald
I will take a look! Thanks Skip -- Hugh -- http://mail.python.org/mailman/listinfo/python-list

Hacking the scope to pieces

2005-05-24 Thread Hugh Macdonald
os.getenv("MODULE_VERSION"), globals()) import moduleLoader moduleLoader.loadModule("myModule", os.getenv("MODULE_VERSION")) from moduleLoader import myModule What I'm after is a way of moduleLoader.loadModule working back up the scope and placing the imported module in the main global scope. Any idea how to do this? -- Hugh Macdonald -- http://mail.python.org/mailman/listinfo/python-list