Interesting.. it took me a while to figure out why the second case is
so much slower and you're right, it is indeed quadratic. I don't know
how likely would such pathological cases be in practice, given that
the preferred way to merge a batch of objects is
eq.merge(*xrange(10001)), which is more
Franck Y <[EMAIL PROTECTED]> writes:
> Hello Folks,
>
> I am facing a problem where i need to parse around 200 files, i have a
> bit of knowledge in PHP/Perl/Python (the magic P :-P)
>
> Which one would you suggest me since i have to generate a web
> interface ?
> And each one has his area of 'wo
szr wrote:
> Jürgen Exner wrote:
>> "Andrew Koenig" <[EMAIL PROTECTED]> wrote:
>>> <[EMAIL PROTECTED]> wrote in message
>>
>> [Subject: Python's doc problems: sort]
I want to emphasize a point here, as i have done quite emphatically
in the past. The Python documentation, is the world's
Is it possible to use platypus in page header and footer? I need to
create a document with long paragraphs but also I need to put tables and
images in page header and multi line info in page footer with alignment etc.
Thanks,
Laszlo
--
http://mail.python.org/mailman/listinfo/python-list
Arne Vajhøj wrote:
> szr wrote:
>> Arne Vajhøj wrote:
>>> szr wrote:
Peter Duniho wrote:
> On Fri, 30 May 2008 22:40:03 -0700, szr <[EMAIL PROTECTED]>
> wrote:
>> Arne Vajhøj wrote:
>>> Stephan Bour wrote:
Lew wrote:
} John Thingstad wrote:
} > Perl i
Franck Y a écrit :
Hello Folks,
I am facing a problem where i need to parse around 200 files, i have a
bit of knowledge in PHP/Perl/Python (the magic P :-P)
Which one would you suggest me since i have to generate a web
interface ?
And each one has his area of 'work'
And where's your perform
Hy, I've a problem with may python library generated with swig from C
code. I works and I can access all function but a simèple function
that print a string don't work's.
The function is like this:
int PrintTEST()
{
printf("TEST ");
return 1;
}
If I call the function (myDLL.PrintTEST()
"Joel Koltner" <[EMAIL PROTECTED]> writes:
> There's potentially a large difference between a "good" speaker of
> English/German/etc. vs. "eloquent."
>
> I'd tend to agree with Jerry that if you can write "good" code in
> one language, you can in pretty much any other as well... but that
> doesn'
Hi,
i am building a little script and i want to output a series of columns
more or less like this:
1 5 6
2 2 8
2 9 5
The matter is that i don't know in advance how many columns there will
be. By the way, each column will be actually FLOATs, not INTs. How can
i do this ? Any help welcome. R
Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> I find that eloquent Python speakers often tend to write a for loop
> when mere good ones will try to stick a list comprehension in!
>
+1 QOTW
--
Duncan Booth http://kupuguy.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
I've searched the standard library docs, and, while there are a couple
options for *reading* HTML from Python, I didn't notice any for
*writing* it. Does anyone have any recommendations (particularly ones
not listed on PyPI)?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
gianluca <[EMAIL PROTECTED]> writes:
> Hy, I've a problem with may python library generated with swig from C
> code. I works and I can access all function but a simèple function
> that print a string don't work's.
> The function is like this:
> int PrintTEST()
> {
> printf("TEST ");
> r
I've been looking at PyPy recently, and I see it's reached version 1.0
(and supports language version 2.4). Given that, I was wondering what
level of backwards-compatibility one can expect from future versions,
i.e. if I run code on, say, a translated stackless PyPy now, what is
the probability th
On Mon, 02 Jun 2008 01:03:05 -0700, miller.paul.w wrote:
> I've searched the standard library docs, and, while there are a couple
> options for *reading* HTML from Python, I didn't notice any for
> *writing* it.
I guess that's where the many templating engines are used.
Ciao,
Marc 'Black
On Mon, 02 Jun 2008 00:34:09 -0700, [EMAIL PROTECTED] wrote:
> i am building a little script and i want to output a series of columns
> more or less like this:
>
> 1 5 6
> 2 2 8
> 2 9 5
>
> The matter is that i don't know in advance how many columns there will
> be. By the way, each column
On Jun 2, 9:34 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> i am building a little script and i want to output a series of columns
> more or less like this:
>
> 1 5 6
> 2 2 8
> 2 9 5
>
> The matter is that i don't know in advance how many columns there will
> be. By the way, e
On 2008-05-24, Ben Finney <[EMAIL PROTECTED]> wrote:
> Sh4wn <[EMAIL PROTECTED]> writes:
>
>> first, python is one of my fav languages, and i'll definitely keep
>> developing with it. But, there's 1 one thing what I -really- miss:
>> data hiding. I know member vars are private when you prefix them
On 2008-05-24, Sh4wn <[EMAIL PROTECTED]> wrote:
> Hi,
>
> first, python is one of my fav languages, and i'll definitely keep
> developing with it. But, there's 1 one thing what I -really- miss:
> data hiding. I know member vars are private when you prefix them with
> 2 underscores, but I hate prefi
Antoon Pardon <[EMAIL PROTECTED]> wrote:
> If you really need it, you can do data hiding in python. It just
> requires a bit more work.
> --- $ python
> Python 2.5.2 (r252:60911, Apr 17 2008, 13:15:05)
> [GCC 4.2.3 (Debian 4.2.3-3)] on linux2
> Type "help", "copyright", "credits" or "license" fo
On Jun 2, 5:38 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> If you really need it, you can do data hiding in python. It just
> requires a bit more work.
>
> - Hide.py -
> class Rec(object):
> def __init__(__, **kwargs):
> f
[EMAIL PROTECTED] wrote:
I've searched the standard library docs, and, while there are a couple
options for *reading* HTML from Python, I didn't notice any for
*writing* it. Does anyone have any recommendations (particularly ones
not listed on PyPI)?
Thanks
My approach is usually to write the
On Jun 2, 6:11 am, Ken Starks <[EMAIL PROTECTED]> wrote:
> My approach is usually to write the data-load in XML rather than
> directly in HTML, and then use XSLT to produce the (X)HTML.
That's a good idea I hadn't considered. Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I using eval for quite strange reason, as long as I don't know a different
way to implement.
An example:
actions= ('print', 'sum', 'divide', 'myfunction')
parameters=(5, 'nothing',5.63, object)
for routines in actions:
routines(parameters)
I'd like to note that actions are string or st
On 2008-06-02, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Antoon Pardon <[EMAIL PROTECTED]> wrote:
>
>> If you really need it, you can do data hiding in python. It just
>> requires a bit more work.
>
>> --- $ python
>> Python 2.5.2 (r252:60911, Apr 17 2008, 13:15:05)
>> [GCC 4.2.3 (Debian 4.2.3-3)]
On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jun 2, 5:38 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> If you really need it, you can do data hiding in python. It just
>> requires a bit more work.
>>
>> - Hide.py -
>> class
On Jun 2, 12:35 pm, TheSaint <[EMAIL PROTECTED]> wrote:
> Hi,
> I using eval for quite strange reason, as long as I don't know a different
> way to implement.
>
> An example:
>
> actions= ('print', 'sum', 'divide', 'myfunction')
> parameters=(5, 'nothing',5.63, object)
>
> for routines in actions:
TheSaint <[EMAIL PROTECTED]> wrote:
> actions= ('print', 'sum', 'divide', 'myfunction')
> parameters=(5, 'nothing',5.63, object)
>
> for routines in actions:
> routines(parameters)
>
> I'd like to note that actions are string or string expressions of the
> program functions or python itself
In my unittest I want to override the logger of a working module so
that it puts all logging messages in /tmp/test.log instead so that in
my unittest I can inspect that it logs things correctly. Hopefully
this "pseudo" code will explain my problem::
>>> import logging, os
>>> logging.basicConfig(f
Peter Bengtsson wrote:
> In my unittest I want to override the logger of a working module so
> that it puts all logging messages in /tmp/test.log instead so that in
> my unittest I can inspect that it logs things correctly. Hopefully
> this "pseudo" code will explain my problem::
>
import lo
On Jun 2, 6:40 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 2, 5:38 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> >> If you really need it, you can do data hiding in python. It just
> >> requires a bit more work.
>
> >> --
0.8.1.0 is here and can be downloaded from http://gozerbot.org
new features:
* ssl connections are now supported
* third party software included into gozerbot:
o feedparser (used by RSS) .. makes atom feeds possible
o simplejson (used by COLLECTIVE)
o Beautif
On Jun 2, 8:14 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> Fair enough, but I don't see anything in your example that suggests a
> way to discriminate between access from within the class and access
> from outside the class, which is the crucial aspect of data hiding.
And, if you want an example
On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jun 2, 6:40 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > On Jun 2, 5:38 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> >> If you really need it, you can do data hiding in
On Jun 2, 8:50 am, Aldarion <[EMAIL PROTECTED]> wrote:
> On 6月2日, 上午8时05分, Peter Otten <[EMAIL PROTECTED]> wrote:
>
> > Aldarion wrote:
> > > for the little script
> > > #egg.py
> > > import sys
> > > for k,v in enumerate(sys.argv):
> > > print k,v
>
> > > it ignores the part after # on linux
> >
On Jun 2, 9:07 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 2, 6:40 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> >> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> >> > On Jun 2, 5:38 am, Antoon Pardon <[EMAIL PROTEC
TheSaint wrote:
On 19:06, lunedì 02 giugno 2008 Chris wrote:
actions= ('print', 'sum', 'divide', 'myfunction')
parameters=(5, 'nothing',5.63, object)
8< 8<
getattr(...)
getattr(object, name[, default]) -> value
8< 8<
for nn in actions:
func = getattr(cp, nn)
if callable(func)
On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jun 2, 9:07 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > On Jun 2, 6:40 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> >> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wr
On Jun 2, 12:34 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson wrote:
> > In my unittest I want to override the logger of a working module so
> > that it puts all logging messages in /tmp/test.log instead so that in
> > my unittest I can inspect that it logs things correctly. H
brechmos <[EMAIL PROTECTED]> writes:
>Hi,
>I have been using PHP the last while and in particular strtotime.
>What I want to replicate is finding the second or fourth Monday of the
>next month. In PHP with strtotime it is easy (strtotime("second
>Monday", strtotime("next month"), but I can't fin
On Jun 1, 8:43 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > ValueError: unknown locale: UTF-8
>
> > This is on open bug or is there more to it?
>
> Do you have an environment variable set who is named
> either LANG or starts with LC_?
Actually, yes:
LC_CTYPE=UTF-8
where is it coming from
Hello, all!
This post is to announce a new Python-oriented blog. See my .sig for the
URL.
I also have a question: is there any "official" method for getting listed
on Planet Python?
Thanks!
A fellow Pythonista
--
code.py: A blog about life, the universe, and Python
http://pythonista.wordp
On 19:06, lunedì 02 giugno 2008 Chris wrote:
>> actions= ('print', 'sum', 'divide', 'myfunction')
>> parameters=(5, 'nothing',5.63, object)
8< 8<
> getattr(...)
> getattr(object, name[, default]) -> value
8< 8<
> for nn in actions:
> func = getattr(cp, nn)
> if callable(func):
>
On 2 Giu, 10:08, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> gianluca <[EMAIL PROTECTED]> writes:
> > Hy, I've a problem with may python library generated with swig from C
> > code. I works and I can access all function but a simèple function
> > that print a string don't work's.
> > The function i
Hi,
okay, thanks now my DLL function seems to accept the functions given,
but instead of running my program keeps crashing (with windows address
violation errors). I did some further investigations on that and figured
out that the contextH variable is not just an identifier as I thought,
but
In article <[EMAIL PROTECTED]>,
Ethan Furman <[EMAIL PROTECTED]> wrote:
> Jerry Stuckle wrote:
>
> >
> > As I've said before - good programmers can write good code in any
> > language.
> >
>
> So... an eloquent speaker of English is also an eloquent speaker of
> Spanish/French/German?
Oh,
On May 31, 9:13 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote:
> On May 30, 2:40 pm, [EMAIL PROTECTED] wrote:
>
> > Hi, everybody!
>
> > I wrote a useful class ThreadPoolingMixIn which can be used to create
> > fast thread-based servers. This mix-in works much faster than
> > ThreadingMixIn because i
On Jun 2, 7:09 pm, [EMAIL PROTECTED] wrote:
> On May 31, 9:13 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote:
>
> > On May 30, 2:40 pm, [EMAIL PROTECTED] wrote:
>
> > > Hi, everybody!
>
> > > I wrote a useful class ThreadPoolingMixIn which can be used to create
> > > fast thread-based servers. This mi
[EMAIL PROTECTED] wrote:
To benchmark this I used a simple tcp server which writes a small
(16k)
string to the client and closes the connection.
Just a general note: When benchmarking such a network service it would
be valuable to see benchmark results for several data sizes. I'd expect
bette
On Jun 2, 12:34 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson wrote:
> > In my unittest I want to override the logger of a working module so
> > that it puts all logging messages in /tmp/test.log instead so that in
> > my unittest I can inspect that it logs things correctly. H
On 22:00, lunedì 02 giugno 2008 Paul Melis wrote:
> This doesn't exactly make sense, as what you want isn't really clear...
Sorry, I'm bad to express my toughts even I my nature language :)
I'll give a go to getattr() and see whether the results come in my taste :)
--
Mailsweeper Home : http://i
On Jun 2, 7:15 pm, Michael Ströder <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > To benchmark this I used a simple tcp server which writes a small
> > (16k)
> > string to the client and closes the connection.
>
> Just a general note: When benchmarking such a network service it would
> b
Hello
I need to go through each line of a CSV file, and extract some fields
using a regex. Then, I need to check each retrieved field, and if it
looks like "", turn this into NULL so that it's correct SQL.
I tried a few things, but still can't it working:
#Second field might be empty ->
Hello!
It seems like Python blogs are gaining popularity. It seems to me that
they play a crucial role in promoting Python as a language.
Do you agree with that?
Just a few days ago I've finished setting up a dedicated Python
blogging environment at:
http://www.pythonblogs.com
Do you think it wil
On 2 Giu, 17:54, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Mon, 2 Jun 2008 00:32:33 -0700 (PDT), gianluca <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > Hy, I've a problem with may python library generated with swig from C
> > code. I works and I can access all fun
> Actually, yes:
>
> LC_CTYPE=UTF-8
>
> where is it coming from? This is basically on a clean new machine...
> who might be setting it?
There are many possible places. grep in your Library, as a starting
point. As on Macintosh lists.
> It is coming from a program elsewhere on the
> system? How
On Jun 2, 11:42 am, "[EMAIL PROTECTED]" wrote:
> Hello
>
> I need to go through each line of a CSV file, and extract some fields
> using a regex. Then, I need to check each retrieved field, and if it
> looks like "", turn this into NULL so that it's correct SQL.
>
> I tried a few things, but still
Ken Starks wrote:
> [EMAIL PROTECTED] wrote:
>> I've searched the standard library docs, and, while there are a couple
>> options for *reading* HTML from Python, I didn't notice any for
>> *writing* it. Does anyone have any recommendations (particularly ones
>> not listed on PyPI)?
>>
>> Thanks
>
Matt <[EMAIL PROTECTED]> wrote:
> class MemStreamData(Structure):
> _fields_ = [("mode", c_byte),
>("lPos", c_uint),
>("dwVisibleSize", c_uint),
>("dwBufferSize", c_uint),
>("cpBuffer", POINTER(c_
I just discovered that the "robotparser" module interprets
a 403 ("Forbidden") status on a "robots.txt" file as meaning
"all access disallowed". That's unexpected behavior.
A major site ("http://www.aplus.net/robot.txt";) has their
"robots.txt" file set up that way.
There's no real "robots
On Jun 2, 3:38 am, Chris <[EMAIL PROTECTED]> wrote:
> On Jun 2, 9:34 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> > i am building a little script and i want to output a series of columns
> > more or less like this:
>
> > 1 5 6
> > 2 2 8
> > 2 9 5
>
> > The matter is that
On Mon, 2 Jun 2008 12:42:12 -0700 (PDT), Mensanator <[EMAIL PROTECTED]> wrote:
> On Jun 2, 3:38 am, Chris <[EMAIL PROTECTED]> wrote:
> > On Jun 2, 9:34 am, "[EMAIL PROTECTED]"
> >
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> >
> > > i am building a little script and i want to output a series of colu
On Jun 1, 2008, at 6:16 PM, George Sakkis wrote:
Equivalence is a class that can be used to maintain a partition of
objects into equivalence sets, making sure that the equivalence
properties (reflexivity, symmetry, transitivity) are preserved. Two
objects x and y are considered equivalent eithe
Hi,
On Wed, Apr 30, 2008 at 4:48 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> For example, in last week, that page is fetched 550 times.
> The second most popular page, trails quite a distance. Here's the top
yup that was me, i have access to a couple of machines and wanted to
test some int
On Jun 2, 1:16 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> Is it possible to use platypus in page header and footer? I need to
> create a document with long paragraphs but also I need to put tables and
> images in page header and multi line info in page footer with alignment etc.
>
> Thanks,
>
>
On Jun 2, 6:41 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> You are not realizing that only useful(**) thing about data hiding is
> that some code has access to the data, other code does not. If you
> "hide" data equally from everyone it's just a useless spelling change.
I think you're missing th
I have this function:
def write_err(obj):
from sys import stderr
stderr.write(str(obj)+"\n")
and I'd like to rewrite it to take a variable number of objects.
Something like this:
def write_err(*objs):
from sys import stderr
stderr.write(" ".join(objs)+"\n")
but I lose the pr
On Jun 2, 3:19 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Or lxml, for that purpose, which also is a lot nicer for generating XML and
> HTML in the first place.
>
> http://codespeak.net/lxml/
Awesome. lxml looks like exactly what I'm after... and it's in the
Ubuntu repos. :-) Thanks!
--
htt
> I just discovered that the "robotparser" module interprets
> a 403 ("Forbidden") status on a "robots.txt" file as meaning
> "all access disallowed". That's unexpected behavior.
That's specified in the "norobots RFC":
http://www.robotstxt.org/norobots-rfc.txt
- On server response indicating a
bukzor wrote:
I have this function:
def write_err(obj):
from sys import stderr
stderr.write(str(obj)+"\n")
and I'd like to rewrite it to take a variable number of objects.
Something like this:
def write_err(*objs):
from sys import stderr
stderr.write(" ".join(objs)+"\n")
b
[EMAIL PROTECTED] wrote:
> I need to go through each line of a CSV file, and extract some fields
> using a regex. Then, I need to check each retrieved field, and if it
> looks like "", turn this into NULL so that it's correct SQL.
You are taking the wrong approach here.
Don't build SQL statement
On Jun 2, 2:49 pm, [EMAIL PROTECTED] wrote:
> It seems like Python blogs are gaining popularity. It seems to me that
> they play a crucial role in promoting Python as a language.
Neat! Do blogs on your site have to be about Python programming, or
can people blog about anything?
--
http://mail.py
On Jun 2, 12:41 pm, [EMAIL PROTECTED] wrote:
> On Jun 2, 7:15 pm, Michael Ströder <[EMAIL PROTECTED]> wrote:
>
> Here are benchmarks for FreeBSD 6.2, amd64
>
> packet_size x y
> 0 499.57 1114.54
> 1024 499.29 1130.02
> 3072 500.09 1119.14
>
On Jun 2, 5:06 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> You are taking the wrong approach here.
>
> Don't build SQL statements as strings; you are enabling the next SQL
> injection attack. Pass parameters using the DB API instead.
>
> Don't use regular expressions to parse a CSV file. Python's
On Jun 2, 4:14 pm, [EMAIL PROTECTED] wrote:
> On Jun 2, 2:49 pm, [EMAIL PROTECTED] wrote:
>
> > It seems like Python blogs are gaining popularity. It seems to me that
> > they play a crucial role in promoting Python as a language.
>
> Neat! Do blogs on your site have to be about Python programming
On Jun 2, 9:43 pm, Doug Morse <[EMAIL PROTECTED]> wrote:
> On Mon, 2 Jun 2008 12:42:12 -0700 (PDT), Mensanator <[EMAIL PROTECTED]> wrote:
> > On Jun 2, 3:38 am, Chris <[EMAIL PROTECTED]> wrote:
> > > On Jun 2, 9:34 am, "[EMAIL PROTECTED]"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
>
> > > > i
On Jun 2, 11:34 pm, Chris <[EMAIL PROTECTED]> wrote:
> On Jun 2, 9:43 pm, Doug Morse <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Mon, 2 Jun 2008 12:42:12 -0700 (PDT), Mensanator <[EMAIL PROTECTED]>
> > wrote:
> > > On Jun 2, 3:38 am, Chris <[EMAIL PROTECTED]> wrote:
> > > > On Jun 2, 9:34 am, "[EMAIL
Yeah I would agree that a decent (a few steps below good in my book)
programmer should be able to have a decent handle on a new language, given
some acclimatization time of course. The amount of time this period lasts
varies on the language said programmer is learning, as well as the languages
he
On Jun 2, 4:02 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> I think what you want is:
> def write_err(*args):
> from sys import stderr
> stderr.write("\n".join([str(o) for o in args]))
Slight nitpick. If you are using version >= 2.4 you could use a
generator expression instead of a list
On Jun 1, 1:49Â am, Peter Otten <[EMAIL PROTECTED]> wrote:
> Peter Otten wrote:
> > #untested
>
> Already found two major blunders :(
>
> # still untested
> import difflib
>
> def _merge(a, b):
> Â Â sm = difflib.SequenceMatcher(None, a, b)
> Â Â for op, a1, a2, b1, b2 in sm.get_opcodes():
> Â
Well that's nice: you're accusing me of missing the point after having
quoted something I wrote as if it represented by own views, even
though I footnoted it and said I was only doing it for the sake of
argument. Perhaps, outside this discussion, I am totally getting "the
point".
I can't tell,
On Jun 2, 2:43 pm, Doug Morse <[EMAIL PROTECTED]> wrote:
> On Mon, 2 Jun 2008 12:42:12 -0700 (PDT), Mensanator <[EMAIL PROTECTED]> wrote:
> > On Jun 2, 3:38 am, Chris <[EMAIL PROTECTED]> wrote:
> > > On Jun 2, 9:34 am, "[EMAIL PROTECTED]"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
>
> > > > i
On Wed, 21 May 2008 07:23:04 -0700 (PDT), Paul Boddie
> MySQL appears to use "repeatable read" by default [1] as its
> transaction isolation level, whereas PostgreSQL (for example) uses
> "read committed" by default [2]. I would guess that if you were using
> PostgreSQL, this particular problem wo
This is probably a simple question to most of you, but here goes.
I've downloaded the xlrd (version 0.6.1) module and placed in in the
site-packages folder. Now, when I write a script, I type:
import sys
import xlrd
When I run it, there is an import error saying there is no module
named xlrd. H
bukzor wrote:
I have this function:
def write_err(obj):
from sys import stderr
stderr.write(str(obj)+"\n")
and I'd like to rewrite it to take a variable number of objects.
Something like this:
def write_err(*objs):
from sys import stderr
stderr.write(" ".join(objs)+"\n")
b
On Mon, Jun 2, 2008 at 4:42 AM, Franck Y <[EMAIL PROTECTED]> wrote:
> Hello Folks,
>
> I am facing a problem where i need to parse around 200 files, i have a
> bit of knowledge in PHP/Perl/Python (the magic P :-P)
>
Trite answer: Use whatever is going to work best in your circumstances.
All 3 lan
On Jun 2, 4:50 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
> On Jun 2, 6:41 am, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > You are not realizing that only useful(**) thing about data hiding is
> > that some code has access to the data, other code does not. If you
> > "hide" data equally from everyon
On Jun 2, 3:04 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jun 2, 4:50 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
>
> > On Jun 2, 6:41 am, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > > You are not realizing that only useful(**) thing about data hiding is
> > > that some code has access to the data
On Jun 1, 12:34Â am, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
>
> I would do it two steps. Â There's a number of ways to merge depending
> on whether everything is pulled into memory or
> not:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/491285http://aspn.activestate.com/ASPN/Cookboo
On Mon, Jun 2, 2008 at 6:31 AM, Giuseppe Ottaviano <[EMAIL PROTECTED]> wrote:
>
> On Jun 1, 2008, at 6:16 PM, George Sakkis wrote:
>
>> Equivalence is a class that can be used to maintain a partition of
>> objects into equivalence sets, making sure that the equivalence
>> properties (reflexivity, s
On Jun 2, 6:39 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
> On Jun 2, 3:04 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 2, 4:50 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
>
> > > On Jun 2, 6:41 am, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > > > You are not realizing that only useful(**)
On Jun 2, 2:56 pm, jay graves <[EMAIL PROTECTED]> wrote:
> On Jun 2, 4:02 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
>
> > I think what you want is:
> > def write_err(*args):
> > from sys import stderr
> > stderr.write("\n".join([str(o) for o in args]))
>
> Slight nitpick. If you are usi
[EMAIL PROTECTED] wrote:
> On Jun 2, 5:06 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>
>> You are taking the wrong approach here.
>>
>> Don't build SQL statements as strings; you are enabling the next SQL
>> injection attack. Pass parameters using the DB API instead.
>>
>> Don't use regular express
In article <[EMAIL PROTECTED]>,
David <[EMAIL PROTECTED]> wrote:
>> Clients generally require *working* software. Unfortunately it is all too
>> easy to ship something broken because then you can claim you completed the
>> coding on time and any slippage gets lost in the next 5 years of
>> mainten
On Mon, 2 Jun 2008 12:06:21 -0700 (PDT), Matimus <[EMAIL PROTECTED]>
wrote:
>Here is a brief example. Note that this code is very insecure and
>susceptible to a SQL injection attack. Hopefully these csv files are
>from a trusted source.
Yes they are, and this script will only run on my PC, so it d
On Jun 2, 4:17 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jun 2, 6:39 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 2, 3:04 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > > On Jun 2, 4:50 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
>
> > > > On Jun 2, 6:41 am, Carl Banks <[EMAIL PROTE
Hello there,
I am student of CS at the University of Warsaw, currently 4th year. I
am attending Object Oriented Programming seminar and it is about time,
I started looking for an idea of my master's degree project. As I like
Python very much, I would like to do something with this language, yet
I
"Russ P." <[EMAIL PROTECTED]> writes:
> I also realize, by the way, that Python allows a client of a class to
> define a new class member from completely outside the class
> definition. Obviously, that cannot be declared private.
This is bogus about 95% of the time though. For the cases where it
On Jun 2, 7:41 pm, "Russ P." <[EMAIL PROTECTED]> wrote:
> I thought you were saying that encapsulation or so-called "data
> hiding" is worthless. If I misunderstood you, then I apologize. I
> don't have time to go back and sort it all out.
No, not at all. I was suggesting that Antoon's example of
Chanman wrote:
This is probably a simple question to most of you, but here goes.
I've downloaded the xlrd (version 0.6.1) module and placed in in the
site-packages folder. Now, when I write a script, I type:
import sys
import xlrd
When I run it, there is an import error saying there is no modu
On Jun 2, 10:14 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 2, 9:07 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> >> On 2008-06-02, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> >> > On Jun 2, 6:40 am, Antoon Pardon <[EMAIL PROTE
1 - 100 of 139 matches
Mail list logo