On May 25, 9:42 am, David Lyon wrote:
> On Sun, 24 May 2009 15:34:42 -0700 (PDT), Joana
> wrote:
>
> > I mantain Python on Windows, all installed packages are under c:
> > \Python25\Lib\site-packages. Now I have to build C libraries used by
> > python extensions and I am using cygwin, but I don't
what Popen will work on without actually execute it? Do I have to
write a bunch of platform specific code here?
Thanks,
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
ng in portable abstractions over system services.
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 02 May 2008 13:25:55 +1000, Ben Finney wrote:
> URL:http://docs.python.org/lib/module-subprocess.html
Awesome. This is exactly what I was hoping existed.
--
http://mail.python.org/mailman/listinfo/python-list
passed to non python code.
Is there a portable /dev/null somewhere in the standard library?
Thanks,
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 02 May 2008 21:41:36 +0200, Christian Heimes wrote:
> Brendan Miller schrieb:
>> Hi,
>>
>> I have functions that take a file object and write to it. In some cases I
>> just want to throw out what is written to that file object. I want
>> something
sn't really handle forward and bidirectional iterators...
which I guess would be good for algorithms that operator over disk
base datastructures...
Anyone else had similar thoughts?
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Dec 15, 2009 at 9:09 PM, Terry Reedy wrote:
> On 12/15/2009 10:39 PM, Brendan Miller wrote:
>> I'm wondering if anyone has done work towards creating more powerful
>> iterators for python, or creating some more pythonic equivalent.
>
> For sequences, integer i
On Wed, Dec 16, 2009 at 4:16 AM, Paul Rudin wrote:
> Steven D'Aprano writes:
>
>
>> I'm sympathetic to your request for list views. I've often wanted some
>> way to cleanly and neatly do this:
>>
>> for item in seq[1:]:
>> process(item)
>>
>> without making an unnecessary copy of almost all o
On Wed, Dec 16, 2009 at 12:38 PM, Anh Hai Trinh wrote:
> On Dec 16, 2:48 pm, Brendan Miller wrote:
>
>> No, that's what I'm getting at... Most of the existing mutating
>> algorithms in python (sort, reverse) operate over entire collections,
>> not partia
On Thu, Dec 17, 2009 at 8:41 AM, Anh Hai Trinh wrote:
>> I have a couple of thoughts:
>> 1. Since [:] by convention already creates a copy, it might violate
>> people's expectations if that syntax were used.
>
> Indeed, listagent returns self on __getitem__[:]. What I meant was
> this:
>
> x = [0
On Thu, Dec 17, 2009 at 6:44 PM, Steven D'Aprano
wrote:
> On Thu, 17 Dec 2009 12:07:59 -0800, Brendan Miller wrote:
>
>> I was thinking it would be cool to make python more usable in
>> programming competitions by giving it its own port of the STL's
>> algori
On Fri, Dec 18, 2009 at 10:39 AM, Carl Banks wrote:
> On Dec 17, 10:00 pm, Brendan Miller wrote:
>> On Thu, Dec 17, 2009 at 6:44 PM, Steven D'Aprano
>>
>> wrote:
>> > On Thu, 17 Dec 2009 12:07:59 -0800, Brendan Miller wrote:
>>
>> >> I was th
On Fri, Dec 18, 2009 at 2:47 PM, Bearophile wrote:
> Brendan Miller:
>> I agree though, it doesn't matter to everyone and anyone. The reason I
>> was interested was because i was trying to solve some specific
>> problems in an elegant way. I was thinking it would be c
Is there any difference whatsoever between a raw string beginning with
the captical R or one with the lower case r e.g. r"string" vs
R"string"?
--
http://mail.python.org/mailman/listinfo/python-list
re's any documented order that reference counts
get decremented when a module is released or when a program terminates.
What I would expect is "reverse order of definition" but obviously that's not
the case.
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
a circular reference, so that the __del__ shouldn't be
an issue.
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
an
integer argument?
I didn't see this behavior documented when I read through
http://docs.python.org/library/ctypes.html, maybe I'm just missing
it... if that's the case a reference would be appreciated.
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Apr 14, 2010 at 12:12 PM, Mark Dickinson wrote:
> On Apr 14, 7:09 pm, Brendan Miller wrote:
>> I'm using python 2.5.2.
>>
>> I have a ctypes function with argtypes like this:
>>
>> _create_folder.argyptes = [c_void_p, c_int]
>
> Is that
Python provides a GNU readline interface... since readline is a GPLv3
library, doesn't that make python subject to the GPL? I'm confused
because I thought python had a more BSD style license.
Also, I presume programs written with the readline interface would
still be subject to GPL... might want t
On Tue, Apr 20, 2010 at 11:38 AM, Robert Kern wrote:
> On 4/20/10 1:09 PM, Brendan Miller wrote:
>>
>> Python provides a GNU readline interface... since readline is a GPLv3
>> library, doesn't that make python subject to the GPL? I'm confused
>> because
from errcheck.
Thanks,
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
e the string itself after the copy... which I
doubt.
Is there some way to tell ctypes to return an actual c_char_p, or is
my best bet to return a c_void_p and cast to c_char_p when I'm reading
to convert to a string?
Thanks
Brendan
--
http://mail.python.org/mailman/listinfo/python-list
p_val
On Wed, Apr 21, 2010 at 3:15 PM, Brendan Miller wrote:
> I have a function exposed through ctypes that returns a c_char_p.
> Since I need to deallocate that c_char_p, it's inconvenient that
> ctypes copies the c_char_p into a string instead of giving me the raw
> pointe
On Thu, Apr 22, 2010 at 7:49 AM, Zvezdan Petkovic wrote:
>
> On Apr 21, 2010, at 6:29 PM, Brendan Miller wrote:
>
>> Here's the method I was using. Note that tmp_char_ptr is of type
>> c_void_p. This should avoid the memory leak, assuming I am
>> interpreting the
On Apr 27, 7:20 pm, goldtech wrote:
> Hi,
>
> This is undoubtedly a newbie question. How doI assign variables
> multiline strings? If I try this i get what's cited below. Thanks.
>
> >>> d="d
> d"
> >>> d
>
> Traceback (most recent call last):
> File "", line 1, in
> NameError: name 'd'
On Apr 28, 11:44 am, Richard Lamboj wrote:
> Hello,
>
> is there any way to get the name from the actual called function, so that the
> function knows its own name?
>
> Kind Regards,
>
> Richi
If you want to get the function name from within the function itself,
check out the inspect module.
http
On Apr 30, 9:04 am, Jabapyth wrote:
> At least a few times a day I wish python had the following shortcut
> syntax:
>
> vbl.=func(args)
>
> this would be equivalent to
>
> vbl = vbl.func(args)
>
> example:
>
> foo = "Hello world"
> foo.=split(" ")
> print foo
> # ['Hello', 'world']
>
> and I guess
While I think most of the disagreement in this long thread results
from different beliefs in what "freedom" means, I wanted to add, that
most of the responses that argue that the MIT license permits the user
more freedom than the GPL, suffer from the broken window fallacy.
This fallacy results from
I have a python script that sets up some environmental stuff. I would
then like to be able to change back to interactive mode and use that
environment. What's the best way to do that?
--
http://mail.python.org/mailman/listinfo/python-list
python -i myscript.py
almost does what I want. The only problem is if I exit with exit(0) it
does *not* enter interactive mode. I have to run off the end of the
script as near as I can tell. Is there another way to exit without
breaking python -i?
On Thu, May 20, 2010 at 4:57 PM, Brendan Miller
> > > One thing that would be very useful is how to maintain something that
> > > works on 2.x and 3.x, but not limiting yourself to 2.6. Giving up
> > > versions below 2.6 is out of the question for most projects with a
> > > significant userbase IMHO. As such, the idea of running the python 3
> >
On Jul 7, 3:00 pm, MRAB wrote:
> Brendan Abel wrote:
> >>>> One thing that would be very useful is how to maintain something that
> >>>> works on 2.x and 3.x, but not limiting yourself to 2.6. Giving up
> >>>> versions below 2.6 is out of the ques
n the ascii subset of UTF-8 are
discarded by c_char_p during the conversion, or at least they don't
print out when I go to print the string.
Does python not support utf-8 strings? Is there some other way I
should be doing the conversion?
Thanks,
Brendan
--
http://mail.python.org/mailman/listi
2010/9/29 Lawrence D'Oliveiro :
> In message , Brendan
> Miller wrote:
>
>> It seems that characters not in the ascii subset of UTF-8 are
>> discarded by c_char_p during the conversion ...
>
> Not a chance.
>
>> ... or at least they don't print out
be less significant over time.
I'm not sure about the .NET/Mono framework, whether that is good or
bad. Sounds good in some situations at least.
Any other arguments where Python has benefits over Cobra ??
Cheers, Brendan.
--
http://mail.python.org/mailman/listinfo/python-list
(or
Mono), though the web pages do suggest they are also working on a
version that runs on JVM. Also third party libraries (e.g GUIs like wx)
may not be as good or available (yet) ??
http://cobra-language.com/docs/python/
http://cobra-language.com/docs/why/
-- Brendan.
--
http://mail.python.org/mailman/listinfo/python-list
not quite like that. I'd like to upgrade to 2.5.6 (for one particular
mature application), but unfortunately I'm stuck with 2.5.4 as I don't
really want to have to build (and hopefully get it right) on my OS X box.
Cheers, Brendan.
--
http://mail.python.org/mailman/listinfo/python-list
few improved
things (eg. no "self", no ":", ...)
Possible negatives are:
* Requires either .NET or Mono frameworks.
* lack of 3rd party libraries ??
Cheers, Brendan.
--
http://mail.python.org/mailman/listinfo/python-list
Is there a better way of structuring this to ensure I process the
interrupt and not get interrupt overrun?
Is using select only in the mainloop, with multiple file descriptors, a
better way of doing things, so that I can process the file descriptor of
interest first, before any others if set?
Since it seems the python motto is "Batteries included", then it would
seem to me that wxPython is the natural fit as it also has "Batteries
included" (e.g. accessibility, native look-n-feel, mature and evolving,
can produce simple or complex gui programs, etc, etc)
already done).
If I recall correctly, I had to specify the python interpreter to use.
It added a whole lot of paths to the PYTHONPATH variable which caused me
some grief. I ended up removing them all (or most of them) and it
worked fine after that.
Cheers, Brendan.
--
Brendan Simon
und ok :)
comp = root.find( './/component' )
name = root.find( './/name' )
print 'comps =', comps
print 'comp =', comp
print 'name =', name
Thanks, Brendan.
--
http://mail.python.org/mailman/listinfo/python-list
, then
search for './component', './component/name' and so on. It's a bit
ugly, but heaps better than using minidom :)
Cheers, Brendan.
On 31/08/10 6:57 PM, Nitin Pawar wrote:
> Try using getroot()
>
> I think your root is components so its searching in root
utton = gtk.Button(label)
or possibly:
label = 'True' if fill else 'False'
button = gtk.Button(label)
or using a dict for label lookup:
label = { True : 'True', False : 'False' }
button = gtk.Button(label[fill])
Cheers, Brendan.
--
http://mail.python.org/mailman/listinfo/python-list
On 14/10/10 5:17 PM, python-list-requ...@python.org wrote:
> Subject:
> Whining about "struct"
> From:
> Tim Roberts
> Date:
> Wed, 13 Oct 2010 21:30:38 -0700
>
> To:
> python-list@python.org
>
>
> I have a bad memory. I admit it. Because of that, the Python "help"
> system is invaluable to me.
101 - 146 of 146 matches
Mail list logo