Gregory Ewing wrote:
On 07/05/2010 11:07 AM, Anthra Norell wrote:
I try to use new.new.classobj (name, baseclass, dict) and have no
clue
what the dict of the current name space is.
Are you sure that's what you really want to know? The
'dict' argument to classobj() defines the attributes
I try to use new.new.classobj (name, baseclass, dict) and have no clue
what the dict of the current name space is. I can name dicts of
imported modules, because their name exists in the current name space.
If, for instance, I import a module service then that module's name
space would be
Thomas Jollans wrote:
On 07/05/2010 11:07 AM, Anthra Norell wrote:
I try to use new.new.classobj (name, baseclass, dict) and have no clue
what the dict of the current name space is. I can name dicts of
imported modules, because their name exists in the current name space.
If, for instance
Chris Rebert wrote:
On Mon, Jul 5, 2010 at 2:07 AM, Anthra Norell anthra.nor...@bluewin.ch wrote:
I try to use new.new.classobj (name, baseclass, dict) and have no clue
Slight tangent:
Note that both the `new` module and old-style classes (which are what
`classobj` produces
Back9 wrote:
Hi,
I have a string like this:
0x340x5A0x9B0xBA
I want to extract 0x from the string but the first one.
How I can use re for this case?
The string size will vary.
TIA
Unless the use of a regular expression is a requirement I'd do it like this:
'0x%s' % s.split ('x',
Hi all,
Can anyone explain this? Three commands with three different cutoff
dates (12/30, 12/31 and 1/1) produce a formatting inconsistency. Examine
the third field. The first and last run represents it correctly. The
second run strips it. The field happens to be a record ID and getting it
Anthra Norell wrote:
Sebastian Bassi wrote:
Hi,
Could you post a minimal version of the DB (a DB dump) to test it?
Just remove most information and leave on the ones needed to reproduce
the error. Also remove any personal/confidential information. Then
dump the DB so I can test it here.
Best
Hi all,
I have spent the better part of this day reading docs and googling
archives to no avail. About this: I understand that I can access
password protected sites with urllib2. However, the protocol seems to
be: I try without password and catch the error coming back. The header
will then
Tobiah wrote:
Now that I use python, this is the amount of time
per day that I spend adding forgotten semicolons while
debugging other languages.
What compels you to write Python code without semicolons?
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Schif Schaf wrote:
On Feb 7, 8:57 am, Tim Chase python.l...@tim.thechases.com wrote:
Steve Holden wrote:
Really? Under what circumstances does a simple one-for-one character
replacement operation fail?
Failure is only defined in the clarified context of what the OP
wants :)
Gabriel,
Thanks for your hints. I take them up one by one:
Gabriel Genellina wrote:
En Fri, 05 Feb 2010 10:23:57 -0300, Anthra Norell
anthra.nor...@bluewin.ch escribió:
I upgraded from 2.4 to 2.5 and am unable to start an 2.5 idle
window. The OS is Windows ME. The download of 2.5
Gabriel,
After reinstalling the whole package things are shaping up. It still
doesn't work but it fails more to the point of your suggestions. I
update the responses to your questions:
Anthra Norell wrote:
Gabriel,
Thanks for your hints. I take them up one by one:
Gabriel Genellina
Hi,
I upgraded from 2.4 to 2.5 and am unable to start an 2.5 idle window.
This is the command I have been using:
C:\Python24\pythonw.exe C:\Python24\Lib\IDLELIB\idle.pyw -n -c
execfile('C:\\Python24\\i')
And this is the command that doesn't start anything:
C:\Python25\pythonw.exe
Thank you both (Alf and Duncan) for your comments. I answer Duncan's
questions interleaved:
Duncan Booth wrote:
Anthra Norell anthra.nor...@bluewin.ch wrote:
Hi,
I upgraded from 2.4 to 2.5 and am unable to start an 2.5 idle
window.
This is the command I have been using:
C
Duncan Booth wrote:
Anthra Norell anthra.nor...@bluewin.ch wrote:
Using pythonw.exe will start the program with all error output dumped in
the bit bucket. Running from a command prompt with python.exe will at
least let you see if there are any errors.
python.exe from the command
Iain King wrote:
On Jan 21, 2:18 pm, Wilbert Berendsen wbs...@xs4all.nl 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 :
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
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. The method
__init__
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 to
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 years ago when I
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
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 that
possession
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 text
Thomas Lotze wrote:
Chris Rebert wrote:
Have you considered using an XML-specific diff tool such as:
I'm afraid I'll have to fall back to using such a thing if I don't find a
solution to what I actually want to do.
I do realize that XML isn't primarily about its textual
Gabriel Genellina wrote:
En Thu, 29 Oct 2009 13:18:30 -0300, Anthra Norell
anthra.nor...@bluewin.ch escribió:
Gabriel Genellina wrote:
En Wed, 28 Oct 2009 08:05:22 -0300, Anthra Norell
anthra.nor...@bluewin.ch escribió:
Gabriel Genellina wrote:
En Tue, 27 Oct 2009 07:53:36 -0300, Anthra
Gabriel Genellina wrote:
En Wed, 28 Oct 2009 08:05:22 -0300, Anthra Norell
anthra.nor...@bluewin.ch escribió:
Gabriel Genellina wrote:
En Tue, 27 Oct 2009 07:53:36 -0300, Anthra Norell
anthra.nor...@bluewin.ch escribió:
I am trying to upload a bunch of web pages to a hosting
service.[...] I
Gabriel Genellina wrote:
En Tue, 27 Oct 2009 07:53:36 -0300, Anthra Norell
anthra.nor...@bluewin.ch 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
Kushal Kumaran wrote:
On Tue, Oct 27, 2009 at 2:04 AM, Anthra Norell anthra.nor...@bluewin.ch wrote:
snip
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
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
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
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
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 out reading
Vlastimil Brom wrote:
2009/8/28 hoffik be...@seznam.cz:
Hello,
I'm quite new in Python and I have one question. I have a 2D matrix of
values stored in list (3 columns, many rows). I wonder if I can select one
column without having to go through the list with 'for' command.
...
I
MRAB wrote:
ryniek90 wrote:
Hi.
I started learning regexp, and some things goes well, but most of
them still not.
I've got problem with some regexp. Better post code here:
import re
mail = '\nn...@mail.com\nname1 [at] mail [dot] com\nname2 [$at$]
mail [$dot$] com\n'
mail
alex23 wrote:
Anthra Norell anthra.nor...@bluewin.ch wrote:
def entries (l):
r = re.compile ('([0-9]+) entr(y|ies)')
match = r.search (l)
if match: return match.group (1)
So the question is: does r get regex-compiled once at py-compile time
or repeatedly at entries
Hi all,
I have a regex that has no use outside of a particular function. From
an encapsulation point of view it should be scoped as restrictively as
possible. Defining it inside the function certainly works, but if
re.compile () is run every time the function is called, it isn't such a
Dennis Lee Bieber wrote:
On Thu, 18 Jun 2009 13:39:28 +0200, Anthra Norell
anthra.nor...@bluewin.ch declaimed the following in
gmane.comp.python.general:
utility. So, my question is: How do I convert a bunch of
three-dimensional coordinates defining lines into a file format Sketch
Up can
norseman wrote:
Anthra Norell wrote:
Andres Acosta wrote:
HI there Anthara have you checked out www.Blender.org, It is open
source and accepts a lot of your formats. for import and export.
Anrdres
Anthra Norell wrote:
Hi,
Anyone working with CAD who knows about numeric data entry? I
have
Andres Acosta wrote:
HI there Anthara have you checked out www.Blender.org, It is open
source and accepts a lot of your formats. for import and export.
Anrdres
Anthra Norell wrote:
Hi,
Anyone working with CAD who knows about numeric data entry? I have
3d coordinates of a construction site
Hi,
Anyone working with CAD who knows about numeric data entry? I have 3d
coordinates of a construction site on a slope (borders, setbacks and
isometric elevation lines). Someone made me aware of Google's Sketch Up.
It looks very attractive for the purpose of architectural planning,
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 window pops
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
utab wrote:
On May 4, 10:06 pm, Anthra Norell anthra.nor...@bluewin.ch 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
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
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
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
Bruno Desthuilliers wrote:
Chris Rebert a écrit :
On Wed, Mar 18, 2009 at 6:09 AM, Anthra Norell
anthra.nor...@bluewin.ch 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
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 =
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
matches
these
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
Beautiful
s = '''span class=sale
$14.99
/span, span class=sale
$27.99
/span, span class=sale
$66.99
/span, span class=sale
$129.99
/span, span class=sale
$254.99
/span'''
for line in [l.strip () for l in s.splitlines ()]:
if line [0] == '$': print line
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.python
To: python-list@python.org
Sent: Monday, September 04, 2006 4:58 AM
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
- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
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's a function
- Original Message -
From: Carl Banks [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
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.
...
Nico, perhaps this would be suitable:
s = '''Example text:
This is a test. link url=/www/folder target=_self title= A test.
source id=boxparameter key=path/www/mydoc1/parameter/source
And I need to extraxt /www/mydoc1 and /www/mydoc2 from this text.
source id=boxparameter
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, y, x)
: [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Wednesday, August 30, 2006 1:51 AM
Subject: Re: newbe question about removing items from one file to another file
Anthra Norell wrote:
Dexter,
I looked at the format specification. It contains an example
about removing items from one file to another file
Anthra Norell wrote:
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
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
want
Thank you all
Frederic
- Original Message -
From: Gerard Flanagan [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Sunday, August 27, 2006 2:59 PM
Subject: Re: unpaking sequences of unknown length
Anthra Norell wrote:
Hi,
I keep working
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 ...
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
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 find out where lower case sneaks in
on yours. The zip file
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. Else
build
running build_py
file SEL.py (for module SEL) not found
file SE.py (for module SE) not found
file SEL.py (for module SEL) not found
file SE.py (for module SE) not found
--
Anthra Norell wrote:
You
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 itautomates
complicated downloads. This is as simple a download as can be. So just forget
about install. Download the zip file,
mentioned the size of the string could be a factor. If so what is the
max size before I see problems?
Thanks again
Anthra Norell wrote:
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
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
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 = '''
divpemquot;Python has been an important part of Google since the
beginning, and remains so as the
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
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 -=execlip here')
edited_path_name = Editor (tricky_path_name)
print edited_path_name# See what it did
\serverName\C$:\exe
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'''
import
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
No one could do it any better. Good for you! - Frederic
- Original Message -
From: John Salerno [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Friday, August 11, 2006 4:08 PM
Subject: Re: using python to edit a word file?
Anthra Norell wrote:
John
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: python-list@python.org
Sent: Wednesday, August 09, 2006 7:48 PM
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
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
Harald,
This works. 's' is your SQL sample.
import SE # From the Cheese Shop with a good manual
Split_Marker = SE.SE (' ;=\split here ~\$_?\$(.|\n)*?\$_?\$~== ')
s_with_split_marks = Split_Marker (s)
s_split = s_with_split_marks.split ('split here')
That's it! And it isn't as
Pak (or Andrei, whichever is your first name),
My proposal below:
- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Sunday, July 30, 2006 8:52 PM
Subject: Re: Html character entity conversion
danielx wrote:
[EMAIL
- Original Message -
From: Claudio Grondi [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Tuesday, August 01, 2006 2:42 PM
Subject: Re: Html character entity conversion
Anthra Norell wrote:
import SE# Available at the Cheese Shop
I mean
- Original Message -
From: [EMAIL PROTECTED]
To: python-list@python.org
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
filename\n and host host\n entries among other
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 [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
- Original Message -
From: Graham Feeley [EMAIL PROTECTED]
Newsgroups
- Original Message -
From: Graham Feeley [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
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
- Original Message -
From: Paul McGuire [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Wednesday, July 26, 2006 1:01 AM
Subject: Re: Parsing Baseball Stats
Anthra Norell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
snip
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
- Original Message -
From: Paul McGuire [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Tuesday, July 25, 2006 7:48 PM
Subject: Re: Parsing Baseball Stats
Anthra Norell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
Below your
Hi, see below ...
- Original Message -
From: Paul McGuire [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
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
- Original Message -
From: Avi Kak [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
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
- Original
Message -From: "Tom Plunket" [EMAIL PROTECTED]Newsgroups: comp.lang.pythonTo: python-list@python.orgSent: 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 the
import SE
Editor = SE.SE ('sleeping=dead sleeping.htm== sleeping==')
Editor ('This parrot a href=sleeping.htm target=newis
sleeping/a. Really, it is sleeping.'
'This parrot a href=sleeping.htm target=newis sleeping/a. Really, it
is dead.'
Or:
Editor ( (name of htm file), (name of output file)
Hi all,
I have
invested probably 500 hours in the development of a module which I think could
fill a gap, judging bysome problems regularly discussed on this
forum.The module is finishedand I want to contribute it. A kind
sould recently suggested I upload it to theCheese Shop. Ihave made
- Original Message -
From: Ben Finney [EMAIL PROTECTED]
To: python-list@python.org
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.
Anthra Norell [EMAIL
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 Idevelop 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
--
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
se = SE.SE ('EAT ~/[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 ('EAT ~addr=[0-9.]+~==(10) | addr\== ')
string =
- Original Message -
From: Konstantin Veretennicov [EMAIL PROTECTED]
To: Anthra Norell [EMAIL PROTECTED]
Cc: Python SIG python-list@python.org
Sent: Wednesday, June 15, 2005 11:28 AM
Subject: Re: Single test for a class and all its subclasses?
On 6/15/05, Anthra Norell [EMAIL PROTECTED
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_contains
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 will
1 - 100 of 124 matches
Mail list logo