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
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 Infosy
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 cond
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 see
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 retur
"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 l
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
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 "pe
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 "", line 1, in ?
NameError: name 'x' is not defined
thanks
r_a_h_o_o_l
--
http://mail.python.org/
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,
S
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 developeme
> "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 tex
"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 h
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
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 sa
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
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 line
[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 "", line 1, in ?
> NameError: name 'x' is not defi
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.
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 r
[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 s
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
--
http://mail.python.or
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
>>> 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'Wi
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, bu
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()
<<<
pro
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
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 ou
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: Ge
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
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 progr
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
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 and
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:\Pr
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 P
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.
>
>
> Oo
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 n
#! rnews 1856
Newsgroups: comp.lang.python
Path:
news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!195.241.76.212.MISMATCH!transit1.news.tiscali.nl!tiscali!transit0.news.tiscali.nl!tudelft.nl!txtfeed1.tudelft.nl!feeder1.cambrium.nl!feed.tweaknews.nl!news2.euro.net!newsfeed.freenet.de!
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
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
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 programm
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
#! 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?
X-Nntp-Posti
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 c.
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 bi
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 a
Well, the thing is that I was just using changing directories as an example
for running a name specific command, is the 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 line. MAME is, for those o
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?
import os
folderKey = "Folders"
dicExt = {}
tDicKey = []
tDicKey.append(folderKey)
dicExt[folderKey] = []
walkPath = r"\\zek\C$\AST"
for d in os.walk(walk
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 econom
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
Uni
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,
"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 tim
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?
Justin__Do You Yahoo!?Tired of spam? Yahoo! Ma
>> - 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
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 mo
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 a
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 im
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
de
[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
> > rea
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 defau
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 gue
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 to
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
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
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 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
> 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
<[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
ina wrote:
> 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?
>
[snip]
If you were to download Jason Orendorff's "path" module, which is a
convenient single-file package that vastly simplifies all man
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!?
-Peter
--
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 t
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()
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 'tha
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
t
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 expansiv
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 pexpe
"Peter Hansen" wrote:
> ina wrote:
> > 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?
> >
>
> [snip]
>
> If you were to download Jason Orendorff's "path" module, which is a
> convenient single-file
Am Freitag, den 01.07.2005, 08:25 -0700 schrieb George Sakkis:
> >
> > Again, how? Is there a way to force that an external user of my lib can
> > not use my internal data/methods/classes, unless he uses odd compiler
> > hacks?
>
Well, one could probably argue it the other way. In Python you can a
#! 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: cola2.ca.boei
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 the
[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 refere
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
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 = re.sub(p
[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 sti
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 s
1 - 100 of 193 matches
Mail list logo