Upgraded from 2.2.2 to 2.4 and all seems to work as
before except the output to the IDLE window is now twenty times slower than it
was before. The statement
for i in range (100): print
i
now takes about forty-five seconds to complete! It
used to be two seconds.
Python 2.4 on Windows ME.
Hi,
I upgraded from 2.2.2 to 2.4 and all
is well except the output to the IDLE window is now twenty times slower than it
was before, making the window utterly unusable for verbose output. The statement
-- for i in range (100): print i -- now takes about forty-five seconds to complete! Used
Hi all,
Here's an
operator who instantantly destroys all messages he cannot identify within two
seconds, saves and inspects all attachments before opening them and
who thought himself immune from viruses for it. Years of trouble-free
operation reinforced the perception.
I recen
- Original Message -
From: "André Søreng" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Tuesday, March 01, 2005 8:46 PM
Subject: Regular Expressions: large amount of or's
> > Hi!> > Given a string, I want to find all
ocurrences of> certain prede
Josef Albert Meile, James Stroud, Sean
Blakey,
Thank you very very much for your valuable
suggestions and kind encouragement.
Frederic
( No, I don't have any particular affection for
Microsoft stuff. Very much on the contrary. I have a plan to start
using Unix. This plan is over twent
> Please
include "goto" command in future python realeses> know that proffesional
programers doesn't like to use it, > but for me as newbie it's too hard
to get used replacing it > with "while", "def" or other commands>
--
I believe the bad reputation of 'goto' goes back to
the originators
> Heiko wrote:
> SETUP = object()> ELSE =
object()> BREAK = object()
>
> machine = {"WAITING FOR ACTION":>
{customer_drops_coin:"COIN HAS BEEN DROPPED",>
customer_selects_beverage:"ORDER RECEIVED",>
customer_cancels_order:"ACCOUNT CLOSURE IS
Josef,
I'll definitely take a close look at all the suggestions I have been
offered, in the interest of future damage prevention. This time, though, the
fight is over and I emerge victorious!
Poking around here and I came across huge startup or execution log
files listing rather unabash
Try to use % instead of a comma (a Python quirk) and quotes around your
strings (a MySQL quirk):
cursor.execute("INSERT INTO edict (kanji, kana, meaning) VALUES ('%s',
'%s', '%s')" % ("a", "b", "c") )
Frederic
- Original Message -
From: "grumfish" <[EMAIL PROTECTED]>
Newsgroups: comp
o it looks like the problem is with
MySQL (e.g. table name, column names, ...)
Frederic
- Original Message -
From: "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Monday, March 14, 2005 11:55 PM
Subject: Re: Can't seem to
Hi!
If I am missing a point here, what could it
be? Watch the hot spots (***)
Frederic
#
# Python 2.4, Windows ME
X = 0, Y = 1
class Vertex (list):
def __init__ (self, *coordinates): self [:]
= l
I see! It's the
in-place aspect that led me to assume that the assignment to self inside
the method would do the trick. Next the explicit call reinforced the perception.
Anyway, thank you very much for the clarification.
Frederic
> Anthra Norell wrote:>
>> If I am mis
Hi,
The following are differences of solar declinations
from one day to the next, (never mind the unit). Considering the inertia of a
planet, any progress of (apparent) celestial motion over regular time intervals
has to be highly regular too, meaning that a plot cannot be jagged. The data
ww.mirror5.com/software/plotutils/plotutils.html
>
> Good Luck
> Larry Bates
>
> John J. Lee wrote:
> > "Anthra Norell" <[EMAIL PROTECTED]> writes:
> >
> >
> >>Hi,
> >>
> >>The following are differences of solar declinations from
- Original
Message -From: "Tom Plunket" <[EMAIL PROTECTED]>Newsgroups: comp.lang.pythonTo: Sent: Friday, July 14, 2006 12:49 AMSubject: String handling
and the percent operator> I have some code to autogenerate some
boilerplate code so that I don't> need to do
- Original Message -
From: "Avi Kak" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Sunday, July 16, 2006 11:05 PM
Subject: embedding executable code in a regular expression in Python
> Folks,
>
> Does regular expression processing in Python allow for executable
> code to be
Hi, see below ...
- Original Message -
From: "Paul McGuire" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Monday, July 17, 2006 10:09 AM
Subject: Re: embedding executable code in a regular expression in Python
> Avi Kak wrote:
> > Folks,
> >
> > Does regular expression proc
Hi,
Below your solution ready to run. Put get_statistics () in a loop that
feeds it the names from your file, makes an ouput file
name from it and passes both 'statistics' and the ouput file name to
file_statistics ().
Cheers,
Frederic
- Original Message -
From: <[EMAIL PROTECT
- Original Message -
From: "Paul McGuire" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Tuesday, July 25, 2006 7:48 PM
Subject: Re: Parsing Baseball Stats
> "Anthra Norell" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTE
- Original Message -
From: "Paul McGuire" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Wednesday, July 26, 2006 1:01 AM
Subject: Re: Parsing Baseball Stats
> "Anthra Norell" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTEC
- Original Message -
From: "Graham Feeley" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Friday, July 28, 2006 5:11 PM
Subject: Re: Newbie..Needs Help
> Thanks Nick for the reply
> Of course my first post was a general posting to see if someone would be
> able to help
> her
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Friday, July 28, 2006 10:30 PM
Subject: Looking for a regular expression for this...
> Hi,
> My string is a multi line string that contains "filename
> \n" and "host \n" entries among other things.
>
> For example: s
I will give thisone a go first and if there is anything I can do for
> you just ask and I will try my best.
> I really appreciate what you have done.
> Of course I will try to follow your code to see if any will fall on
> meLOL
> Regards
> Graham
>
> "Anthra Norell&qu
Pak (or Andrei, whichever is your first name),
My proposal below:
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Sunday, July 30, 2006 8:52 PM
Subject: Re: Html character entity conversion
> danielx wrote:
> > [EMAIL PROTECTED] wrote:
> > >
- Original Message -
From: "Claudio Grondi" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Tuesday, August 01, 2006 2:42 PM
Subject: Re: Html character entity conversion
> Anthra Norell wrote:
>
> >>>>import SE# Available at
Harald,
This works. 's' is your SQL sample.
>>> import SE # From the Cheese Shop with a good manual
>>> Split_Marker = SE.SE (' ";=\" "~\$_?\$(.|\n)*?\$_?\$~==" ')
>>> s_with_split_marks = Split_Marker (s)
>>> s_split = s_with_split_marks.split ('')
That's it! And it isn't as complicated as
HJi all,
In the short period of time since I introduced SE. the feedback has been
overwhelmingly postive. Thank you all! I am still cleaning
up minor functional imperfections as I encounter them working out solutions to
posted problems. So the other day I discovered that
version 2.1 failed to pr
If you go to http://www.python.org/pypi. you see it about in the middle of the
recently updated packages. It's blue, so you can
click it and you're there.
The update page shows only the twenty most recent updates. So they drop
out at the bottom rather fast. If it's gone by the
time you chec
Anton,
See if this suits your purpose: http://cheeseshop.python.org/pypi/SE/2.2%20beta
Below the dotted line is how it works.
Frederic
- Original Message -
From: "Anton81" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Wednesday, August 09, 2006 7:48 PM
Subject: Escape sequ
John,
I have a notion about translating stuff in a mess and could help you with
the translation. But it may be that the conversion
from DOC to formatted test is a bigger problem. Loading the files into Word and
saving them in a different format may not be a
practical option if you have man
No one could do it any better. Good for you! - Frederic
- Original Message -
From: "John Salerno" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Friday, August 11, 2006 4:08 PM
Subject: Re: using python to edit a word file?
> Anthra Norell wrote:
> &
This might well take the trouble out ot the OP's replace:
http://cheeseshop.python.org/pypi/SE/2.2%20beta
Regards
Frederic
--
And here is how it works:
>>> text = '''defgefabcdefy
effwerbyuuuterrfr'''
>>> im
Hitesh, You might want to try this:
>>> tricky_path_name = '\\serverName\\C:\\exe files\\example.exe -u ABC -g DEF'
>>> import SE
>>> Editor = SE.SE ('C:=C$: "exe -=exe"')
>>> edited_path_name = Editor (tricky_path_name)
>>> print edited_path_name# See what it did
\serverName\C$:\exe fil
Steve,
I thought Fredrik Lundh's proposal was perfect. Are you now saying it
doesn't solve your problem because your description of the
problem was incomplete? If so, could you post a worst case piece of htm, one
that contains all possible complications, or a
collection of different cases all
Hi
If a piece of code
exits with an exception before it closes an open file, that file seems to remain
locked, which is real pain in the butt if I develop a file in parallel with
a piece of code. Is there a way to close
such lost files short of starting a new session?
Frederic
--
- Original Message -
From: "Ben Finney" <[EMAIL PROTECTED]>
To:
Sent: Friday, June 02, 2006 12:30 AM
Subject: Re: losing handles of open files
> Please don't post non-text message bodies to discussion
> forums. Message bodies should be plain text.
>
>
Hi all,
I have
invested probably 500 hours in the development of a module which I think could
fill a gap, judging by some problems regularly discussed on this
forum. The module is finished and I want to contribute it. A kind
sould recently suggested I upload it to the Cheese Shop. I
>>> import SE
>>> Editor = SE.SE ('sleeping=dead sleeping.htm== sleeping<==')
>>> Editor ('This parrot is
sleeping. Really, it is sleeping.'
'This parrot is sleeping. Really, it
is dead.'
Or:
>>> Editor ( (name of htm file), (name of output file) )
Usage: You make an explicit list of what you want
DH,
Could you be more specific describing what you have and what you want?
You are addressing people, many of whom are good at
stripping useless junk once you tell them what 'useless junk' is.
Also it helps to post some of you data that you need to process and a
sample of the same dat
You may also want to look at this stream editor:
http://cheeseshop.python.org/pypi/SE/2.2%20beta
It allows multiple replacements in a definition format of utmost simplicity:
>>> your_example = '''
"Python has been an important part of Google since the
beginning, and remains so as the system grow
Roman,
Your re works for me. I suspect you have tags spanning lines, a thing you get
more often than not. If so, processing linewise
doesn't work. You need to catch the tags like this:
>>> text = re.sub ('<(.|\n)*?>', '', text)
If your text is reasonably small I would recommend this solution. E
---
>
> [EMAIL PROTECTED]:~/Desktop/SE-2.2$ sudo python SETUP.PY install
> running install
> running build
> running build_py
> file SEL.py (for module SEL) not found
> file SE.py (for module SE) not found
> file SEL.p
Dylan,
It seems there is an
installation routine that doesn't work. I just has a similar complaint. Fact is,
I am not familiar with the routine. It sounds like it automates
complicated downloads. This is as simple a download as can be. So just forget
about install. Download the zip f
is that before the statement row[0] =
> re.sub(r'<.*?>', '', row[0]), I have row[0]=re.sub(r'[^
> 0-9A-Za-z\"\'\.\,[EMAIL PROTECTED](\)\*\&\%\%\\\/\:\;\?\`\~\<\>]', '', row[0])
> statement. Hence, the line separators are
No, I am not running Linux to any extent. But I am very strict about case.
There is not a single instance of "se.py" or "sel.py"
anywhere on my system. You' ll have to find out where lower case sneaks in on
yours. The zip file preserves case and in the zip file
the names are upper case. I am baff
data from a text file to parse html page
> Anthra Norell wrote:
> > No, I am not running Linux to any extent. But I am very strict about case.
> > There is not a single instance of "se.py" or "sel.py"
> > anywhere on my system. You' ll have to f
Hi,
I keep working around a little problem with unpacking in cases in which I
don't know how many elements I get. Consider this:
def tabulate_lists (*arbitray_number_of_lists):
table = zip (arbitray_number_of_lists)
for record in table:
# etc ...
Eric,
Having played around with problems of this kind for quite some time I find
them challenging even if I don't really have time to
get sidetracked. Your description of the problem makes it all the more
challenging, because its 'expressionist' quality adds the
challenge of guessing what you
(3, 6, 34)] # That's what I want
Thank you all
Frederic
- Original Message -
From: "Gerard Flanagan" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Sunday, August 27, 2006 2:59 PM
Subject: Re: unpaking sequences of unknown length
>
> Anth
Message -
From: <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Monday, August 28, 2006 10:48 AM
Subject: Re: newbe question about removing items from one file to another file
>
> Anthra Norell wrote:
> > Eric,
> >Having played around with problems of this ki
ou, take them out with an additional
definition when you make your
Instrument_Block_Filter: (13)= or "\r=")
Regards
Frederic
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Wednesday, August 30, 2006 1:51 AM
Subject: Re: ne
Nico, perhaps this would be suitable:
>>> s = '''Example text:
This is a test. A test.
/www/mydoc1
And I need to extraxt /www/mydoc1 and /www/mydoc2 from this text.
/foo/bar/doc ...'''
>>> import SE
>>> Thing_Filter = SE.SE (' "~>> key="path">(.|\n)*?~==" | "~<.*?>~= " ')
>>> print Thing_Filte
Abhishek,
I hesitate to propose this idea, because there's got to be a better (more
conventional) way of doing this. Anyway consider
this:
>>> x = "a+b"; y = "x*a; z = "x+y" # Your definitions
>>> import SE
>>> def f (x, y, z):
substitutions = 'z=(%s) | y=(%s) | x=(%s)' % (z,
- Original Message -
From: "Carl Banks" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Saturday, September 02, 2006 6:33 AM
Subject: Re: Using eval with substitutions
> [EMAIL PROTECTED] wrote:
> > >>> a,b=3,4
> > >>> x="a+b"
...
> Careful. Here be dragons.
...
> However,
Dexter,
Whenever I can I post solutions. And when I do, I run them in an IDLE
window and copy my commands plus the output over into
the message. So my posting should be replicable, if you would copy the commands
into your IDLE window one by one and hitting return.
Please do this and c
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Monday, September 04, 2006 4:58 AM
Subject: Re: newbe question about removing items from one file to another file
>
> Anthra Norell wrote:
> > Dexter,
> >
> > Here
t out import se the program works and when
> I use import se everything connected to the library crashes on the
> import line..
>
>
>
>
> Anthra Norell wrote:
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > Newsgroups: comp.lang.pytho
> Hi,
>
> I'm trying to use the Beautiful Soup package to parse through the
> "bookmarks.html" file which Firefox exports all your bookmarks into.
> 've been struggling with the documentation trying to figure out how to
> extract all the urls. Has anybody got a couple of longer examples using
> Bea
s = '''
$14.99
,
$27.99
,
$66.99
,
$129.99
,
$254.99
'''
>>> for line in [l.strip () for l in s.splitlines ()]:
if line [0] == '$': print line
$14.99
$27.99
$66.99
$129.99
$254.99
Why parse? Why regular expressions?
Frederic
--
http:
Diez B. Roggisch wrote:
> [EMAIL PROTECTED] schrieb:
>> Hello
>>
>> I am looking for python code that takes as input a list of strings
>> (most similar,
>> but not necessarily, and rather short: say not longer than 50 chars)
>> and that computes and outputs the python regular expression that
>> mat
It must be because there aren't enough real problems that so many people
devote so much energy to inventing so many imaginary ones.
Frederic
(GOD tells me---much against my will; I categorically refuse to be a
prophet!---to throw this piece of HIS divine wisdom into the melee.)
- Original
To contribute to this interesting discussion, which after having provided
practical solutions, has become academic, I believe we are dealing with a
particularly innocuous case of noise infection, innocuous on account of the
noise being conspicuously distinct from the signal. The signal is the orbta
I just had the same problem the other day. I solved it by starting out with
an image large enough to retain enough white area following the rotation.
Frederic
- Original Message -
From: "rzed" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Sunday, May 01, 2005 1:17 PM
Subject
Sent: Tuesday, May 03, 2005 8:13 PM
Subject: Re: Setting the corner color in rotated PIL images
> "Anthra Norell" <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
> [in response to:
> >> I'm using PIL to generate some images which may be rotated at
>
I rolled my own for relatively short sequences, like passwords. The key is
an integer. To decrypt use the negative encryption key. I consider the
encryption unbreakable, as it is indistinguishable from a random sequence.
Frederic
###
def crypt (sequence, key):
import random
sign = (key > 0
nt: Saturday, May 07, 2005 11:11 AM
Subject: Re: Encryption with Python?
> Anthra Norell wrote:
> > I rolled my own for relatively short sequences, like passwords. The key
is
> > an integer. To decrypt use the negative encryption key. I consider the
> > encryption unbrea
Robert,
Thanks a lot for your thorough explanations.
- Original Message -
From: "Robert Kern" <[EMAIL PROTECTED]>
To:
Sent: Saturday, May 07, 2005 3:18 PM
Subject: Re: Encryption with Python?
( snip )
> >>You do realize that if I have two ciphertexts encrypted with the same
> >>ke
Paul,
I thank you too for your response. Let me just tell you what goes
through my mind.
- Original Message -
From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid>
Newsgroups: comp.lang.python
To:
Sent: Monday, May 09, 2005 9:45 PM
Subject: Re: Encryptio
Original Message -
From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid>
Newsgroups: comp.lang.python
To:
Sent: Tuesday, May 10, 2005 12:59 AM
Subject: Re: Encryption with Python?
> ..
> Since good encryption schemes that don't have significant performance
> penalties are widely availa
- Original Message -
From: "flamesrock" <[EMAIL PROTECTED]>
Newsgroups: microsoft.public.windowsxp.network_web,
rec.music.beatles,rec.music.makers.guitar.acoustic,
alt.showbiz.gossip,comp.lang.python
To:
Sent: Thursday, May 12, 2005 2:04 AM
Subject: Re: BluWater: God is not a man
> I'm c
_ [o[ii]] = s_ [ii]
s += ''.join (s__)
i += l
return s
- Original Message -
From: "Christos TZOTZIOY Georgiou" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Friday, May 13, 2005 11:06 AM
Subject: Re: Encryption with Python?
> On
Thank you all, James, Dennis, Christos, Paul,
Isn't it remarkable that it takes "foolishness" to earn "a little
respect".
Anyway, even as I write this, my account balance stands unchanged at
... no, come to think of it, the account balance is definitely not a part of
the problem. I wil
class C: ...
class C2 (C): ...
# What I want to do:
if x.__class__ in (C, C2):
do_something_with (x)
# Requires an exhaustive genealogy, which normally is impractical and often
impossible
# Another approach
class_tree = inspect.getclasstree ((x.__class__,))
if classtree_con
- Original Message -
From: "Konstantin Veretennicov" <[EMAIL PROTECTED]>
To: "Anthra Norell" <[EMAIL PROTECTED]>
Cc: "Python SIG"
Sent: Wednesday, June 15, 2005 11:28 AM
Subject: Re: Single test for a class and all its subclasses?
> On 6/1
se = SE.SE (r' "~=.~=\=#')
>>> se ('tyrtrbd =ffgtyuf == =tyryr =u=p ff')
'tyrtrbd =#fgtyuf =# =#yryr =#=# ff'
I am in the final stages of documenting my stream editor SE. There are quite
a few problems raised on this list which SE would handle elegantly. Where do
I propose it for distribu
>>> se = SE.SE (' "~/[A-Za-z0-9_]+/CHECKEDOUT~==" | /= CHECKEDOUT=')
>>> se
('/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT')
'dbg_for_python'
If I understand your problem, this might be a solution. It is a stream
editor I devised on the impression that it could handle in a
This is the third problem today which I propose to solve with my stream
editor SE. If the group thinks it could be useful I would submit it the
moment I'm done with the doc, which is in the final stage.
Frederic
>>> se = SE.SE (' ~addr=[0-9.]+~==(10) | addr\== ')
>>> string = """(a)test="192.168.
cptn.spoon wrote:
I'm trying to create an incredibly simple stock market simulator to be
used in a childrens classroom and I'm wondering whether someone can
point me in the right direction.
I basically want to be able to have a stock struct as follows:
StockName = "Test"
StockPriceList = (12,13
Would anyone who knows the inner workings volunteer to clarify whether
or not every additional derivation of a class hierarchy adds an
indirection to the base class's method calls and attribute read-writes.
In C++, I suppose, a three-level inheritance would resolve into
something like *(*(*(*(b
Bruno Desthuilliers wrote:
Chris Rebert a écrit :
On Wed, Mar 18, 2009 at 6:09 AM, Anthra Norell
wrote:
Would anyone who knows the inner workings volunteer to clarify
whether or
not every additional derivation of a class hierarchy adds an
indirection to
the base class's method call
Reckoner wrote:
hi,
I have the following problem: I have two objects, say, A and B, which
are both legitimate stand-alone objects with lives of their own.
A contains B as a property, so I often do
A.B.foo()
the problem is that some functions inside of B actually need A
(remember I said they w
utab wrote:
Dear all,
I have to change some lines from a template file, which is rather long
to paste here, but I would like to make some parts of some lines
optional with my command line arguments but I could not see this
directly, I can count the line numbers and decide on this basis to
decide
utab wrote:
On May 4, 10:06 pm, Anthra Norell wrote:
utab wrote:
Dear all,
I have to change some lines from a template file, which is rather long
to paste here, but I would like to make some parts of some lines
optional with my command line arguments but I could not see this
I can't run Firefox and Thunderbird without getting these upgrade
ordering windows. I don't touch them, because I have reason to suspect
that they are some (Russian) virus that hijacks my traffic. Occasionally
one of these window pops up the very moment I hit a key and next a
confirmation messa
Terry Reedy wrote:
News123 wrote:
Anthra Norell wrote:
I can't run Firefox and Thunderbird without getting these upgrade
ordering windows. I don't touch them, because I have reason to suspect
that they are some (Russian) virus that hijacks my traffic.
Occasionally
one of these w
Daniel Fetchinson wrote:
> I have a plain text file which I would like to protect in a very
> simple minded, yet for my purposes sufficient, way. I'd like to
> encrypt/convert it into a binary file in such a way that possession of
> a password allows anyone to convert it back into the original tex
Robert Kern wrote:
On 2010-01-09 03:52 AM, Anthra Norell wrote:
Daniel Fetchinson wrote:
> I have a plain text file which I would like to protect in a very
> simple minded, yet for my purposes sufficient, way. I'd like to
> encrypt/convert it into a binary file in such a way th
Robert Kern wrote:
On 2010-01-11 14:09 PM, Anthra Norell wrote:
Robert Kern wrote:
On 2010-01-09 03:52 AM, Anthra Norell wrote:
"Don't use a random generator for encryption purposes!" warns the
manual, of which fact I was reminded in no uncertain terms on this
forum
a few y
Robert Kern wrote:
On 2010-01-12 05:59 AM, Anthra Norell wrote:
Robert Kern wrote:
On 2010-01-11 14:09 PM, Anthra Norell wrote:
Robert Kern wrote:
On 2010-01-09 03:52 AM, Anthra Norell wrote:
Upon which another critic
conjured up the horror vision of gigahertzes hacking my pathetic
little
superpollo wrote:
hi.
what is the most pythonic way to substitute substrings?
eg: i want to apply:
foo --> bar
baz --> quux
quuux --> foo
so that:
fooxxxbazyyyquuux --> barxxxquuxyyyfoo
bye
Try the code below the dotted line. It does any number of substitutions
and handles overlaps corre
Anthra Norell wrote:
superpollo wrote:
hi.
what is the most pythonic way to substitute substrings?
eg: i want to apply:
foo --> bar
baz --> quux
quuux --> foo
so that:
fooxxxbazyyyquuux --> barxxxquuxyyyfoo
bye
So it goes. The more it matters, the sillier the misatakes
superpollo wrote:
hi.
what is the most pythonic way to substitute substrings?
eg: i want to apply:
foo --> bar
baz --> quux
quuux --> foo
so that:
fooxxxbazyyyquuux --> barxxxquuxyyyfoo
bye
Third attempt. Clearly something doesn't work right. My code gets
clipped on the way up. I have
Iain King wrote:
On Jan 21, 2:18 pm, Wilbert Berendsen wrote:
Op maandag 18 januari 2010 schreef Adi:
keys = [(len(key), key) for key in mapping.keys()]
keys.sort(reverse=True)
keys = [key for (_, key) in keys]
pattern = "(%s)" % "|".join(keys)
repl = lambda x : mapping[x.grou
Dylan Palmboom wrote:
Does anyone know what python libraries are available to do the following:
1. I would like to take a photograph of an object with a colour. In this
case, it is a sheet of sponge.
2. Feed this image into a function in a python library and let the function
"automatically sca
I have a Python program that needs to copy files around. I could read
and write which would be inefficient and would time-stamp the copy. The
module "os" has lots of operating system functions, but none that copies
files I could make out reading the doc twice. The function "os.system
('copy fil
Diez B. Roggisch wrote:
Anthra Norell wrote:
I have a Python program that needs to copy files around. I could read
and write which would be inefficient and would time-stamp the copy. The
module "os" has lots of operating system functions, but none that copies
files I could make o
Kushal Kumaran wrote:
On Tue, Oct 27, 2009 at 2:04 AM, Anthra Norell wrote:
No, I didn't. There's a number of modules I know by name only and shutils
was one of them. A quick peek confirmed that it is exactly what I am looking
for. Thank you very much for the advice.
Hi,
I am trying to upload a bunch of web pages to a hosting service. I
have a connected ftplib.FTP object and can upload files manually from an
IDLE command line using the methods storlines () for html files and
storbinary () for the pictures. So far no problem. In order to upload
the whole s
Hi,
I made a bunch of web pages and am now trying to upload them to a
hosting service. I have an ftplib.FTP object that connects just fine. It
calls storbinary () and storlines () (as appropriate) inside a loop
iterating through my html and jpg files. Calling either of the stor...
methods fr
Gabriel Genellina wrote:
En Tue, 27 Oct 2009 07:53:36 -0300, Anthra Norell
escribió:
I am trying to upload a bunch of web pages to a hosting service. I
have a connected ftplib.FTP object and can upload files manually from
an IDLE command line using the methods storlines () for html files
1 - 100 of 126 matches
Mail list logo