Danny Yoo schrieb:
>
>
>>How do I do cubic (and higher) roots ...
>>
>
>I think you're looking for the '**' operator. Like addition and
>multiplication, it can take in two numbers.
>
>##
>
>
2 ** 2
>4
>
>
And they also can be floating point numbers
>>> 2 **
Chad Crabtree wrote:
> While everything that Alan Guald said is true, there are a couple of
> options for you. Provided you know HTML (you must), you could
> generate html pragmatically but, knowledge of html is still mandatory.
> Your options are, basically
>
> http://www.cherrypy.org
> Which is
Dear All,
I have to convert a binary stream from a monitoring device to another
format.
The highets bit of data bytes is replaced by 0 and placed after every 7
bytes into a correction byte.
I would like to decode it as simple as possible.
May someone suggest an elegant solution for that ?
Yo
I like Karrigell ...http://www.karrigell.com/ for being flexible, complete, lightweight, and easy to learn. I don't know how it scales, but that's not really a consideration for the applications you describe.
Ron>>> "Chad Crabtree" <[EMAIL PROTECTED]> 5/8/2006 6:29 PM >>>While everything that A
Hi,
I have to see how many open connection can a particular service handle.
So, I want to similuate something like this but using Python.
telnet
I will be keeping these connections open for around 60 seconds. Can
anyone tell me how do I start with this in Python? I read a bit about
telnetlib,
Payal Rathod wrote:
> Hi,
> I have to see how many open connection can a particular service handle.
> So, I want to similuate something like this but using Python.
> telnet
>
> I will be keeping these connections open for around 60 seconds. Can
> anyone tell me how do I start with this in Pytho
János Juhász wrote:
> Dear All,
>
> I have to convert a binary stream from a monitoring device to another
> format.
> The highets bit of data bytes is replaced by 0 and placed after every 7
> bytes into a correction byte.
> I would like to decode it as simple as possible.
> May someone suggest
Kent Johnson wrote:
> Generators are not an optimization technique so much as a way to
> structure code that includes iteration.
This recipe is a good example of how using a simple generator can
encapsulate a bit of processing that might be awkward to include in a
larger processing loop. Genera
Ron Phillips wrote:
> I like Karrigell ...http://www.karrigell.com/ for being flexible,
> complete, lightweight, and easy to learn. I don't know how it scales,
> but that's not really a consideration for the applications you describe.
>
> Ron
>
> >>> "Chad Crabtree" <[EMAIL PROTECTED]> 5/8/2006 6
I have a list that looks a bit like this -
[(u'gbr', 30505), (u'fra', 476), (u'ita', 364), (u'ger', 299),
(u'fin', 6), (u'ven', 6), (u'chi', 3), (u'hun', 3), (u'mar', 3),
(u'lux', 2), (u'smo', 2), (u'tch', 2), (u'aho', 1), (u'ber', 1)]
The list items are tuples, the first item of which is a coun
Matthew Webber wrote:
> I have a list that looks a bit like this -
>
> [(u'gbr', 30505), (u'fra', 476), (u'ita', 364), (u'ger', 299),
> (u'fin', 6), (u'ven', 6), (u'chi', 3), (u'hun', 3), (u'mar', 3),
> (u'lux', 2), (u'smo', 2), (u'tch', 2), (u'aho', 1), (u'ber', 1)]
>
> The list items are tuple
Matthew Webber wrote:
> I have a list that looks a bit like this -
>
> [(u'gbr', 30505), (u'fra', 476), (u'ita', 364), (u'ger', 299),
> (u'fin', 6), (u'ven', 6), (u'chi', 3), (u'hun', 3), (u'mar', 3),
> (u'lux', 2), (u'smo', 2), (u'tch', 2), (u'aho', 1), (u'ber', 1)]
>
> The list items are tuples
To expand on my original posting, I came up with this code which works ok :
count_country_aggregated = [cc for cc in count_country if cc[1]>3]
count_country_aggregated.append(('OTHER',sum([cc[1] for cc in count_country
if cc[1]<=3])))
But it uses 2 list comprehensions (therefore 2 passes of the o
> One of the major complaints that people have made about the "One Day of IDLE
> Toying" tutorial I've written is that the screenshots are badly outdated.
>
>http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/
>
> I was curious if anyone wanted to volunteer to provide fresh, updated
> Windo
> > >>> "Chad Crabtree" <[EMAIL PROTECTED]> 5/8/2006 6:29 PM >>>
> > While everything that Alan Guald said is true, there are a
> couple of
> > options for you. Provided you know HTML (you must), you
> could generate
> > html pragmatically but, knowledge of html is still mandatory.
> > Your op
Thanks Kent, I liked the generator solution (I knew there had to be
something like that).
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Kent Johnson
Sent: 09 May 2006 17:54
Cc: tutor@python.org
Subject: Re: [Tutor] Summing part of a list
<< snip >>
Hm
On 5/9/06, Christian Wyglendowski <[EMAIL PROTECTED]> wrote:
[on creating a web app...]
>
> If you do go with CherryPy, check out this recipe I submitted to the
> online Python Cookbook:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442481
>
> It was written for CherryPy 2.1 but should
On Mon, 2006-05-08 at 18:29 -0400, Chad Crabtree wrote:
> While everything that Alan Guald said is true, there are a couple of
> options for you. Provided you know HTML (you must), you could
> generate html pragmatically but, knowledge of html is still mandatory.
> Your options are, basically
>
Hi,
I've been trying to write a wrapper around some shells
scripts using the subprocess module. But I'm getting
errors I quite don't know how to debug. I've only been
writing Python for a few months and starting processes
are new to me. Here's my code:
import os
import re
import subprocess
#
Hi list,
I am launching another python program in my python daemon like this:
pobj = subprocess.Popen(tlsmd,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT,
20 matches
Mail list logo