David Pratt
Thanks George! You guys are great! I am always learning. Python is
awesome!!
Yeap, that was the reaction of many/most of us when we stumbled upon
python. Welcome aboard !
George
--
http://mail.python.org/mailman/listinfo/python-list
I am a java programmer and I want to learn Python Please help me.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I am a java programmer and I want to learn Python Please help me.
Google Is Your Friend:
http://www.razorvine.net/python/PythonForJavaProgrammers
http://www.ferg.org/projects/python_java_side-by-side.html
George
--
http://mail.python.org/mailman/listinfo/python-list
Christopher Subich wrote:
Steve Horsley wrote:
There is a higher level socket framework called twisted that everyone
seems to like. It may be worth looking at that too - haven't got round
to it myself yet.
I wouldn't say 'like,' exactly. I've cursed it an awful lot (mostly for
Simon Brunning schrieb:
Sibylle Koczian needs to sort part of a list. His first attempt made
the natural mistake - sorting a *copy* of part of the list:
I think it was _her_ first attempt.
--
---
Peter Maas, M+R
Thank you all for taking the time to consider and respond.
I had received the answer OL and responded with:
Thank you, and your elaboration is well taken. I was just exploring here
and the construct you noted is IMHO intuitively readable - at least for a
simple expression and
On 7/1/05, Chinook [EMAIL PROTECTED] wrote:
Thank you Andrew, and your elaboration is well taken. I was just
exploring here and the construct you noted is IMHO intuitively readable
- at least for a simple expression and condition. Other than the
choice order [False, True] which seems
Hi,
I need to install python (2.3.5) on windows without the giving installer
program.
Do you know what dlls are needed?
I found python23.dll, but the other (msvcrt.dll,msvcrit.dll) seems not
be useful.
Is there other dll? Are msvcrt.dll and msvcrit.dll used by
something?(test/test___all__.py
Terry Hancock wrote:
On Thursday 30 June 2005 09:49 am, Mike P. wrote:
IMHO I'm not particularly happy with the way Python is going language wise.
I mean, I don't think I'll ever use decorators, for example. Personally, in
terms of language features and capabilities I think the language
python23.dll requires msvcrt.dll basically.
if you use some .pyd, python requires other dll.
for example:
import _mysql # you must add a libmysql.dll for this module
kuoxin
Guillaume Hiron wrote:
Hi,
I need to install python (2.3.5) on windows without the giving installer
program.
Do you
Hi,
What do you guys recommend in terms of python project layout, especially
unit tests layout ?
Zope has unit tests per packages, twisted has a big tests directory
full of
tests ... and the file naming convention are also pretty differents ...
I guess there is part of
Hi,
why is this possible -
b = [1,2,3]
b[2] = b
b
[1,2,[...]]
b[2]
[1,2,[...]]
b[2][2][2][2][2]
[1,2,[...]]
but this is not -
x = [1,2,x]
Traceback (most recent call last):
File stdin, line 1, in ?
NameError: name 'x' is not defined
thanks
r_a_h_o_o_l
--
Peter Hansen wrote:
If the address doesn't get mapped to a name by a DNS server, I strongly
suspect you will get nowhere with whois, or much else. Not all IP
addresses have corresponding domain names: many are dynamic addresses
assigned on the fly to arbitrary customers of (for example)
On 7/1/05, Peter Maas [EMAIL PROTECTED] wrote:
Simon Brunning schrieb:
Sibylle Koczian needs to sort part of a list. His first attempt made
the natural mistake - sorting a *copy* of part of the list:
I think it was _her_ first attempt.
Ooops! Sorry, Sibylle.
--
Cheers,
Simon B,
I'm not a very experienced Python programmer yet, so I might be
mistaken, but there are a few things that would make me prefer C++ over
Python for large (over 500.000 LOC) projects.
- namespaces
- templates
- strong type checking
- data hiding
- more available libraries and more advanced
Timothy == Delaney, Timothy (Tim) [EMAIL PROTECTED] writes:
Timothy Absolutely. I've really tried to use Eclipse - it's the
Timothy standard editor for my current project (Java - blegh!). I
Timothy *hate* it. It's huge, bulky, slow ... I've gone back to
Timothy my text editor.
Adriaan Renting [EMAIL PROTECTED] writes:
I'm not a very experienced Python programmer yet, so I might be
mistaken, but there are a few things that would make me prefer C++ over
Python for large (over 500.000 LOC) projects.
- namespaces
- templates
- strong type checking
- data hiding
-
Thomas Heller [EMAIL PROTECTED] writes:
Adriaan Renting [EMAIL PROTECTED] writes:
I'm not a very experienced Python programmer yet, so I might be
mistaken, but there are a few things that would make me prefer C++ over
Python for large (over 500.000 LOC) projects.
- namespaces
- templates
Hi,
What is the best method for comparing two files by words?
I was thinking about reading files by words and compare them but a word
in one file can be linked with a new line character ( \n)
and this '\n' will cause that the words will considered to be
different( eventhough without '\n' are the
On Friday 01 July 2005 12:35 am, David Pratt wrote:
Wow Robert that is incredible python magic! I am trying to figure out
what this is doing since my attempts were regex and some long string
splitting and collection.
Try it out in the interpreter:
Test data:
test = 'en' | 'the brown cow'
you could always just remove those special characters (\n \t ..),
remove spaces, read both files and compare string. I don't this is the
best way of doing this... but maybe a combination of this way and yours
will be efficient enough - remove all problematic characters and then
compare line by
[EMAIL PROTECTED] wrote:
Hi,
why is this possible -
b = [1,2,3]
b[2] = b
b
[1,2,[...]]
b[2]
[1,2,[...]]
b[2][2][2][2][2]
[1,2,[...]]
but this is not -
x = [1,2,x]
Traceback (most recent call last):
File stdin, line 1, in ?
NameError: name 'x' is not defined
Because the right hand
Reinhold Birkenfeld wrote:
Hello,
Do you have any other good and valued Python modules that you would think are
bug-free, mature (that includes a long release distance) and useful enough to
be granted a place in the stdlib?
For my part, ctypes seems like a suggestion to start with.
ctypes
Title: Problem with struct.unpack
Hi all,
I have the following question/problem:
import struct
strBuffer = u'\x00\xf0\x00\x00\x00\x00\x00\x00'
print %r % strBuffer
u'\x00\xf0\x00\x00\x00\x00\x00\x00'
(doorOpen,) = struct.unpack(1x1B6x, strBuffer)
Traceback (most recent call
[EMAIL PROTECTED] writes:
I am trying to use the csv module to parse a column of values
containing comma-delimited values with unusual escaping:
AAA, BBB, CCC (some text, right here), DDD
I want this to come back as:
[AAA, BBB, CCC (some text, right here), DDD]
Quick and somewhat dirty:
Dan Sommers [EMAIL PROTECTED] writes:
There's some sort of irony or something in there about not writing the
best genetic algorithm, but I can't quite put my finger on it.
+1 QOTW :)
--
# Edvard Majakari Software Engineer
# PGP PUBLIC KEY available Soli Deo Gloria!
$_ =
Hi,
I would like to execute an oracle stored procedure using the any
oracle database module which satisfies the Database Specification
standard. I have tried cxOracle and Odbc database packages with no
success. If u have the answer plz give me an example code.
Thank you
--
hi all,could someone clear this up for me. I'm sure it's probably very
simple but I can't seem to get my head round it.
doing the following
import wmi
c = wmi.WMI()
for printdriver in c.Win32_PrinterDriver():
... pd = printdriver.Name
print pd
AGFA-AccuSet v52.3,3,Windows NT x86
import wmi
c = wmi.WMI()
for printdriver in c.Win32_PrinterDriver():
... pd = printdriver.Name
print pd
AGFA-AccuSet v52.3,3,Windows NT x86
pd[1] # type(pd) == str
u'G'
pd.split(',')
# split returns a new list, and you do not save it
[u'AGFA-AccuSet v52.3', u'3', u'Windows NT x86']
Ville Vainio wrote:
Timothy == Delaney, Timothy (Tim) [EMAIL PROTECTED] writes:
Timothy Absolutely. I've really tried to use Eclipse - it's the
Timothy standard editor for my current project (Java - blegh!). I
Timothy *hate* it. It's huge, bulky, slow ... I've gone back
part of code:
try:
self.isdnlog = QProcess(self)
self.isdnlog.addArgument(/usr/bin/tail)
self.isdnlog.addArgument(-f)
self.isdnlog.addArgument(/home/aljosa/qt/isdn.log)
[...]
QObject.connect(self.isdnlog, SIGNAL(readyReadStdout()),
self.onPhoneCall)
self.isdnlog.start()
problem is that
the square brackets round the output of split got me. Have plit into a
new list and all works as expeted. Cheers, MW.
--
http://mail.python.org/mailman/listinfo/python-list
There is a new winbin for testing upgraded tapos - and it does need testing
\\Blackbox\public\tapos\newwinbin-wx2.6.1
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 30 Jun 2005 [EMAIL PROTECTED] wrote:
can Python do it all?
More or less. There are two places where python falls down, IMHO. One is
performance: python isn't generally as fast as C or Java, even with Psyco.
However, the number of cases where performance - and absolute
straight-line
On Thu, 30 Jun 2005, Roy Smith wrote:
Terry Hancock [EMAIL PROTECTED] wrote:
One of the strengths of Python has been that the language itself is
small (which it shares with C and (if I understand correctly, not being
a lisp programmer?) Lisp), but with all the syntax enhancements going
Devan L wrote:
Why make it an instance attribute? Couldn't you just look at
the class attribute?
Each presenter (instance) needs its own view (instance). The class
attribute references a wxPython class. The resulting instance attribute
references a wxPython object (widget or container).
On Fri, 1 Jul 2005, George Sakkis wrote:
Terry Hancock wrote:
Keeping the language small is a worthwhile goal, but it should be traded
off with conciseness and readability; otherwise we could well be content
with s-expressions.
There's quite a number of satisfied LISP programmers out
On Fri, 1 Jul 2005, Adriaan Renting wrote:
I'm not a very experienced Python programmer yet, so I might be
mistaken, but there are a few things that would make me prefer C++ over
Python for large (over 500.000 LOC) projects.
Hmm. I don't know C++, but here goes ...
- namespaces
Aren't
Adriaan Renting wrote:
I use the debugger that comes with Eric3, but it is only free for Linux/
OS X, as it needs PyQt.
asside from setting (conditional) breakpoints, one of it's features is
that it can show you a browsable tree of all your variables. something
like this:
class MyClass
|
I think the point you want to make is that Python needs vastly less
lines of code as a similar application written in C++. I think Python
might on average be 50-60% of comparable C++ code, but not the 1-2% you
seem to want to claim. LOC is a somewhat arbitrairy measurement, but it
gives an idea of
Let me express it with an exaple (by the way, sorry for my bad
english):
Suppose you are planning to build a house.
You have two choices:
- Option one: Buy several thousands bricks, doors, tiles, windows,
etc... put them all together according to the blueprints and build your
home.
- Option two:
Hi All--
Max M wrote:
Another good bet is BeautifulSoup, which is absolutely great for
scraping content from webpages.
http://crummy.com/software/BeautifulSoup/index.html
Not if you want to handle HTML in anything but ASCII. BeautifulSoup
insists you change your site.py to change the
Hello all,
I recently started using Python, and I must say I like it. Both the
language and libraries available for it.
Background: I have written an application which I use to keep track
of my personal economy. I wrote it in Java because I wanted to learn the
language for a course in
Lad wrote:
Hi,
What is the best method for comparing two files by words?
I was thinking about reading files by words and compare them but a word
in one file can be linked with a new line character ( \n)
and this '\n' will cause that the words will considered to be
different( eventhough
Take a look at py2exe it provides a way to collect all
necessary files together for you. Add Inno Installer to
the mix and you can create setup.exe insallation programs
that don't require a Python install to distribute software.
-Larry Bates
Guillaume Hiron wrote:
Hi,
I need to install
Adriaan Renting| Email: [EMAIL PROTECTED]
ASTRON | Phone: +31 521 595 217
P.O. Box 2 | GSM: +31 6 24 25 17 28
NL-7990 AA Dwingeloo | FAX: +31 521 597 332
The Netherlands| Web: http://www.astron.nl/~renting/
Tom Anderson [EMAIL PROTECTED] 07/01/05
Comrades,
During our current discussion of the fate of functional constructs in
python, someone brought up Guido's bull on the matter:
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
He says he's going to dispose of map, filter, reduce and lambda. He's
going to give us product, any
Peter Hansen [EMAIL PROTECTED] writes:
Ivan Shevanski wrote:
Alright well I'm quite a noob and when I run a simple command to
change the current directory, nothing happens. I made a little test
script to show it:
import os
cwd = os.getcwd()
print cwd
os.system('cd = C:\Program Files')
BORT wrote:
Please forgive me if this is TOO newbie-ish.
I am toying with the idea of teaching my ten year old a little about
programming. I started my search with something like best FREE
programming language for kids. After MUCH clicking and high-level
scanning, I am looking at Python
Simon Brunning wrote:
On 7/1/05, Peter Maas [EMAIL PROTECTED] wrote:
Simon Brunning schrieb:
Sibylle Koczian needs to sort part of a list. His first attempt made
the natural mistake - sorting a *copy* of part of the list:
I think it was _her_ first attempt.
Ooops! Sorry, Sibylle.
Hi,
I'm extending a Python application that uses several com objects and threads.
The origional programmer set the main thread to multithreaded by doing this:
* sys.coinit_flags = 0
* import pythoncom
This is nessacary because otherwise a com (MapObjects2 from ESRI) can't run in
a thread, but
David Pratt wrote:
I have string text with language text records that looks like this:
'en' | 'the brown cow' | 'fr' | 'la vache brun'
Pardonnez-moi, but I thought how now brown cow translated into
something like comme maintenant vache brune -- something about the
adjectives agreeing with
Hi All--
Tom Anderson wrote:
Comrades,
I expect tons of disagreement in the feedback, all from ex-Lisp-or-Scheme
folks. :-)
I disagree strongly with Guido's proposals, and i am not an ex-Lisp,
-Scheme or -any-other-functional-language programmer; my only other real
language is Java. I
This has been discussed before. One thread I found was
http://mail.python.org/pipermail/python-list/2003-June/170526.html
The advice in that message might work for you.
Jeff
pgpPSqdIxsPgx.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Tom Anderson wrote:
On Fri, 1 Jul 2005, George Sakkis wrote:
Keeping the language small is a worthwhile goal, but it should be traded
off with conciseness and readability; otherwise we could well be content
with s-expressions.
There's quite a number of satisfied LISP programmers out
Jan Danielsson wrote:
But then it occured to me.. I started writing my program in Java
pre-1.5. Then came 1.5, I upgraded, and my program would still compile
and run, though I did get three warnings. The language had changed a
little bit; I had to assign a type to three arrays. That wasn't
#! rnews 1689
Newsgroups: comp.lang.python
Path:
news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp
From: Harry George [EMAIL PROTECTED]
Subject: Re: Python for everything?
Backwards compatibility is addressed in several Python Enhancement
Proposals (PEPs):
http://www.python.org/peps/pep-0005.html
http://www.python.org/peps/pep-0236.html
http://www.python.org/peps/pep-0004.html
http://www.python.org/peps/pep-0291.html
You also may want to check related threads in
Jan Danielsson wrote:
However, when I look at the various Python modules/libraries, I see
that there are several versions of them, for different versions of
python. I've seen everything from for python 1.5 up to for python
2.4 with all versions in between. This scares me a little bit. I
Paul Rubin wrote:
Rocco Moretti [EMAIL PROTECTED] writes:
Except that (please correct me if I'm wrong) there is somewhat of a
policy for not including interface code for third party programs which
are not part of the operating system. (I.e. the modules in the
standard libary should all be
Well, the thing is that I was just using changing directories as an example
for running a name specific command, is the long winded reply here the
only way to run name specific commands? An example would be (what I am
actually trying to do) run the simply command
mame s1945
in the command
I want to walk a folder structor and group all the files by extention.
Here is the code I put together is there a better way of doing this?
code
import os
folderKey = Folders
dicExt = {}
tDicKey = []
tDicKey.append(folderKey)
dicExt[folderKey] = []
walkPath = r\\zek\C$\AST
for d in
In article [EMAIL PROTECTED],
Jan Danielsson [EMAIL PROTECTED] wrote:
Hello all,
I recently started using Python, and I must say I like it. Both the
language and libraries available for it.
Background: I have written an application which I use to keep track
of my personal economy. I wrote
On 2005-06-30, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I have read in the old days that C was used for everything. It
was a systems programming language, and also did a lot of the
same stuff Bash scripts and perl do now.
Not really. C was used for a lot of stuff (mostly just under
Unix),
T can be silent in England too ..
frui'
cricke'
or replaced with D in the US ..
budder
ledder
--
http://mail.python.org/mailman/listinfo/python-list
On 2005-06-30, Ivan Van Laningham [EMAIL PROTECTED] wrote:
As other have noted, C was never really used for everything. Unix
tools were designed to connect together from the very beginning, which
is what makes shell scripting so powerful. This was true before there
was a C. Likewise, some
Adriaan Renting [EMAIL PROTECTED] writes:
I think the choice of a programming language is not very important in
determining the overal succes of a project. C++ and Python are however
my two favorite languages.
Well, getting done on time is a crucial part of success, and it takes
less time to
When I used py2exe to create executable file, "cephes" module missingerror occurred. I have installed python 2.3 and scientific and numeric python. Can anybody suggest me how to resolve the problem?
Justin__Do You Yahoo!?Tired of spam? Yahoo! Mail
- namespaces
Aren't namespaces basically the same as packages/modules in python?
Not in the way C++ uses them. In Python if would be something like this:
---
import os
using namespace casa
class os:
def open(self, file):
pass
a = os.open('something')
Hi all,
for a realtime simulation of a video installation we want to
use Quicktime to read video data from a file or stream and
process the data in a realtime Gameblender model.
We are trying to simulate a large-scale, low resolution media
facade using individuell video pixels to control lamps
Jan Danielsson [EMAIL PROTECTED] writes:
Hello all,
I'd like to ask seasoned Python developers:
- Are you comfortable in upgrading to the latest version of Python, or
are you worried about what you have to fix in your existing programs?
No, I'm not worried. The Python developers worry about
Tom Anderson [EMAIL PROTECTED] wrote:
On Thu, 30 Jun 2005, Roy Smith wrote:
Even some of the relatively recent library enhancements have been kind
of complicated. The logging module, for example, seems way over the
top.
Exactly the same thing happened with Java.
I was under the impression
Justin wrote:
When I used py2exe to create executable file, cephes module missing
error occurred.
I have installed python 2.3 and scientific and numeric python.
Can anybody suggest me how to resolve the problem?
scipy uses a lazy import mechanism. IIRC, without some help, py2exe's
[Ivan Van Laningham]
[Tom Anderson]
[Guido]
I expect tons of disagreement in the feedback, all from ex-Lisp-or-Scheme
folks. :-)
I disagree strongly with Guido's proposals, and i am not an ex-Lisp,
-Scheme or -any-other-functional-language programmer; my only other
real language is
Rocco Moretti wrote:
Except that (please correct me if I'm wrong) there is somewhat of a
policy for not including interface code for third party programs which
are not part of the operating system. (I.e. the modules in the
standard libary should all be usable for anyone with a default OS +
Huron wrote:
What do you guys recommend in terms of python project layout,
especially
unit tests layout ?
Zope has unit tests per packages, twisted has a big tests directory
full of
tests ... and the file naming convention are also pretty differents ...
I guess
Seems like he wants python programmers to solve their problems all in the
same way. While that is great for corporate slaves it is terrible for the
creative programmer.
Python is quickly becoming the visual basic of the 21 century. If you want
to have fun while getting some work done you need
For anyone who's interested: the Python wiki now contains a list of the
PSF-mentored proposals that were accepted for Google's Summer of Code:
http://wiki.python.org/moin/SummerOfCode
--amk
--
http://mail.python.org/mailman/listinfo/python-list
Dan Sommers wrote:
Peter Hansen [EMAIL PROTECTED] wrote:
This problem is well suited to the abilities of genetic algorithms,
and this would probably be an excellent way to learn more about them,
even if you don't get the best solution.
There's some sort of irony or something in there about not
Grant Edwards wrote:
[Why are Python programs referred to as scripts. Python no
more a scripting language than Java, Pascal, Smalltalk,
Objective C.]
I think it's because the term script is a nice, simple word that
evokes the idea of source file that can be directly executed, which is
a
Ivan Shevanski wrote:
Well, the thing is that I was just using changing directories as an
example for running a name specific command, is the long winded reply
here the only way to run name specific commands? An example would be
(what I am actually trying to do) run the simply command
mame
Seems like he wants python programmers to solve their problems all in the
same way. While that is great for corporate slaves it is terrible for the
creative programmer.
Python is quickly becoming the visual basic of the 21 century. If you want
to have fun while getting some work done you need
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I am a java programmer and I want to learn Python Please help me.
Well! Your condition is certainly tragic!
But what can anyone do?
Thomas Bartkus
--
http://mail.python.org/mailman/listinfo/python-list
Tom Anderson wrote:
So, if you're a pythonista who loves map and lambda, and disagrees with
Guido, what's your background? Functional or not?
I avoid map sometimes, because I find its syntax less readable
than list (and expression) comprehensions. But occasionally it
is the most readable way to
import os as realos
Names are nothing magic in Python, and quite easily manipulated:
import os
os.write(1, Hello World!)
class os:
pass
o = os()
import os
os.write(1, \n)
So basically this kind of name clashes usually do not happen in Python.
Or another usage:
os = SomeObject()
def
It'd be silly to write the code for it if it already
exists somewhere in the Python re or sre library
module:
I need to find and replace all strings in a text file
from a certain pattern to another pattern.
so for example if I see 'this(\D*)that' anywhere in
the file then I'd like to make is
People:
The Money two-days sprint in EuroPython 2005 has finished.
We advanced a lot. The pre-PEP is almost done, and the corresponding
test cases are all written.
We need to finish the structure procesing for currency general
information, and bring general functions to the module, but most of
Chinook wrote whilst his head was elsewhere:
So, where might I have found this construct.
ta = [5, 15, 12, 10, 9]
nta = [tai+[10,-10][tai=10]for tai in ta]
nta
[15, 5, 2, 0, 19]
Immediately after posting and shutting down last night, I had one of
those expansive moments that visit us
re.replace.
I don't think there's any way to avoid it. Except maybe having an alias
email address or a fake one.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am using pexpect to spawn an interactive program and wait for
particular string in its output. It works fine but once I get this
required information, I really don't care about the child process
anymore. I would effectively want to detach from it. Is there any way
to do such thing in
#! rnews 4560
Newsgroups: comp.lang.python
Path:
news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp
From: Harry George [EMAIL PROTECTED]
Subject: Re:
X-Nntp-Posting-Host:
None of them are really indispensible. Map and filter cab be replaced
with list comprehensions. reduce is redundant except when multiplying a
series; there's a sum function for a reason. Lambda looks cleaner in
some cases, but you don't gain any functionality.
What really struck me, though, is
[Peter Hansen]
Mike Meyer wrote:
Yes. I once grabbed an old program that did assignments to None. But
that's always been a bad idea.
What was the use case!?
People used to assign None to itself as a keyword argument in function
headers. The goal was to make a local copy of the reference,
George Sakkis wrote:
By the way, from this example I discovered that properties cannot be
unbound, i.e. using path.ext instead of getExtension raises TypeError.
Couldn't/shouldn't Class.prop(instance) be allowed as equivalent of
instance.prop, just as methods ?
Use the property's __get__()
Deval L wrote:
re.replace.
There isn't a re.replace; be careful when you reply to newbies.
Vibha Tripathi wrote:
It'd be silly to write the code for it if it already
exists somewhere in the Python re or sre library
module:
I need to find and replace all strings in a text file
Thanks for all the postings. I can't change delimiter in the source
itself, so I'm doing it temporarily just to handle the escaping:
def splitWithEscapedCommasInParens(s, trim=False):
pat = re.compile(r(.+?\([^\(\),]*?),(.+?\).*))
while pat.search(s):
s =
[EMAIL PROTECTED] wrote:
I avoid map sometimes, because I find its syntax less readable
than list (and expression) comprehensions. But occasionally it
is the most readable way to do something, and I wouldn't want to lose
it.
I tend to avoid map as much as possible. The only places I'm still
Peter Otten wrote:
import re
_reLump = re.compile(r\S+)
def indices(text, chunks):
lumps = _reLump.finditer(text)
for chunk in chunks:
lump = [lumps.next() for _ in chunk.split()]
yield lump[0].start(), lump[-1].end()
Thanks, that's a really nice, clean solution!
iK [EMAIL PROTECTED] writes:
Seems like he wants python programmers to solve their problems all in the
same way. While that is great for corporate slaves it is terrible for the
creative programmer.
No, he wants Python to be Pythonic. TMTOWTDI is not Pythonic.
Python is quickly becoming
Delaney, Timothy (Tim) wrote:
Grant Edwards wrote:
On 2005-06-30, Delaney, Timothy (Tim) [EMAIL PROTECTED] wrote:
Due to some wierd property requiring conservation of
consonants, when speaking Strine you've got to take the r's
removed from words like carrier and order, and add them to
1 - 100 of 186 matches
Mail list logo