Simon Forman wrote:
> strings have a count() method.
thanks!
For enrichment purposes, is there a way to do this sort of thing with
a generator? E.g. something like:
def SentenceGenerator():
words = ['I', 'have', 'been', 'to', 'the', 'fair']
for w in words:
yield w
message = "%s %
Chris Smith wrote:
> Darren New <[EMAIL PROTECTED]> wrote:
> > Chris Smith wrote:
> > > Unless I'm missing your point, I disagree with your disagreement.
> > > Mutability only makes sense because of object identity (in the generic
> > > sense; no OO going on here).
> >
> > Depends what you mean by
Thank you all for your responses.
I have managed to figure out a solution using XML RPC which fits my
needs perfectly.
--
http://mail.python.org/mailman/listinfo/python-list
Tom Plunket wrote:
> For enrichment purposes, is there a way to do this sort of thing with
> a generator? E.g. something like:
>
> def SentenceGenerator():
>words = ['I', 'have', 'been', 'to', 'the', 'fair']
>for w in words:
> yield w
>
> message = "%s %s %s %s"
>
> print messag
Hi,
I have a two fold question:
-how to attach the debugger to running multi threaded program
-the objective is to find an infinite loop in one of threads which
makes the whole thingy going craze (100%CPU)
The program itself is not easy, in fact quite hude and sometimes it
takes
On 2006-07-13 20:46:16, dylpkls91 wrote:
> Thank you all for your responses.
>
> I have managed to figure out a solution using XML RPC which fits my
> needs perfectly.
BTW, if you want to test networking between two machines on one single
(Windows) computer, try VirtualPC. (Free from MS.)
Gerha
Tom Plunket wrote:
> boilerplate = \
> """
[big string]
> """
>
> return boilerplate % ((module,) * 3)
>
> My question is, I don't like hardcoding the number of times that the
> module name should be repeated in the two return functions. Is there
> an straight forward (inline-appropria
Marshall <[EMAIL PROTECTED]> wrote:
> Chris Smith wrote:
> > Darren New <[EMAIL PROTECTED]> wrote:
> > > Chris Smith wrote:
> > > > Unless I'm missing your point, I disagree with your disagreement.
> > > > Mutability only makes sense because of object identity (in the generic
> > > > sense; no OO g
Sybren Stuvel wrote:
> Dan Winsor enlightened us with:
> > This one "works" in that it runs, but the server on the other end gets
> > garbage unrelated to the test file.
>
> Are you sure it is garbage? Have you tried changing byte order?
Ah, that I hadn't. Any pointers to doing that?
--
http:/
John Blogger wrote:
> That I want a particular tag value of one of my HTML files.
>
> ie: I want only the value after 'href=' in the tag >>
>
> ''
>
> here it would be 'mystylesheet.css'. I used the following regex to get
> this value(I dont know if it is good).
No matter how good it is you should
placid wrote:
>
> alimoe wrote:
>> > Genetic Programming or Genetic Algorithms?
>>
>> whats the difference?
>
>
> Genetic Programming:
> is an automated methodology inspired by biological evolution to find
> computer programs that best perform a user-defined task.
>
> http://en.wikipedia.org/w
Justin Azoff wrote:
> >>> from BeautifulSoup import BeautifulSoup
> >>> html=''
> >>> page=BeautifulSoup(html)
> >>> page.link.get('href')
> 'mystylesheet.css'
On second thought, you will probably want something like
>>> [link.get('href') for link in page.fetch('link',{'type':'text/css'})]
['myst
Chris Smith wrote:
> David Hopwood <[EMAIL PROTECTED]> wrote:
>
>>This is true, but note that postconditions also need to be efficient
>>if we are going to execute them.
>
> If checked by execution, yes. In which case, I am trying to get my head
> around how it's any more true to say that funct
Justin Azoff wrote:
> Tom Plunket wrote:
>> boilerplate = \
>> """
> [big string]
>> """
>>
>> return boilerplate % ((module,) * 3)
>>
[deletia...]
> Of course..
>
stuff = {'lang': 'python', 'page': 'typesseq-strings.html'}
print """I should read the %(lang)s documentation at
Tom Plunket wrote:
> Simon Forman wrote:
>
> > strings have a count() method.
>
> thanks!
>
> For enrichment purposes, is there a way to do this sort of thing with
> a generator? E.g. something like:
>
> def SentenceGenerator():
>words = ['I', 'have', 'been', 'to', 'the', 'fair']
>for w in
On 14/07/2006 10:41 AM, Dan Winsor wrote:
> Sybren Stuvel wrote:
>> Dan Winsor enlightened us with:
>>> This one "works" in that it runs, but the server on the other end gets
>>> garbage unrelated to the test file.
>> Are you sure it is garbage? Have you tried changing byte order?
>
> Ah, that I h
John Henry wrote:
> Hi list,
>
> Is there a more elagant way of doing this?
>
> # logflags is an array of logicals
> test=True
> for x in logflags:
>test = test and x
> print test
>
> --
> Thanks,
So many ways *drool*
How about:
False not in logflags
(Anybody gonna run all these throu
>
> False not in logflags
>
Or, if your values aren't already bools
False not in (bool(n) for n in logflags)
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
Chris Smith wrote:
> Marshall <[EMAIL PROTECTED]> wrote:
> > Chris Smith wrote:
> > > Darren New <[EMAIL PROTECTED]> wrote:
> > > > Chris Smith wrote:
> > > > > Unless I'm missing your point, I disagree with your disagreement.
> > > > > Mutability only makes sense because of object identity (in the
Edmond Dantes wrote:
> placid wrote:
>
> >
> > alimoe wrote:
> >> > Genetic Programming or Genetic Algorithms?
> >>
> >> whats the difference?
> >
> >
> > Genetic Programming:
> > is an automated methodology inspired by biological evolution to find
> > computer programs that best perform a user-de
Simon Forman wrote:
> >
> > False not in logflags
> >
>
> Or, if your values aren't already bools
>
> False not in (bool(n) for n in logflags)
>
>
>
> Peace,
> ~Simon
Very intriguing use of "not in"...
Thanks,
--
http://mail.python.org/mailman/listinfo/python-list
Marshall <[EMAIL PROTECTED]> wrote:
> > What you are asking for is some subset of identity, and I've not yet
> > succeeded in understanding exactly what it is or what its limits are...
> > except that so far, it seems to have everything to do with pointers or
> > aliasing.
>
> Perhaps it is specif
Hello,
I have upgraded to Python2.4 on my Red Hat 9.0 Linux box.
I want to work with IDLE and ran a search to check it's presence.
Here is what I get.
[EMAIL PROTECTED] bin]# find / -iname idlelib
/usr/local/lib/python2.4/idlelib
[EMAIL PROTECTED] bin]# cd /usr/local/lib/python2.4/idlelib
[EMAIL
Edmond Dantes wrote:
> I would tend to think that Lisp is more suited for Genetic Programming than
> Python is. However, it is possible to do. Heck, I even had the crazy idea
> of doing Genetic Programming in C++ once, however ugly that would've
> been!
>
> Actually, there is an AI project that
Satya Kiran wrote:
> Hello,
> I have upgraded to Python2.4 on my Red Hat 9.0 Linux box.
> I want to work with IDLE and ran a search to check it's presence.
> Here is what I get.
>
> [EMAIL PROTECTED] bin]# find / -iname idlelib
> /usr/local/lib/python2.4/idlelib
>
> [EMAIL PROTECTED] bin]# cd /us
Hey, pretty impressive list. I downloaded a few myself.
--
http://mail.python.org/mailman/listinfo/python-list
Gerard> David Hirschfield wrote:
>> I have this function:
>>
>> def sequentialChunks(l, stride=1):
...
>>
>> Which takes a list of numerical values "l" and splits it into chunks
>> where each chunk is sequential...
Gerard> see the groupby example here:
G
[EMAIL PROTECTED] wrote:
> Submit your comments because I need them!
[loads of SPAM deleted]
As I infer from the type of your posting, what you *want* is a good placement
in Google, but what you really *need* is a good lawyer.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Is there a TFTP client python module? I just need "get file" feature.
I came across two implementations on WEB, but they are kind of
unfinished (got the code from some mailing list!).
Thanks, Malahal.
--
http://mail.python.org/mailman/listinfo/python-list
alf wrote:
> Hi,
>
> I have a two fold question:
> -how to attach the debugger to running multi threaded program
> -the objective is to find an infinite loop in one of threads which
> makes the whole thingy going craze (100%CPU)
>
> The program itself is not easy, in fact quite hude an
Justin Powell wrote:
> Hi, I'm looking for suggestions on how to accomplish something in python. If
> this is the wrong list for such things, I appologize and please disregard the
> rest.
No, this is totally the right place.
> My application needs to allow users to create scripts which will be
David Hirschfield <[EMAIL PROTECTED]> writes:
> So sequentialChunks([1,2,3,5,6,8,12]) returns:
> [[1,2,3],[5,6],[8],[12]]
Ugly and not too efficient: find the break points and use them to make
sub-lists.
def sequentialChunks(l, stride=1):
p = [0] + [i for i in xrange(1,len(l)) if l[i]-l[i-1]
[EMAIL PROTECTED] wrote:
> Is there a TFTP client python module? I just need "get file" feature.
> I came across two implementations on WEB, but they are kind of
> unfinished (got the code from some mailing list!).
Second hit in Google ("tftp python"):
http://mail.python.org/pipermail/python-list
> So What should I do to get the exact value(here the value after
> 'href=') in any case even if the
>
> tags are like these? >>
>
>
> -OR-
>
> -OR-
>
The following should do it:
expr = r'http://mail.python.org/mailman/listinfo/python-list
Pyparsing is also good for recognizing basic HTML tags and their
attributes, regardless of the order of the attributes.
-- Paul
testText = """sldkjflsa;faj
here it would be 'mystylesheet.css'. I used the following regex to get
this value(I dont know if it
I thought I was doing fine until I go
> It's quite simple, really: You malloc it, you free it.
John - I hope you don't mind that I really want to make sure I
understand your
good wisdom in this area by asking for clarification
ASSUMPTIONS:
1. As long as we properly handle the reference counting of PyObjects
then
memory ma
Got crystal clear. Thanks a lot to all for the elaborated replies.
Sanjay
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Now it would appear that if you **malloc an array of PyObjects**
> (call it FOO[]) then you have an ambiguity
>
> The PyObject elements will be freed *for us* eventually by garbage
> collector.
>
> Hence, we can't ever do 'free(FOO); ' because we don't know when
>
201 - 238 of 238 matches
Mail list logo