Thanks very much. That's exactly what I was looking for. --- Avi
--
http://mail.python.org/mailman/listinfo/python-list
Nick Craig-Wood wrote:
> Which translates to
>
> match = re.search('(blue|white|red)', t)
> if match:
> print "Colour:", match.group(1)
> else:
> match = re.search('(socks|tights)', t)
> if match:
> print "Garment:", match.group(1)
> else:
> match = re.se
I want to write a function that writes to an output file if specified
and otherwise to standard output. How can I connect a file object to
standard output in the code below? I could use an if statement to
choose between print and print>>fp throughout the function, but this
seems awkward. I think th
[EMAIL PROTECTED] wrote:
> I want to write a function that writes to an output file if specified
> and otherwise to standard output. How can I connect a file object to
> standard output in the code below? I could use an if statement to
> choose between print and print>>fp throughout the function,
John Salerno <[EMAIL PROTECTED]> wrote:
>Roy Smith wrote:
>
>> One may be marginally faster, but they both require copying the source
>> string, and are thus both O(n).
>
>Sorry, I'm not familiar with the O(n) notation.
OK, here's a quick tutorial to "big-oh" notation. It's a way of
measuring a
[EMAIL PROTECTED] wrote:
> I want to write a function that writes to an output file if specified
> and otherwise to standard output. How can I connect a file object to
> standard output in the code below? I could use an if statement to
> choose between print and print>>fp throughout the function, b
Hi everyone I'm stuck at doing this and can't find the problem, maybe someone with more experience then I compiling python can help me out. I google around and found some old articles, from them the one that seems more accurate is
http://www.vrplumber.com/programming/mstoolkit/of couse I had to di
I'm looking for a scgi modules that make it easy to convert a CGI using
the standard Python CGI module. I'm hoping for something that will run
my program either as scgi or cgi.
I did find something called paste which purports to be some sort of CGI
Bridge framework but from the documentation,
Thank you Roy.
It seems if you lurk here long enough you eventually get all you
questions answered without even asking!
;-)
Roy Smith wrote:
> John Salerno <[EMAIL PROTECTED]> wrote:
> >Roy Smith wrote:
> >
> >> One may be marginally faster, but they both require copying the source
> >> string,
Hello together !!
I have programmed a List Control and I introduced information in several rows.
What I want to do is, modify this information when i select a row and press a
button.
There two options:
- when i do this, a window appears and asks me to introduce the information.
- or in the s
David C. Ullrich wrote:
> On Sun, 07 May 2006 10:36:00 -0400, Ken Tilton <[EMAIL PROTECTED]>
> wrote:
>
>
>>[...]
>>
>>Your spreadsheet does not have slots ruled by functions, it has one slot
>>for a dictionary where you store names and values/formulas.
>>
>>Go back to your example and arrange
Roy Smith wrote:
> OK, here's a quick tutorial to "big-oh" notation.
Wow, that was fantastic (and interesting)! Did you just write that? That
should be saved somewhere! Mind if I post it on my website? (don't
worry, no one goes there anyway) :)
--
http://mail.python.org/mailman/listinfo/pytho
In article <[EMAIL PROTECTED]>,
John Salerno <[EMAIL PROTECTED]> wrote:
>Roy Smith wrote:
>
>> OK, here's a quick tutorial to "big-oh" notation.
>
>Wow, that was fantastic (and interesting)! Did you just write that? That
>should be saved somewhere! Mind if I post it on my website? (don't
>worry
"John Salerno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ok, this might look familiar. I'd like to use regular expressions to
> change this line:
>
> self.source += '' + paragraph + '\n\n'
>
> to read:
>
> self.source += '%s\n\n' % paragraph
>
John -
You've been asking for re-b
J. A. Gaeta Mendes wrote:
> Petr Jakes wrote:
>
>> I think you can get the answer on
>> http://www.die-offenbachs.de/detlev/eric3-mailinglist.html
>> rather then here.
>>
>> HTH
>>
>> Petr Jakes
> Thanks Petr, I've got help there.
> To those interested, the problem was PyKDE was missing.
>
To
Alex Martelli wrote:
> Ken Tilton <[EMAIL PROTECTED]> wrote:
>...
> > But the key in the whole thread is simply that indentation will not
> > scale. Nor will Python.
>
> Absolutely. That's why firms who are interested in building *seriously*
> large scale systems, like my employer (and suppli
utab wrote:
> Dear all,
>
> Could you please recommend me a graphics library for python. I saw PYX
> which has nice screenshots on the webpage.
>
> My first ambition is to be able to draw 2D or 3D graphs for my
> mathematical results. Maybe later, I can handle other types of
> graphical operation
Terry,
Thanks for the feedback. I've done what you said, except for deleting
the EXEs. While people on this forum can figure out how to get them to
work with just the source, most people will be better off with the
installers. I also added screen shots to each of the programs.
I am especially
Yves wrote:
(in surprise because C's __init__ doesn't over-ride next)
> class A(object):
> def __init__(self, n): self.n = n
> def __iter__(self): return self
> def next(self):
> if self.n > 0:
> self.n -= 1
> return "A: %d" % self.n
> else: raise
Hi everybody,
we want extract numbers from strings and wonder if there is already a
module around for doing this. An example in our case would look like
this:
0.032 +/- 0.5 x 10(-4)
it would even be helpful to have a routine which does not recognise the
+/- , but at least the 10(-4).
Thank you
Alex Martelli wrote:
>
> Your "pragmatic benefits", if such they were, would also apply to the
> issue of "magic numbers", which was discussed in another subthread of
> this unending thread; are you therefore arguing, contrary to widespread
> opinion [also concurred in by an apparently-Lisp-orient
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>we want extract numbers from strings and wonder if there is already a
>module around for doing this. An example in our case would look like
>this:
>
>0.032 +/- 0.5 x 10(-4)
>
>it would even be helpful to have a routine which does not recognise the
>+/-
On 2006-05-08 02:51:22 -0400, [EMAIL PROTECTED] said:
> The phrase "only one obvious way..." is nearly the most absurd
> marketing bullshit I have ever heard; topped only by "it fits your
> brain". Why are so many clearly intelligent and apparently
> self-respecting hard-core software engineers re
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> John Salerno <[EMAIL PROTECTED]> wrote:
>> Roy Smith wrote:
>>
>>> OK, here's a quick tutorial to "big-oh" notation.
>> Wow, that was fantastic (and interesting)! Did you just write that? That
>> should be saved somewhere! Mind if I post it on
Leo Breebaart wrote:
> Also, assume that I have set it up as above. Now I want certain
> other print statements to go to sys.stderr alone. If I understand
> the docs correctly (possibly I don't), the way to do this is to
> start attaching explicit StreamHandlers and whatnot. Whereas with
> print
John Salerno wrote:
> John Salerno wrote:
>> [EMAIL PROTECTED] wrote:
>>> John Salerno wrote:
What I originally meant was that they would not be called from an
instance *outside* the class itself, i.e. they won't be used when
writing another script, they are only used by the class it
[EMAIL PROTECTED] wrote:
> Rene Pijlman wrote:
>> [EMAIL PROTECTED]:
>>> with urllib2 it doesn't seem possible to get HTTP status codes.
>> except urllib2.HTTPError, e:
>> if e.code == 403:
>
> Thanks. Is there documentation for this available somewhere online, I
> can't see i
I create list of files, open each file in turn, skip past all the blank
lines, and then process the first line that starts with a number (see
code below)
filenames=glob.glob("C:/*.txt")
for fn in filenames:
f =file(fn)
line = " "
while line[0] not in digits:
line = f.next()
Action Taken:
The message was quarantined and replaced with a text informing the recipient
of the action taken.
To:
python-list@python.org
From:
Jorge Vargas <[EMAIL PROTECTED]>
Sent:
-235532672,29782731
Subject:
help with Linker dependencies missing went compiling mysql-python on Windows
with
[Sorry, i was just reading comp.lang.lisp, missed the following till
someone mentioned it in email. k]
Alex Martelli wrote:
> Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote:
>...
>
>>>an extension that allows the programmer to specify how the value of
>>>some slot (Lisp lingo for "member vari
"Gary Wessle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Erik Max Francis <[EMAIL PROTECTED]> writes:
>
> > chun ping wang wrote:
> >
> > > Hey i have a stupid question.
> > > How do i get python to print the result in only three decimal
> > > place...
> > > Example>>> round (2.9
[EMAIL PROTECTED] wrote:
> I create list of files, open each file in turn, skip past all the blank
> lines, and then process the first line that starts with a number (see
> code below)
>
> filenames=glob.glob("C:/*.txt")
> for fn in filenames:
f = open(fn)
for line in f:
if
On Mon, 08 May 2006 11:23:28 -0700, tkpmep wrote:
> I create list of files, open each file in turn, skip past all the blank
> lines, and then process the first line that starts with a number (see
> code below)
Here is what I suggest for you:
filenames=glob.glob("C:/*.txt")
for fn in filenames:
sequence = ['','2']
for index, line in enumerate(sequence):
if line.isspace():continue
if line[:1].isdigit():
print 'index %s: starts with digit %s' % (index, line[:1])
--
http://mail.python.org/mailman/listinfo/python-list
And thank you gentlemen for turning my somewhat banale question into a
worthwhile discussion. :-)
I shall not forget self ever again!
--
http://mail.python.org/mailman/listinfo/python-list
to catch and recover from StopIterations, use this:
try:
raise StopIteration
except StopIteration:
print 'caught StopIteration!' # verbose: sys.exc_info() requires
import sys
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> tOn Mon, 08 May 2006 14:04:34 GMT, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> I tried the underscore method, but I was still able to call it as a
>> regular instance method in the interpreter. Is that what's supposed to
>> happ
> I'm looking for a scgi modules that make it easy to convert a CGI using
> the standard Python CGI module. I'm hoping for something that will run
> my program either as scgi or cgi.
>
> I did find something called paste which purports to be some sort of CGI
> Bridge framework but from the docume
Ken Tilton wrote:
>
> I just keep what I call a "datapulse ID", sequentially growing from
> zero, in a global variable. Each ruled Cell keeps track of its memoized
> value, datapulse stamp, and whether it in fact changed value in reaching
> its current datapulse stamp. (I can reach the curren
Hello.
I need to draw a graph, with letters on the x-axis and a numeric value
on the y-axis, e.g.. a = 3, b = 6 etc.
Suggestions?
Thanks,
Ronny Mandal
--
http://mail.python.org/mailman/listinfo/python-list
This is just what the doctor ordered. Thanks, as always, everyone!
> By breaking out of the while loop as shown above.
>
> Peter
--
http://mail.python.org/mailman/listinfo/python-list
Ken Tilton <[EMAIL PROTECTED]> writes:
> No, you do not want on-change handlers propagating data to other
> slots, though that is a sound albeit primitive way of improving
> self-consistency of data in big apps. The productivity win with
> VisiCalc was that one simply writes rules that use other c
In article <[EMAIL PROTECTED]>,
Alex Martelli <[EMAIL PROTECTED]> wrote:
.
.
.
>Of course, the choice of Python does mean that, when we really truly
>need a "domain specific little language", we have to implement it as a
>langu
On 2006-05-08, Thomas Bartkus <[EMAIL PROTECTED]> wrote:
>> does python support true rations, which means that 1/3 is a
>> true one-third and not 0.3 rounded off at some
>> arbitrary precision?
>
> At risk of being boring ;-)
>
> - Python supports both rational and irrational numbers as
>
John Salerno wrote:
> Dennis Lee Bieber wrote:
>> ... Single underscores are a convention/signal to the programmer that
>> "this method/attribute" is considered "private" and should only be used
>> by other methods within the class that defined it. The language does no
>> enforcement of usage
[EMAIL PROTECTED] wrote:
> I think there is a way to connect standard output to a
> file, but I'd prefer not to do that, since I want to use plain print
> statements to warn about errors in the function and have their output
> appear on the screen. Thanks.
>
> def write_data(data,out_file="")
Ok, I've been staring at this and figuring it out for a while. I'm close
to getting it, but I'm confused by the examples:
(?(id/name)yes-pattern|no-pattern)
Will try to match with yes-pattern if the group with given id or name
exists, and with no-pattern if it doesn't. |no-pattern is optional an
BartlebyScrivener wrote:
> Using Python on Windows XP, I am able to get almost all file and path
> info using os.path or stat, but I don't see a way to retrieve the file
> type? E.g. Microsoft Word file, HTML file, etc, the equivalent of what
> is listed in the "Type" column in the Windows Explorer
Scott David Daniels wrote:
> John Salerno wrote:
>> Dennis Lee Bieber wrote:
>>> ... Single underscores are a convention/signal to the programmer that
>>> "this method/attribute" is considered "private" and should only be used
>>> by other methods within the class that defined it. The language do
John Salerno wrote:
> Ok, I've been staring at this and figuring it out for a while. I'm close
> to getting it, but I'm confused by the examples:
>
> (?(id/name)yes-pattern|no-pattern)
> Will try to match with yes-pattern if the group with given id or name
> exists, and with no-pattern if it doe
[EMAIL PROTECTED] (Alex Martelli) writes:
> ...an alleged reply to me, which in fact quotes (and responds to)
> only to statements by Brian, without mentioning Brian...
>
> Mr May, it seems that you're badly confused regarding Usenet's
> quoting conventions.
It seems that someone pisses in yo
[EMAIL PROTECTED] a écrit :
> Hi Folks,
>
> I'm thinking about writing a script that can be run over a whole site
> and produce a report about broken links etc...
>
> I've been playing with the urllib2 and httplib modules as a starting
> point and have found that with urllib2 it doesn't seem poss
Thomas F. Burdick wrote:
> Ken Tilton <[EMAIL PROTECTED]> writes:
>
>
>>No, you do not want on-change handlers propagating data to other
>>slots, though that is a sound albeit primitive way of improving
>>self-consistency of data in big apps. The productivity win with
>>VisiCalc was that one si
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2006-05-08, Thomas Bartkus <[EMAIL PROTECTED]> wrote:
>
> >> does python support true rations, which means that 1/3 is a
> >> true one-third and not 0.3 rounded off at some
> >> arbitrary precision?
> >
> > At
On 08 May 2006 12:53:09 -0700, [EMAIL PROTECTED] (Thomas
F. Burdick) wrote:
>Ken Tilton <[EMAIL PROTECTED]> writes:
>
>> No, you do not want on-change handlers propagating data to other
>> slots, though that is a sound albeit primitive way of improving
>> self-consistency of data in big apps. The
[EMAIL PROTECTED]
> Below are 2 files. The first is a Python program that isolates the
> problem within less than 1 hour (often just a few minutes).
It does not on my box. I ran that program, from a DOS shell, using
the released Windows Python 2.4.3. After an hour, it was still
printing. I lef
Steve R. Hastings wrote:
> On Fri, 05 May 2006 21:16:50 -0400, Ken Tilton wrote:
> > The upshot of
> > what he wrote is that it would be really hard to make semantically
> > meaningful indentation work with lambda.
>
> Pretty much correct. The complete thought was that it would be painful
> all o
On 2006-05-08, Thomas Bartkus <[EMAIL PROTECTED]> wrote:
>> Or you can write 0.1
>> 3
>>
>> :)
>
> Ahhh!
>
> But if I need to store the value 1/10 (decimal!), what kind of
> a precision pickle will I then find myself while working in
> base 3?
Then we're right back where we
[EMAIL PROTECTED] wrote:
>
> Hello together !!
>
> I have programmed a List Control and I introduced information in several
> rows. What I want to do is, modify this information when i select a row
> and press a button.
> There two options:
> - when i do this, a window appears and asks me to
Hi!
I'm writing a server and I want to use the logging module for logging
stuff. I want to log all transactions in detail, and if everything goes
haywire I want to know which client did it. Therefore I want to affix
the client address to every single log item.
I would like to do the following:
Fo
[EMAIL PROTECTED] wrote:
> I am a bit surprised that nobody else has tried running the short
> Python program above on a hyper-threading or dual core / dual
> processor system.
Does it happen every time? Have you tried it on multiple machines? Is it
possible that that one machine is having proble
Tim
Many thanks for trying and reporting the details of your environment.
All our hyper-threading PC are identical. However, we identified one
that is different and we are installing Windows XP on it now ...
My hope is that other people will try this, too.
Olaf
--
http://mail.python.org/mailm
Hi all,
I am new to Python. Just wondering can Python able to do econometric
regression in either Time-series or pooled (panel) data? As well as test
for hetero, autocorrelation, or endogeneity?
Thank you!
--
http://mail.python.org/mailman/listinfo/python-list
Evening,
I'm currently working on a larger Python project that consists of multiple
programs and packages. As I need a few utility functions time and again I
moved them all into a Utility package and created a class there. Like this:
Util.py:
class Util:
def __init__(self, debugFlag=F
Christoph Haas wrote:
> As I know that importing packages from multiple modules always keeps it a
> singleton I thought of something like this:
>
> Util.py:
>
> debugFlag = False
> vibranceLevel = 'good'
>
> def function1():
>global debugFlag
>print debugFlag
The global line is
[EMAIL PROTECTED] wrote:
> Tried importing win32api instead of time and using the
> win32api.GetTickCount() and win32api.Sleep() methods.
What about win32api.SleepEx? What about
WaitForMultipleObjects
WaitForMultipleObjectsEx
WaitForSingleObject
WaitForSingleObjectEx
when the object is not expe
Delaney, Timothy (Tim) wrote:
> [EMAIL PROTECTED] wrote:
>
> > I am a bit surprised that nobody else has tried running the short
> > Python program above on a hyper-threading or dual core / dual
> > processor system.
>
> Does it happen every time? Have you tried it on multiple machines? Is it
> po
DeepBlue wrote:
> Hi all,
>
> I am new to Python. Just wondering can Python able to do econometric
> regression in either Time-series or pooled (panel) data? As well as test
> for hetero, autocorrelation, or endogeneity?
> Thank you!
NumPy can do linear regression, and one can certainly program a
David C. Ullrich wrote:
> On 08 May 2006 12:53:09 -0700, [EMAIL PROTECTED] (Thomas
> F. Burdick) wrote:
>
>
>>Ken Tilton <[EMAIL PROTECTED]> writes:
>>
>>
>>>No, you do not want on-change handlers propagating data to other
>>>slots, though that is a sound albeit primitive way of improving
>>>se
Am Montag 08 Mai 2006 19:03 schrieb [EMAIL PROTECTED]:
> we want extract numbers from strings and wonder if there is already a
> module around for doing this. An example in our case would look like
> this:
>
> 0.032 +/- 0.5 x 10(-4)
Should work beautifully with the re.finditer function (untested!)
QOTW: "If you can find a workable solution not involving metaclasses
and decorators, don't use them" - Michele Simionato
"Newest Beautiful Soup beta solves everyone's problems that I know
of." - Leonard Richardson
Jeff Croft gives a good introduction to the Django web framework. Don't
le
John Salerno wrote:
> John Salerno wrote:
> > Ok, I've been staring at this and figuring it out for a while. I'm close
> > to getting it, but I'm confused by the examples:
> >
> > (?(id/name)yes-pattern|no-pattern)
> > Will try to match with yes-pattern if the group with given id or name
> > exists
hi...
can someone tell me if there's a group where people who are interested in
starting/contributing to embryoninc startup concepts can get together/meet,
exchange ideas, etc...
i'm not referring to meetings where you do VC/Funding presentations, I'm
basically talking about meetings where you co
John Salerno wrote:
> Scott David Daniels wrote:
>> John Salerno wrote:
>>> ... But isn't there something about a single leading underscore
>>> that doesn't import when you use from X import *? Or am I thinking of
>>> something else? Is that also the double underscore?
>>
>> That has to do with m
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I'm developing a django based intranet web server that has a search page.
Data contained in the database is mixed. Some of the words are
accented, some are not but they should be. This is because the
collection of data began a long time ago wh
I've been reading the recent cross-posted flamewar, and read Guido's
article where he posits that embedding multi-line lambdas in
expressions is an unsolvable puzzle.
So for the last 15 minutes I applied myself to this problem and come up
with this off-the-wall proposal for you people. Perhaps thi
Luis P. Mendes wrote:
> example:
> if the word searched is 'televisão', I want that a search by either
> 'televisao', 'televisão' or even 'télévisao' (this last one doesn't
> exist in Portuguese) is successful.
The ICU library has the capability to transliterate strings via certain
rulesets. One
Luis P. Mendes:
>I'm developing a django based intranet web server that has a search page.
>
>Data contained in the database is mixed. Some of the words are
>accented, some are not but they should be. This is because the
>collection of data began a long time ago when ascii was the only way to go
bruce wrote:
> can someone tell me if there's a group where people who are interested in
> starting/contributing to embryoninc startup concepts can get together/meet,
> exchange ideas, etc...
> i'm not referring to meetings where you do VC/Funding presentations, I'm
> basically talking about meetin
Kaz Kylheku wrote:
> I've been reading the recent cross-posted flamewar, and read Guido's
> article where he posits that embedding multi-line lambdas in
> expressions is an unsolvable puzzle.
>
> So for the last 15 minutes I applied myself to this problem and come up
> with this off-the-wall propo
Luis P. Mendes wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> I'm developing a django based intranet web server that has a search page.
>
> Data contained in the database is mixed. Some of the words are
> accented, some are not but they should be. This is because the
> colle
Kaz Kylheku wrote:
> But suppose that the expression and the multi-line lambda body are
> reordered? That is to say, the expression is written normally, and the
> mlambda expressions in it serve as /markers/ indicating that body
> material follows. This results in the most Python-like solution.
I
Dear Python experts,
I have a strange problem - or more precisely, I'm not even sure if it's
a problem or not. I'm developing a Python extension module in C which
creates a new type with methods, mapping support and stuff like that :)
Everything's working fine, but if I inherit a new class from th
I have a python code which is running on a huge data set. After
starting the program the computer becomes unstable and gets very
diffucult to even open konsole to kill that process. What I am assuming
is that I am running out of memory.
What should I do to make sure that my code runs fine without
Sebastian> we want extract numbers from strings and wonder if there is
Sebastian> already a module around for doing this. An example in our
Sebastian> case would look like this:
Sebastian> 0.032 +/- 0.5 x 10(-4)
Sebastian> it would even be helpful to have a routine which does
Thank you!
I got it.
--
http://mail.python.org/mailman/listinfo/python-list
If you have pywin32 installed, you can use the shell module.
from win32com.shell import shell, shellcon
shell.SHGetFileInfo(filename ,0, shellcon.SHGFI_TYPENAME)
Roger
"BartlebyScrivener" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Using Python on Windows XP, I am able to
Can you paste an example of the code you're using?
--
http://mail.python.org/mailman/listinfo/python-list
how big is the set? 100MB, more? what are you doing with the set? do
you have a small example that can prove the set is causing the freeze?
I am not the sharpest tool in the shed but it sounds like you might be
multiplying your set in/directly either permanently or temporarily on
purpose or acciden
[EMAIL PROTECTED] (Roy Smith) wrote:
>O(n^0), which is almost always written as O(1). This is a "constant
>time" algorithm, one which takes the same amount of steps to execute
>no matter how big the input is. For example, in python, you can
>write, "x = 'foo'". That assignment statement takes t
to throw fire on the fuel (:P), you can get the value back to an
in-place mutable change with a single expression...
mylist = [2,3,4,1]
print mylist.sort() or mylist
might not be too pythonic or maybe it is. I guess depends on what side
of the glass you might wish to view the solution :)
--
htt
In article <[EMAIL PROTECTED]>,
Casey Hawthorne <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Roy Smith) wrote:
>
> >O(n^0), which is almost always written as O(1). This is a "constant
> >time" algorithm, one which takes the same amount of steps to execute
> >no matter how big the input is.
Joe Marshall <[EMAIL PROTECTED]> wrote:
...
> If you language allows unnamed integers, unnamed strings, unnamed
> characters, unnamed arrays or aggregates, unnamed floats, unnamed
> expressions, unnamed statements, unnamed argument lists, etc. why
> *require* a name for trivial functions?
I th
Hi all,
Does anybody know of a module that allows you to enumerate all the
strings a particular regular expression describes?
Cheers,
-Blair
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi all,
>
> Does anybody know of a module that allows you to enumerate all the
> strings a particular regular expression describes?
>
> Cheers,
> -Blair
>
You mean like re.compile(r'.*') ?
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
L
Joe Marshall wrote:
> Alex Martelli wrote:
> Most languages allow `unnamed numbers'. The `VAT_MULTIPLIER' argument
> is a
> strawman. Would you want to have to use a special syntax to name the
> increment
> in loop?
>
> defnumber zero 0
> defnumber one { successor (zero); }
>
> for (int i = z
James Stroud wrote:
> You mean like re.compile(r'.*') ?
No. I mean like:
>>> regex = re.compile(r'a|b')
>>> regex.enumerate()
a
b
>>>
--
http://mail.python.org/mailman/listinfo/python-list
Pisin Bootvong wrote:
> Joe Marshall wrote:
>
>>Alex Martelli wrote:
>>Most languages allow `unnamed numbers'. The `VAT_MULTIPLIER' argument
>>is a
>>strawman. Would you want to have to use a special syntax to name the
>>increment
>>in loop?
>>
>> defnumber zero 0
>> defnumber one { successor
[EMAIL PROTECTED] wrote:
> James Stroud wrote:
>
>>You mean like re.compile(r'.*') ?
>
>
> No. I mean like:
>
regex = re.compile(r'a|b')
regex.enumerate()
>
> a
> b
>
>
You see the difficulty don't you? How will the computer know in advance
that the regex matches only a finite set
Its kinda 65o lines of code...not the best idea to paste the code.
[EMAIL PROTECTED] wrote:
> Can you paste an example of the code you're using?
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 223 matches
Mail list logo