Pradnyesh Sawant wrote:
> Hello,
Hi
[...]
> So, my Q is, is it possible to make mod_python use the same PYTHONPATH as
> the python2.5 interpreter? if so, how?
You can use the PythonPath directive to set the PYTHONPATH to whatever
you want
> any other suggestions to solve the above problem are
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> Historically, though, the ultimate authority on this kind of stuff is
> Richard Stevens and his Unix and TCP/IP books
>
> I recommend these books if you want to get into network programming.
I keep wanting to get that book, but it gets older and o
If you don't care about the address of the sender, e.g. you are not
going to send anything back, is there an advantage to using recv()?
Or, as a matter of course should you always use recvfrom() with udp
sockets?
I don't know of a reason why you couldn't use recvfrom() all the time,
and that is w
On Feb 8, 7:30 pm, Zack <[EMAIL PROTECTED]> wrote:
>[snip]
>
> The generators you show here are interesting, and it prodded me on how
> to add tuples but at the moment (I'm a python newbie) the generator
> seems less readable to me than the alternative. After some input from
> Scott David Daniels I
Hi,
Ryan K wrote:
> If I have a cElementTree.ElementTree (or the one from the Standard
> Library), can I use lxml's validation features on it since it
> implements the same ElementTree API?
Not directly. lxml and cElementTree use different tree models internally, so
you can't just apply C-impleme
On Feb 17, 5:40 pm, Pradnyesh Sawant <[EMAIL PROTECTED]> wrote:
> Hello,
> I have a code snippet which does 'import xmltramp' to parse an xml file
> received over the network. Also, I have 2 instances of python, namely
> python2.4 and python2.5 on my box. The confusing thing is that the code
> work
On Feb 17, 3:23 pm, Ryan K <[EMAIL PROTECTED]> wrote:
> If I have a cElementTree.ElementTree (or the one from the Standard
> Library), can I use lxml's validation features on it since it
> implements the same ElementTree API?
>
I've not used lxml ... the answer depends on whether the lxml
validati
Hello,
I have a code snippet which does 'import xmltramp' to parse an xml file
received over the network. Also, I have 2 instances of python, namely
python2.4 and python2.5 on my box. The confusing thing is that the code
works fine with python2.4, but gives the error:
ImportError: No module named
On Feb 17, 4:42 pm, TerryP <[EMAIL PROTECTED]> wrote:
> Tomek Paczkowski wrote:
> > You can try to put your code through pylint. It will give you some
> > automatic critique.
>
> There is a pylint !?
>
> That one is defiantly making my workstation later just for fun hehe.
>
See if you can find an
[EMAIL PROTECTED] wrote:
> what would be the best python GUI toolkit, it must be cross platform.
>
> i have tried gtk, but it interface are real bad and its coding was
> difficult so i dropped it,
>
> the only remaining are qt4 and wx, i would like to know if one of these or
> any other toolkit
Tomek Paczkowski wrote:
> You can try to put your code through pylint. It will give you some
> automatic critique.
>
There is a pylint !?
That one is defiantly making my workstation later just for fun hehe.
--
There seems no plan because it is all plan.
-- C.S. Lewis
--
http:/
Hello,
I have a small program which does 'import hashlib'. This program runs fine
with python2.5. But when I try running the same program through mod_python,
I get the error: 'ImportError: No module named hashlib' in the apache2
error.log
Searching online suggested me to include md5.so or md5modul
If I have a cElementTree.ElementTree (or the one from the Standard
Library), can I use lxml's validation features on it since it
implements the same ElementTree API?
Thanks,
Ryan
--
http://mail.python.org/mailman/listinfo/python-list
Benjamin wrote:
> How would I go about "flattening" a dict with many nested dicts
> within? The dicts might look like this:
> {"mays" : {"eggs" : "spam"},
> "jam" : {"soda" : {"love" : "dump"}},
> "lamba" : 23
> }
> I'd like it to put "/" inbetween the dicts to make it a one
> dimensional dict and
On Feb 15, 3:28 pm, [EMAIL PROTECTED] wrote:
> Hello Python Community,
>
> It'd be great if someone could provide guidance or sample code for
> accomplishing the following:
>
> I have a single unicode file that has descriptions of hundreds of
> objects. The file fairly resembles HTML-EXAMPLE paste
How would I go about "flattening" a dict with many nested dicts
within? The dicts might look like this:
{"mays" : {"eggs" : "spam"},
"jam" : {"soda" : {"love" : "dump"}},
"lamba" : 23
}
I'd like it to put "/" inbetween the dicts to make it a one
dimensional dict and look like this:
{"mays/eggs" : "
On Feb 15, 9:31 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> On Fri, 2008-02-15 at 19:21 -0800, Benjamin wrote:
> > You could type args=tuple("data/w7/").
>
> That will produce an 8-tuple containing single-character strings, not a
> 1-tuple containing one string.
Opps. That iterable thing of stri
The following two examples are from Grayson's book on Tkinter. He's making a
simple dialog with three buttons. In the first example, he does not use the
Frame class, but in the second he does. Doesn't the first example need a
container? What's the difference here?
==5.1
I have Python 2.5 and win32 extensions on Vista at work, no problems. I have
to ask the obvious question... did you download the right win32 installer?
There's different ones for Python 2.4 vs. 2.5, etc.
- Adam
From: [EMAIL PROTECTED] on behalf of [EMAIL PRO
On Feb 16, 5:03 pm, Zack <[EMAIL PROTECTED]> wrote:
> Dustan wrote:
> > On Feb 16, 4:40 pm, Zack <[EMAIL PROTECTED]> wrote:
> >> what method can you use on x to find all available
> >> attributes for that class?
>
> class Foo(object):
> > bar = "hello, world!"
> > def __init__(self, baz)
On Sat, 16 Feb 2008 18:21:40 -0800, Carl Banks wrote:
> Consider what happens when you add two fractions:
>
> 1/2 + 1/5
>
> To do that, you have to take the LCD of the denomintor, in this case 10,
> so you get
>
> 5/10 + 2/10 = 7/10
>
> Now imagine that you're adding a lot of different numbers
Ok, that post was somewhat bleck.
Here is a much better version: http://chipy.org/V4l2forPyCon
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 16, 9:39 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Sat, 16 Feb 2008 17:47:39 -0800, Mark Dickinson wrote:
> > I've no clue where your (Steven's) idea that 'all ordinals are surreal
> > numbers' came from. They're totally unrelated.
>
> Tell that to John Conway.
On Sat, 16 Feb 2008 17:47:39 -0800, Mark Dickinson wrote:
> I've no clue where your (Steven's) idea that 'all ordinals are surreal
> numbers' came from. They're totally unrelated.
Tell that to John Conway.
[quote]
Just as the *real* numbers fill in the gaps between the integers, the
*surreal*
On Feb 16, 7:54 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > On Feb 16, 5:51 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> >> Carl Banks wrote:
> >>> On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
> Although rationals have its limitations too, it is a much
> bette
Hi,
I just got a new computer with windows vista, big mistake,
I install python 2.4 ok, but the win32 package keeps saying it cannot
find the python instaltion in the registry, help!
-Ted
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> On Feb 17, 11:11 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> En Sat, 16 Feb 2008 19:43:37 -0200, John Machin <[EMAIL PROTECTED]>
>> escribi�:
>>
>>> On Feb 16, 3:48 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
days_in_month = lambda m: m - 2 and 30 + bool(1 << m &
On 16 Φεβ, 15:45, Steve Holden <[EMAIL PROTECTED]> wrote:
> Ilias Lazaridis wrote:
>
> [...]> Of course I'll not stay with trac, I'll leave the sinking ship, I've
> > prepare long time ago to do so, step by step. An will migrate step by
> > step away from trac and python - toward an own implementat
On Feb 16, 6:50�pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Feb 16, 5:51 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
>
> > Carl Banks wrote:
> > > On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
> > >> Although rationals have its limitations too, it is a much
> > >> better choice compared to f
On Feb 16, 7:30 pm, Mark Dickinson <[EMAIL PROTECTED]> wrote:
> The real line, considered as a topological space, has limit points.
> Two of them.
Ignore that. It was nonsense. A better statement: the completion (in
the sense of lattices) of the real numbers is (isomorphic to) the
doubly-extende
On Feb 17, 11:11 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Sat, 16 Feb 2008 19:43:37 -0200, John Machin <[EMAIL PROTECTED]>
> escribi�:
>
> > On Feb 16, 3:48 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
>
> >> days_in_month = lambda m: m - 2 and 30 + bool(1 << m & 5546) or 28
>
> > Alter
On 16 Φεβ, 19:15, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Ilias Lazaridis wrote:
> > Essence:
>
> Spam spam spam spam...
>
> I just looked at your resume.
http://lazaridis.com/resumes/lazaridis.html
(need to update it, lot's of irrelevant stuff, should focus on my
failures)
> What is Abstract P
On 16 Φεβ, 15:45, Robert Klemme <[EMAIL PROTECTED]> wrote:
> On 16.02.2008 13:16, Ilias Lazaridis wrote:
>
>
>
> Oh, it's him again. Please do not respond.
>
> http://dev.eclipse.org/newslists/news.eclipse.foundation/msg00167.html
Thanks, nice message, I've added it to the section:
http://case.
Carl Banks wrote:
> On Feb 16, 5:51 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
>> Carl Banks wrote:
>>> On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
Although rationals have its limitations too, it is a much
better choice compared to floats/Decimals for most cases.
>>> Maybe that's t
On Feb 16, 5:51 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
> >> Although rationals have its limitations too, it is a much
> >> better choice compared to floats/Decimals for most cases.
>
> > Maybe that's true for your use ca
Dustan wrote:
> On Feb 16, 5:59 pm, Zack <[EMAIL PROTECTED]> wrote:
>> Zack wrote:
>>> Diez B. Roggisch wrote:
Zack schrieb:
> If I have a class static variable it doesn't show up in the __dict__
> of an instance of that class.
> class C:
>n = 4
> x = C()
> print C.
On Feb 16, 5:59 pm, Zack <[EMAIL PROTECTED]> wrote:
> Zack wrote:
> > Diez B. Roggisch wrote:
> >> Zack schrieb:
> >>> If I have a class static variable it doesn't show up in the __dict__
> >>> of an instance of that class.
>
> >>> class C:
> >>>n = 4
>
> >>> x = C()
> >>> print C.__dict__
> >>
On Feb 16, 7:08 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Fri, 15 Feb 2008 17:31:51 -0800, Mark Dickinson wrote:
> > Not sure that alephs have anything to do with it. And unless I'm
> > missing something, minus aleph(0) is nonsense. (How do you define the
> > negation
On Feb 14, 8:10 pm, Zentrader <[EMAIL PROTECTED]> wrote:
> > That's a misconception. The decimal-module has a different base (10
> > instead of 2), and higher precision. But that doesn't change the fact
> > that it will expose the same rounding-errors as floats do - just for
> > different numbers.
En Sat, 16 Feb 2008 19:43:37 -0200, John Machin <[EMAIL PROTECTED]>
escribi�:
> On Feb 16, 3:48 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
>>
>> days_in_month = lambda m: m - 2 and 30 + bool(1 << m & 5546) or 28
>
> Alternatively:
>
> days_in_month = lambda m: m - 2 and 31 - ((m + 9) % 12 % 5 % 2)
On Fri, 15 Feb 2008 17:31:51 -0800, Mark Dickinson wrote:
> On Feb 15, 7:59 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Fri, 15 Feb 2008 14:35:34 -0500, Steve Holden wrote:
>> >> I don't understand: why would +INF not be equal to itself? Having
>> >> INF == INF be T
On Feb 16, 5:57 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Feb 16, 3:47 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> >> Hi all,
>
> >> Recently there was a thread about function composition in Python (and
> >> this was probably not the first). The fast way t
Dustan wrote:
> On Feb 16, 4:40 pm, Zack <[EMAIL PROTECTED]> wrote:
>> what method can you use on x to find all available
>> attributes for that class?
>
class Foo(object):
> bar = "hello, world!"
> def __init__(self, baz):
> self.baz = baz
>
x = Foo(42)
>
>>>
Zack wrote:
> Diez B. Roggisch wrote:
>> Zack schrieb:
>>> If I have a class static variable it doesn't show up in the __dict__
>>> of an instance of that class.
>>>
>>> class C:
>>>n = 4
>>>
>>> x = C()
>>> print C.__dict__
>>> {'__module__': '__main__', '__doc__': None, 'n': 4}
>>> print x._
[EMAIL PROTECTED] wrote:
> On Feb 16, 3:47 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> Recently there was a thread about function composition in Python (and
>> this was probably not the first). The fast way to create a
>> (anonymous) composite function
>>
>> f1 o f2 o ...
"Brian Smith" <[EMAIL PROTECTED]> writes:
> So does Haskell. Haskell All-In-One handles that by renaming every
> top-level artifact.
That can't be done reliably in python because namespaces are dynamic.
> If it is possible to run an egg as a CGI (without modifying the web
> server configuration f
On Feb 16, 4:40 pm, Zack <[EMAIL PROTECTED]> wrote:
> what method can you use on x to find all available
> attributes for that class?
>>> class Foo(object):
bar = "hello, world!"
def __init__(self, baz):
self.baz = baz
>>> x = Foo(42)
>>> x.__dict__.keys() # Does
On Feb 16, 5:51 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
> >> Although rationals have its limitations too, it is a much
> >> better choice compared to floats/Decimals for most cases.
>
> > Maybe that's true for your use ca
En Sat, 16 Feb 2008 17:08:59 -0200, Adam W. <[EMAIL PROTECTED]>
escribi�:
> I'm at the last stage of my project and the only thing left to do is
> trigger a mouse click. I did some searching around for example code
> and stumped upon SendInput
> http://msdn2.microsoft.com/en-us/library/ms6463
> def compose( funcs ):
> def reccompose( *args ):
> return compose( funcs[:-1] )( funcs[-1]( *args ) ) if funcs else
> funcs[0]( *args )
> return reccompose- Hide quoted text -
Which was, if funcs> 1, which is len( funcs )> 1.
>>> [1]>0
Traceback (most recent call last):
File "", li
On Feb 17, 9:57 am, [EMAIL PROTECTED] wrote:
> > days_in_month = lambda m: m - 2 and 31 - ((m + 9) % 12 % 5 % 2) or 28
>
> > the guts of which is slightly more elegant than the ancient writing
> > from which it was derived:
>
> Lacks citation.
Maxima mea culpa.
Pages 294-295 (in particular formul
Diez B. Roggisch wrote:
> Brian Smith wrote:
> > I would be interested in a program that can combine
> > multiple modules into a single module, which removes
> > all the inter-package imports and fixes other
> > inter-module references, like Haskell
> > All-in-One does for Haskell:
> > http://www
Diez B. Roggisch wrote:
> Zack schrieb:
>> If I have a class static variable it doesn't show up in the __dict__
>> of an instance of that class.
>>
>> class C:
>>n = 4
>>
>> x = C()
>> print C.__dict__
>> {'__module__': '__main__', '__doc__': None, 'n': 4}
>> print x.__dict__
>> {}
>>
>> This
Brian Smith schrieb:
> Diez B. Roggisch wrote:
>> Edward A. Falk schrieb:
>>> IOW, is there a "linker" for python? I've written a
>>> program comprised of about five .py files. I'd like to
>>> find a way to combine them into a single executable.
>>> Obviously, I could hand-edit them into a single
On Feb 16, 3:47 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Recently there was a thread about function composition in Python (and
> this was probably not the first). The fast way to create a
> (anonymous) composite function
>
> f1 o f2 o ... o fn
>
> in Python is via
>
>
This would be Off Topic, but it is for PyCon, so there will be lots of Python
side effects.
I am looking for help with a Video4Linux2 driver, which is C code.
I am trying to get a piece of hardware working with trascode.
hardware: http://www.epiphan.com/products/product.php?pid=66
http://www.tra
Zack schrieb:
> If I have a class static variable it doesn't show up in the __dict__ of
> an instance of that class.
>
> class C:
>n = 4
>
> x = C()
> print C.__dict__
> {'__module__': '__main__', '__doc__': None, 'n': 4}
> print x.__dict__
> {}
>
> This behavior makes sense to me as n is n
> days_in_month = lambda m: m - 2 and 31 - ((m + 9) % 12 % 5 % 2) or 28
>
> the guts of which is slightly more elegant than the ancient writing
> from which it was derived:
Lacks citation.
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
> On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
>> Although rationals have its limitations too, it is a much
>> better choice compared to floats/Decimals for most cases.
>
> Maybe that's true for your use cases, but it's not true for most cases
> in general.
>
> Rationals a
If I have a class static variable it doesn't show up in the __dict__ of
an instance of that class.
class C:
n = 4
x = C()
print C.__dict__
{'__module__': '__main__', '__doc__': None, 'n': 4}
print x.__dict__
{}
This behavior makes sense to me as n is not encapsulated in x's
namespace but w
[EMAIL PROTECTED] wrote:
> On Feb 15, 11:50 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>> Dan Bishop wrote:
>>> On Feb 15, 10:24 am, nexes <[EMAIL PROTECTED]> wrote:
[...]
What are everyone else's thoughts on this?
>>> days_in_month = lambda m: m - 2 and 30 + bool(1 << m & 5546) or 28
>> Eleg
On Sat, 16 Feb 2008 11:14:10 -0500, Steve Holden wrote:
> It's about four years since I wrote a program that ran for more than 24
> hours.
Let me guess... and then you discovered ''.join(['x', 'y']) instead of
'x'+'y'?
*wink*
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 17, 4:25 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
>
> > Although rationals have its limitations too, it is a much
> > better choice compared to floats/Decimals for most cases.
>
> Maybe that's true for your use cases, but it's not true fo
Carl Banks <[EMAIL PROTECTED]> writes:
> Rationals are pretty useless for almost any extended calculations,
> since the denominator tends to grow in size till it's practically
> unusbale, which means you have to periodically do non-exact reductions
> to keep things running, and if you do that you m
Hi all,
Recently there was a thread about function composition in Python (and
this was probably not the first). The fast way to create a
(anonymous) composite function
f1 o f2 o ... o fn
in Python is via
lambda x: f1(f2(...fn(x)...)),
but according to some this is neither the most c
Diez B. Roggisch wrote:
> Edward A. Falk schrieb:
> > IOW, is there a "linker" for python? I've written a
> > program comprised of about five .py files. I'd like to
> > find a way to combine them into a single executable.
> > Obviously, I could hand-edit them into a single
> > .py file, but I'm
On Feb 16, 3:48 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Feb 15, 10:24 am, nexes <[EMAIL PROTECTED]> wrote:
>
>
>
> > Alright so me and my friend are having argument.
>
> > Ok the problem we had been asked a while back, to do a programming
> > exercise (in college)
> > That would tell you how
On Feb 16, 6:32 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> >> That example is plain wrong; looks like some TCP code but with
> >> SOCK_STREAM
> >> blindy replaced with SOCK_DGRAM. connect, sendall and recv are not used
> >> for UDP; sendto and recvfrom are used instead. There are so
On Feb 16, 6:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> Here is the example above converted to a more straightforward udp
> client that isolates the part I am asking about:
>
> import socket, sys
>
> host = 'localhost'
On Feb 16, 3:03 pm, Lie <[EMAIL PROTECTED]> wrote:
> Although rationals have its limitations too, it is a much
> better choice compared to floats/Decimals for most cases.
Maybe that's true for your use cases, but it's not true for most cases
in general.
Rationals are pretty useless for almost any
["Followup-To:" header set to comp.lang.perl.misc.]
Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Robert Klemme wrote:
>> On 16.02.2008 13:16, Ilias Lazaridis wrote:
>>
>>
>>
>> Oh, it's him again. Please do not respond.
>>
>> http://dev.eclipse.org/newslists/news.eclipse.foundation/msg00167.htm
> OP stated requirements were to move all the files into a single
> folder. Copytree will preserve the directory structure from the source
> side of the copy operation.
well, it would be "copying [not moving] files through Python",
but if the desire is to flatten the tree into a single directory,
Thanks Mike,
Simple enough! I was wandering about the close method too, I had to
hack that together from what I knew about python already. I'll be
sure to join that mailing list.
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
> On Feb 16, 1:39 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
>> Aahz wrote:
>>> In article <[EMAIL PROTECTED]>,
>>> Jeff Schwab <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> On Feb 14, 10:50 pm, [EMAIL PROTECTED] (Aahz) wrote:
>> In article <[EMAIL PROTECTED]
I ran the following in the python shell:
>>> import timeit
>>> storeit=timeit.Timer('s=len(li);s==1000', 'li=range(1000)')
>>> checkit=timeit.Timer('len(li)==1000', 'li=range(1000)')
>>> listofresults=[(min(storeit.repeat(5)),min(checkit.repeat(5))) for i in
>>> xrange(20)]
listofresults contain
On Feb 17, 6:52 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > Thanks! Works indeed. Strange thing is though, the files created are the
> > exact size as the original file. So it seems like it is zipping without
> > compression.
>
> The instantiation of the ZipFile object can take an optional
> param
> f = zipfile.ZipFile(zipfilename, 'w',
> compression=zipfile.ZIP_DEFLATED)
>
> -tkc
Adding the compression rule works great, thanks again!
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 16, 1:39 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Aahz wrote:
> > In article <[EMAIL PROTECTED]>,
> > Jeff Schwab <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] wrote:
> >>> On Feb 14, 10:50 pm, [EMAIL PROTECTED] (Aahz) wrote:
> In article <[EMAIL PROTECTED]>,
> Steven D'Ap
Gary Herron:
> Try image.getpixel((x,y)) to retrieve the pixel at (x,y).
If the OP needs to access many pixels, then he can use the load()
method on the image object, and then read/write pixels (tuples of 3
ints) using getitem []
import Image
im = Image
img = im.load()
img[x,y] = ...
... = im
On Feb 16, 12:35�pm, Lie <[EMAIL PROTECTED]> wrote:
> Would all these problems with floating points be a rational reason to
> add rational numbers support in Python or Py3k? (pun not intended)
>
> I agree, there are some numbers that is rationals can't represent
> (like pi, phi, e) but these roundi
On Feb 17, 2:26 am, Mark Dickinson <[EMAIL PROTECTED]> wrote:
> On Feb 16, 1:35 pm, Lie <[EMAIL PROTECTED]> wrote:
>
> > Would all these problems with floating points be a rational reason to
> > add rational numbers support in Python or Py3k? (pun not intended)
>
> It's already in the trunk! Pytho
On Feb 16, 1:35 pm, Lie <[EMAIL PROTECTED]> wrote:
> Would all these problems with floating points be a rational reason to
> add rational numbers support in Python or Py3k? (pun not intended)
Forgot to give the link:
http://docs.python.org/dev/library/fractions.html
Mark
--
http://mail.python.o
[EMAIL PROTECTED] wrote:
>> IHNTA, IJWTSA
>> Thanks, but... That defines IHNTA, but not IJWTSA or IJWTW. "I just
>> want to say...?" "I just want to watch?"- Hide quoted text -
>
> I just want to what?
Exactly!
--
http://mail.python.org/mailman/listinfo/python-list
> Thanks! Works indeed. Strange thing is though, the files created are the
> exact size as the original file. So it seems like it is zipping without
> compression.
The instantiation of the ZipFile object can take an optional
parameter to control the compression. The zipfile module only
suppor
> IHNTA, IJWTSA
>
> Thanks, but... That defines IHNTA, but not IJWTSA or IJWTW. "I just
> want to say...?" "I just want to watch?"- Hide quoted text -
I just want to what?
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 15, 11:50 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Dan Bishop wrote:
> > On Feb 15, 10:24 am, nexes <[EMAIL PROTECTED]> wrote:
> >> Alright so me and my friend are having argument.
>
> >> Ok the problem we had been asked a while back, to do a programming
> >> exercise (in college)
> >>
>
> seems to do the trick for me.
>
> -tkc
Thanks! Works indeed. Strange thing is though, the files created are the
exact size as the original file. So it seems like it is zipping without
compression.
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 16, 1:35 pm, Lie <[EMAIL PROTECTED]> wrote:
> Would all these problems with floating points be a rational reason to
> add rational numbers support in Python or Py3k? (pun not intended)
It's already in the trunk! Python will have a rational type (called
Fraction) in Python 2.6 and Python 3.
On Feb 17, 1:40 am, Jeff Schwab <[EMAIL PROTECTED]> wrote:
> Lie wrote:
> > Would all these problems with floating points be a rational reason to
> > add rational numbers support in Python or Py3k? (pun not intended)
>
> > I agree, there are some numbers that is rationals can't represent
> > (like
Edward A. Falk schrieb:
> IOW, is there a "linker" for python? I've written a program comprised of
> about
> five .py files. I'd like to find a way to combine them into a single
> executable. Obviously, I could hand-edit them into a single .py file, but
> I'm looking for a way to keep them as s
I'm at the last stage of my project and the only thing left to do is
trigger a mouse click. I did some searching around for example code
and stumped upon SendInput
http://msdn2.microsoft.com/en-us/library/ms646310.aspx
. However I was not able to find example code for python USING
SendInput, and
IOW, is there a "linker" for python? I've written a program comprised of about
five .py files. I'd like to find a way to combine them into a single
executable. Obviously, I could hand-edit them into a single .py file, but
I'm looking for a way to keep them as seperate files for development but
d
Lie wrote:
> Would all these problems with floating points be a rational reason to
> add rational numbers support in Python or Py3k? (pun not intended)
>
> I agree, there are some numbers that is rationals can't represent
> (like pi, phi, e) but these rounding problems also exist in floating
> poi
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Jeff Schwab <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> On Feb 14, 10:50 pm, [EMAIL PROTECTED] (Aahz) wrote:
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Tue, 12 Feb 2008 10:05:59
Would all these problems with floating points be a rational reason to
add rational numbers support in Python or Py3k? (pun not intended)
I agree, there are some numbers that is rationals can't represent
(like pi, phi, e) but these rounding problems also exist in floating
points, and rational numbe
On Feb 16, 6:21 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
> Please use a mailer/news-agent that preserves whitespace on the
> beginning of the line, and make sure you don't use tabs but spaces to
> indent.
>
> Apart from that - why don't you use shutil.copytree? Regarding the error
> - ar
In article <[EMAIL PROTECTED]>,
Jeff Schwab <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote:
>> On Feb 14, 10:50 pm, [EMAIL PROTECTED] (Aahz) wrote:
>>> In article <[EMAIL PROTECTED]>,
>>> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>>>
On Tue, 12 Feb 2008 10:05:59 -0800, castironpi wrote
>> I'm just starting to learn some Python basics and are not familiar with
>> file handling.
>> Looking for a python scrip that zips files. So aaa.xx bbb.yy ccc.xx
>> should be zipped to aaa.zip bbb.zip ccc.zip
>>
>> I haven't been able to type more than 'import gzip'..
Well, you ask for zip fil
On Feb 15, 2:28 pm, "W. Watson" <[EMAIL PROTECTED]> wrote:
> I want to allow a user who is looking at a graphic to be able to right-click
> on the graphic to produce a menu of choices.
>
> Does the PIL have something, a class or whatever? What in Tkinter would be
> useful for this purpose? GTK?
>
>
On Feb 16, 10:04 am, Vamp4L <[EMAIL PROTECTED]> wrote:
> Hello,
> I'm brand new to wxpython, trying to implement some code to add rows
> in the GUI dynamically. What I want to do is when you click on the
> Add Row button, a new row gets added after the first row, before the
> button. This code
1 - 100 of 135 matches
Mail list logo