Condition in C API

2012-03-22 Thread Matt Joiner
Is there a Condition-like object exposed in the CPython C API? I've found PyThread_lock_type, but nothing condition-like. -- http://mail.python.org/mailman/listinfo/python-list

shouldn't ctypes cast as it does in C?

2011-08-11 Thread Matt Joiner
http://www.mememaker.net/images/public/201108110739296015.jpg -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] allow line break at operators

2011-08-11 Thread Matt Joiner
+0.5 The "trailing \" workaround is nonobvious. Wrapping in () is noisy and already heavily used by other syntactical structures. Since a final ':' is needed anyway, i think this would be great. if a and b or c: do stuff() On Thu, Aug 11, 2011 at 11:02 PM, MRAB wrote: > On 11/08/2011 05:16

Re: [Python-ideas] allow line break at operators

2011-09-01 Thread Matt Joiner
I guess the issue here is that you can't tell if an expression is complete without checking the indent of the following line. This is likely not desirable. On Thu, Sep 1, 2011 at 11:43 PM, Yingjie Lan wrote: > Hi Matt, > === > Fro

GIL switch interval

2011-09-13 Thread Matt Joiner
i'm curious as to what can be done with (and handled better) by adjusting sys.setswitchinterval i've opened a question on SO for this, that people might find of interest: http://stackoverflow.com/questions/7376776/sys-setswitchinterval-in-python-3-2-and-beyond -- http://mail.python.org/mailman/li

Re: python install on locked down windows box?

2011-09-22 Thread Matt Joiner
5 is the best solution, followed by 2 and 3. On Sep 22, 2011 11:02 PM, "Steven D'Aprano" < steve+comp.lang.pyt...@pearwood.info> wrote: > Chris Withers wrote: > >> Hi All, >> >> Is there a way to install python on a locked down Windows desktop? >> (ie: no compilers, no admin rights, etc) > > (1) Br

Re: Python deadlock using subprocess.popen and communicate

2011-09-23 Thread Matt Joiner
how do you get the call stacks like this? On Sat, Sep 24, 2011 at 3:59 AM, Atherun wrote: > On Sep 23, 10:47 am, Nobody wrote: >> On Fri, 23 Sep 2011 06:59:12 +0100, Nobody wrote: >> >> kernel32.dll!WaitForSingleObject+0x12 >> >> python26.dll!_Py_svnversion+0xcf8 >> >> > I haven't a clue how thi

Re: Why is the shutil module called shutil?

2011-09-24 Thread Matt Joiner
Please continue On Sun, Sep 25, 2011 at 8:36 AM, rantingrick wrote: > On Sep 23, 10:36 pm, Fletcher Johnson wrote: >> The topic says it all: >> Why is shutil named shutil? What does it stand for? This is just a >> mild curiosity of mine. >> The shutil module for >> reference:http://docs.python.

socket.socket.makefile

2011-11-13 Thread Matt Joiner
I'm writing an alternative socket module, and have come across the code for the makefile call, which mentions the following: (XXX refactor to share code?) http://hg.python.org/cpython/file/27adb952813b/Lib/socket.py#l149 Has this been refactored elsewhere? Is there something I can use to wrap the S

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-23 Thread Matt Joiner
Moving to C++ is _always_ a step backwards. On Thu, Nov 24, 2011 at 9:29 AM, Alan Meyer wrote: > On 11/23/2011 12:38 PM, W. eWatson wrote: >> >> So unless Alan Meyer has further interest in this, it looks like it's at >> an end. >> >> It may be time to move on to c++. >> > > C++ is a ton of fun.

Re: Does py2app improves speed?

2011-11-24 Thread Matt Joiner
Yes. Try posting your code. On Fri, Nov 25, 2011 at 1:02 AM, Ricardo Mansilla wrote: > Most of méthods for improving the speed are related to efficient memory > management and using specific structures for a specific tasks... But i have > already optimized my code (which is very short actually)

Re: reading optional configuration from a file

2011-11-24 Thread Matt Joiner
   REMOTE_HOST = 'localhost'    REMOTE_PORT = 2    try: from .settings import *    except ImportError:        pass This works? If you're using an old version of Python you may need to mess about with __future__. On Thu, Nov 24, 2011 at 10:56 PM, Ulrich Eckhardt wrote: > Hi! > > I have a few

Re: Return of an old friend

2011-11-24 Thread Matt Joiner
I haven't heard of you before, but feel like I've missed out on something. Do you (or someone else) care to link to some of your more contentious work? On Fri, Nov 25, 2011 at 1:19 PM, Rick Johnson wrote: > Hello Fellow Pythonistas, > > I am very glad to be back after an unfortunate incident cau

Re: Using the Python Interpreter as a Reference

2011-11-26 Thread Matt Joiner
http://pyjs.org/ On Sat, Nov 26, 2011 at 3:22 PM, Sells, Fred wrote: > I'm looking at a variation on this theme.  I currently use > Flex/ActionScript for client side work, but there is pressure to move > toward HTML5+Javascript and or iOS.  Since I'm an old hand at Python, I > was wondering if th

Re: my new project, is this the right way?

2011-11-26 Thread Matt Joiner
Sounds like you want a key-value store. If it's a lot of data, you may still want a "database", I think it's just relational databases that you're trying to avoid? On Sun, Nov 27, 2011 at 10:41 AM, 8 Dihedral wrote: > On Saturday, November 26, 2011 1:01:34 AM UTC+8, rusi wrote: >> On Nov 14,

Re: sick of distribute, setup, and all the rest...

