Hi all,
An application I maintain recently moved away from the gobject event
loop to the tulip/trollius/asyncio event loop. However, we were using
python-dbus, which internally uses the gobject event loop, as our main
event loop. This worked nicely when we were gobject based, but now
that we're no
On Fri, Oct 26, 2012 at 05:36:50PM -0400, Dave Angel wrote:
> On 10/26/2012 05:26 PM, Tycho Andersen wrote:
> > Assuming it's the length of the list that's the problem, not the
> > length of the strings in the list...
> >
> > args = ['foo', '
On Fri, Oct 26, 2012 at 09:49:50AM +0200, Ulrich Eckhardt wrote:
> Hi!
>
> General advise when assembling strings is to not concatenate them
> repeatedly but instead use string's join() function, because it
> avoids repeated reallocations and is at least as expressive as any
> alternative.
>
> Wh
On Thu, Apr 05, 2012 at 08:32:10AM -0400, Roy Smith wrote:
>
> One of the hardest things about writing parsers is generating helpful
> error messages when things don't parse. But, it's only of value to do
> that when you're parsing something you expect to be written by a human,
> and thus a hum
On Tue, Apr 03, 2012 at 03:46:31PM -0400, D'Arcy Cain wrote:
> On 03/28/12 16:12, John Ladasky wrote:
> >I'm looking for a Python (2.7) equivalent to the Unix "cp" command.
> >Since the equivalents of "rm" and "mkdir" are in the os module, I
> >figured I look there. I haven't found anything in the
Hi all,
I'm distributing a package which for various legacy reasons needs to
generate a pkgconfig file from a template (adding version numbers,
prefixes, etc.) and install the file in the right place
($PREFIX/lib/pkgconfig/foo.pc in most cases).
Currently, I have a rather nasty hack to implement
On Thu, Mar 22, 2012 at 05:26:11PM +, Steven D'Aprano wrote:
> On Thu, 22 Mar 2012 08:14:47 -0500, Tycho Andersen wrote:
>
> > I've had similar experiences. In fact, in light of all this - why does
> > __del__ exist at all? Novice python users may (reasonably) ass
On Thu, Mar 22, 2012 at 06:27:45AM -0700, Chris Rebert wrote:
> On Thu, Mar 22, 2012 at 6:14 AM, Tycho Andersen wrote:
> > On Wed, Mar 21, 2012 at 04:49:54PM -0500, Tim Chase wrote:
> >> On 03/21/12 15:54, Chris Kaynor wrote:
> >> >As Chris Rebert pointed out, there
On Wed, Mar 21, 2012 at 04:49:54PM -0500, Tim Chase wrote:
> On 03/21/12 15:54, Chris Kaynor wrote:
> >As Chris Rebert pointed out, there is no guarantee as to when the
> >__del__ method is called. CPython will generally call it immediately,
> >however if there are reference cycles it may never cal
Just re-bumping this - I am fiddling with this code again and it's
gross, so any input would be greatly appreciated :-)
\t
On Mon, Jan 23, 2012 at 05:31:20PM -0600, Tycho Andersen wrote:
> Is there some standard way to generate a .pc file (given a .pc.in or
> similar) using distuti
Is there some standard way to generate a .pc file (given a .pc.in or
similar) using distutils?
If there's not, is there a good way to access whatever the user passes
in as --prefix (besides parsing sys.argv yourself)?
Thanks,
\t
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
A couple months ago I found a bug in a corner of the curses library
(http://bugs.python.org/issue13051) and filed it. Unfortunately, there
was nobody listed to cc on the noisy list, so it probably got lost in
the shuffle. (There is even previous mention of this bug elsewhere on
the tracker
On Wed, Nov 16, 2011 at 09:36:40AM -0500, Roy Smith wrote:
> In article <95bcp8-bft@satorlaser.homedns.org>,
> Ulrich Eckhardt wrote:
>
> > Hi!
> >
> > I'm currently trying to establish a few tests here that evaluate certain
> > performance characteristics of our systems. As part of this,
On Fri, Jun 24, 2011 at 05:02:00PM -0400, Terry Reedy wrote:
> On 6/24/2011 4:06 PM, Tycho Andersen wrote:
>
> >tmp = {}
> >x['huh'] = tmp # NameEror!
> >
> >That is, the right hand sides of assignments are evaluated before the
> >left hand sides.
On Fri, Jun 24, 2011 at 01:24:24PM -0700, Ned Deily wrote:
> In article <20110624200618.gk6...@point.cs.wisc.edu>,
> Tycho Andersen wrote:
> > Yes, I understand that, but I guess I don't understand *why* things
> > are done that way. What is the evaluation order
On Fri, Jun 24, 2011 at 01:13:08PM -0700, Ethan Furman wrote:
> Tycho Andersen wrote:
> >On Fri, Jun 24, 2011 at 12:14:27AM -0700, Ethan Furman wrote:
> >>The example given to me when I had this question:
> >>
> >>--> x = x['huh'] = {}
> >>
On Fri, Jun 24, 2011 at 12:14:27AM -0700, Ethan Furman wrote:
> The example given to me when I had this question:
>
> --> x = x['huh'] = {}
> --> x
> {'huh': {...}}
>
>
> As you can see, the creation of the dictionary is evaluated, and
> bound to the name 'x'; then the key 'huh' is set to the
On Mon, Jun 13, 2011 at 11:31:29PM +0200, Tracubik wrote:
> Hi all,
>
> newbie question here
>
> how can i write code like this:
>
> 1 def foo():
> 2for index in ...
> 3for plsdoit in ...
> 4print "this is a very long string that i'm going to
> write 5 here, it'll be for
On Thu, May 12, 2011 at 03:12:39PM -0500, Andrew Berg wrote:
> On 2011.05.12 02:25 PM, MRAB wrote:
> > You can raise an exception wherever you like! :-)
> If I raise an exception that isn't a built-in exception, I get something
> like "NameError: name 'HelloError' is not defined". I don't know how
Consider the following session:
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> p = re.compile("foo")
>>> re.sub(p, "bar", "foobaz", flags=re.IGNORECASE)
Traceback (most recent call las
On Thu, Aug 12, 2010 at 04:09:10PM -0700, Brian Salter wrote:
> I've seen a number of tutorials that describe how to bring in a dll
> in python, but does anybody know of a tutorial for how to bring in a
> lib? Is it even possible?
I don't know if it's possible, but why do you want to do it? .lib
On Tue, Jun 8, 2010 at 9:18 PM, alex23 wrote:
> On Jun 9, 3:29 am, Terry Reedy wrote:
>> On 6/8/2010 2:26 AM, Gabriel Falcão wrote:
>> > There is not much to say,
>> except to explain 'BDD'.
>
> If only there was some kind of way to quickly look up the meaning of
> definitions, preferably one kno
On Mon, May 10, 2010 at 10:23 PM, Terry Reedy wrote:
> On 5/10/2010 5:35 AM, James Mills wrote:
>>
>> On Mon, May 10, 2010 at 6:50 PM, Xavier Ho wrote:
>>>
>>> Have I missed something, or wouldn't this work just as well:
>>>
>> list_of_strings = ['2', 'awes', '3465sdg', 'dbsdf', 'asdgas']
>>>
On Sat, May 8, 2010 at 4:09 PM, Günther Dietrich
wrote:
[snip]
> Too simple?
No, not at all. I really only intended to point the OP to itertools,
because it does lots of useful things exactly like this one.
\t
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, May 8, 2010 at 3:41 PM, Oltmans wrote:
> Hi, I've a list that looks like following
>
> a = [ [1,2,3,4], [5,6,7,8] ]
>
> Currently, I'm iterating through it like
>
> for i in [k for k in a]:
> for a in i:
> print a
>
> but I was wondering if there is a shorter, more el
On Sun, 8 Nov 2009, Wells wrote:
I'm not quite understanding why a tuple is hashable but a list is not.
Any pointers? Thanks!
The keys of a dict have to be immutable. Lists are mutable, tuples are
not.
\t
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Sep 9, 2009 at 10:08 AM, 一首诗 wrote:
> But when C has many many methods to expose to outer user, 2nd choice
> seems to be more reasonable I In the first design, B.newMethod did
> nothing really useful.
Is there any reason you can't do something like the following?
class B(object):
def __
On Fri, Aug 14, 2009 at 3:23 PM, kj wrote:
> [snip]
import re
re.split('^', 'spam\nham\neggs\n')
> ['spam\nham\neggs\n']
re.split('(?m)^', 'spam\nham\neggs\n')
> ['spam\nham\neggs\n']
bol_re = re.compile('^', re.M)
bol_re.split('spam\nham\neggs\n')
> ['spam\nham\neggs\n']
>
Blah, forgot to include the list. When is python-list going to get Reply-To?
\t
On Tue, Aug 4, 2009 at 8:38 AM, Tycho Andersen wrote:
> Hi Ido,
>
> On Tue, Aug 4, 2009 at 6:25 AM, Ido Levy wrote:
>> [snip]
>> I got the following result in both cases:
>>
>
On Mon, Jul 20, 2009 at 11:27 AM, Phillip B
Oldham wrote:
>
> We often find we need to do manipulations like the above without
> changing the order of the original list, and languages like JS allow
> this. We can't work out how to do this in python though, other than
> duplicating the list, sortin
On Sat, Jul 18, 2009 at 4:43 PM, Irmen de Jong wrote:
> twgray wrote:
>>
>> I am attempting to send a jpeg image file created on an embedded
>> device over a wifi socket to a Python client running on a Linux pc
>> (Ubuntu). All works well, except I don't know, on the pc client side,
>> what the fi
On Wed, Jul 15, 2009 at 8:12 AM, Peter Fodrek wrote:
>
> Would anyone be helpful for me to get more information about this problem
> because pydb does not show anything usable for me,please?
What is the directory structure for the HeeksCNC module? Although I'm
no expert, I suspect it looks someth
32 matches
Mail list logo