2011-11-27 Thread Matt Joiner
Agreed. I recently gave Haskell a go, and it was remarkable how similar the package management is to Python's. How well does the new "packaging" (set for release in Python 3.3?) module deal with the problems? With a better package management system, the half of the standard library that nobody us

Re: Return of an old friend

2011-11-27 Thread Matt Joiner
On Sun, Nov 27, 2011 at 4:38 AM, Chris Angelico wrote: > On Sun, Nov 27, 2011 at 4:11 AM, rusi wrote: >> Hi Rick! >> Glad to see you back! >> [Courts can be dull places without jesters ye-know!] > > So, what... you'd take someone to court for being funny? That sounds > like the -other- Pythons. >

Re: Can I submit an issue with Python 2.5.6?

2011-11-29 Thread Matt Joiner
Note the re.VERBOSE flag allows this whitespace treatment of the pattern. 2011/11/29 Toshiyuki Ogura : > Hi. > > I found a problem with Python 2.5.6. > test_commands fails when 'make test'. > bugs.python.org doesn't seem to have an option for Python 2.5 in "Versions:" > drop-down menu when creatin

Re: Clever hack or code abomination?

2011-11-30 Thread Matt Joiner
def possible_names(): yield "foo" for i in range(20): yield "foo-" + str(i) ಠ_ಠ On Thu, Dec 1, 2011 at 2:15 PM, Roy Smith wrote: > I need to try a bunch of names in sequence until I find one that works > (definition of "works" is unimportant).  The algorithm is: > > 1) Given a ba

Re: Clever hack or code abomination?

2011-12-01 Thread Matt Joiner
Thank you. ಠ_ಠ On Fri, Dec 2, 2011 at 1:49 PM, Terry Reedy wrote: > On 11/30/2011 10:49 PM, Matt Joiner wrote: >> >> def possible_names(): >>     yield "foo" >>     for i in range(20): >>         yield "foo-" + str(i) > > > Th

Re: Django ported to Python3!

2011-12-02 Thread Matt Joiner
As long as we can dump python 2, a big congrats to anyone who makes this possible. Thanks martin On Dec 3, 2011 5:51 PM, "Stefan Behnel" wrote: > Ron, 02.12.2011 22:47: > >> It looks like Vinay Sajip has succeeded in porting Django to Python3 >> (in a shared code base for Python 3.2 and Python 2.

Re: Python 2 or 3

2011-12-02 Thread Matt Joiner
2 without a doubt. On Dec 3, 2011 5:40 PM, "Andrew Berg" wrote: > On 12/3/2011 12:23 AM, Terry Reedy wrote: > > PyPy has a roadmap for 3.2 > > http://pypy.org/py3donate.html > > They definitely plan to do it one way or another. > I never said there were no plans, but at $2567 out of $60k, I don't

Re: order independent hash?

2011-12-04 Thread Matt Joiner
Duh. What's the point you're trying to make? On Mon, Dec 5, 2011 at 10:17 AM, 8 Dihedral wrote: > On Monday, December 5, 2011 4:13:01 AM UTC+8, Ian wrote: >> On Sun, Dec 4, 2011 at 11:06 AM, 8 Dihedral >> wrote: >> >> If you want to talk about ways to use dicts, please start a different

Re: order independent hash?

2011-12-04 Thread Matt Joiner
Yes. I sent a mail earlier asking such and it was bounced. I'm one email from also blocking this fellow. On Mon, Dec 5, 2011 at 12:59 PM, Lie Ryan wrote: > On 12/05/2011 11:52 AM, 8 Dihedral wrote: >> >> On Monday, December 5, 2011 7:24:49 AM UTC+8, Ian wrote: >>> >>> On Sun, Dec 4, 2011 at 4

Re: Questions about LISP and Python.

2011-12-05 Thread Matt Joiner
This guy is an even better troll than that 8 guy. His spelling is equally bad. His essays make some good points, but I don't see why he doesn't shut his trap and move on. ಠ_ಠ On Tue, Dec 6, 2011 at 6:02 PM, alex23 wrote: > On Dec 6, 2:36 pm, Xah Lee wrote: >> The python community is full

Re: Multiprocessing bug, is my editor (SciTE) impeding my progress?

2011-12-06 Thread Matt Joiner
John I'm in a similar position. I've been using Geany for 2+ years and haven't found anything to replace it. Either the replacement tool makes it too difficult to work with Python correctly, or I spend more time trying to understand it, rather than getting the job done. I also use vim on occasion w

Re: Questions about LISP and Python.

2011-12-08 Thread Matt Joiner
Guido is too busy secretly pouring his cruelty and malice into a master ring to answer trolls. Help yourself to a lesser ring on your way out. On Dec 8, 2011 10:14 PM, "Andrea Crotti" wrote: > On 12/08/2011 04:10 AM, Rick Johnson wrote: > >> ... >> >> Why has GvR not admonished the atrocious beha

Re: How to control I/O buffering besides -u?

2009-09-26 Thread Matt Joiner
You can try flushing, or reopening with no buffering sys.stdout.flush() sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) On Sun, Sep 27, 2009 at 2:20 AM, Dave Angel wrote: > kj wrote: >> >> Is there any way to specify unbuffered I/O from *within* the code >> (rather than via the command-line

Re: unexplainable python

2009-09-27 Thread Matt Joiner
Yes the needless use of classes further supports that theory. On Sun, Sep 27, 2009 at 4:31 PM, John Nagle wrote: > dads wrote: >> >> Sorry forgot to mention I'm using python 2.6 > >   This looks like a homework assignment. > >                                John Nagle > -- > http://mail.python.or