I can use as a reference? Note
that I don't need to say that Python is better than another language,
only that it fulfills those requirements.
Thank you,
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
g the traveler on the learning curve has to acquire a feel
for by trial and error. In this case the differing behavior should
logically have to do with the structural difference: I bind Labels that
contain Labels. If I click this nested assembly, who gets the event? The
contained widget, the contai
On Tue, 2012-06-19 at 19:19 -0700, rantingrickjohn...@gmail.com wrote:
> On Tuesday, June 19, 2012 10:55:48 AM UTC-5, Frederic Rentsch wrote:
> > If I copy your event descriptors into my program, the button-release
> > callback still fails. It works in your code, not in mine. Here
BLE_BG_COLOR)
AttributeError: 'str' object has no attribute 'config'
# The same thing happens with . The other handlers I haven't done yet.
The same bindings work well in
# a Menu class with the difference that the bindings are on the Labels, not a
containing Frame.
# Dell E6500, Ubuntu 10.04, Python 2.6
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 2012-07-09 at 01:58 -0400, Terry Reedy wrote:
> On 7/8/2012 5:19 PM, Frederic Rentsch wrote:
> > Hi widget wizards,
> >
> > The manual describes the "event" attribute "widget" as "The widget
> > which generated this event. This is a
it
> horizontal OR vertical!) I would strongly recommend you read and adapt
> as much of this style as you possibly can bear. Even if we don't all
> get along, it IS *very* important that we structure our code in a
> similar style.
>
> [1] http://www.python.org/dev/peps/pep-0008/
Rick,
Thanks for your remarks. I spent most of the day working with Terry's
input. And now I am falling asleep. So I shall study your inspirations
tomorrow.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
he Python Style Guide[1] frowns on superfluous white space (be it
> horizontal OR vertical!) I would strongly recommend you read and adapt
> as much of this style as you possibly can bear. Even if we don't all
> get along, it IS *very* important that we structure our code in a
> similar style.
>
> [1] http://www.python.org/dev/peps/pep-0008/
Excellent suggestions.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
to a minimum. If
> there is no bleeding edge performance issue to worry about (and there
> almost *always* never is) why not use enumerate?
>
Aware, yes. In the habit of, no. Thanks for the reminder.
> [1]
> http://www.pythonware.com/library/tkinter/introduction/x147
dgets. Can you explain this design
> decision?
>
Again, the labels serve to align the fields into columns. As to the
bindings, I just now found out, that and can be bound to
the line frame, but the mouse buttons don't act on the frame with the
labels covering it wall to wall. En
On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote:
> Frederic Rentsch wrote:
>
> > I'm sorry I can't post an intelligible piece that does NOT work. I
> > obviously can't post the whole thing.
>
> How about a pastebin then? Or even bitbucket/github
On Sat, 2012-07-14 at 20:10 -0700, rantingrickjohn...@gmail.com wrote:
> On Thursday, July 12, 2012 1:53:54 PM UTC-5, Frederic Rentsch wrote:
>
> > The "hit list" is a table of investment titles (stock, funds, bonds)
> > that displays upon entry of a search patter
PhotoImage, which seems to let my
code off the hook. And I have made sure beyond any doubt that my image
files exist and open with PIL.
I must be doing something wrong and will much appreciate any help.
Frederic
-
Here'
;s the 'program.pyc' for if the source is compiled every time?
I use Python 2.6 on Ubuntu 10.04 LTS.
Thankful for any suggestion
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 2012-03-31 at 06:29 -0400, Terry Reedy wrote:
> On 3/31/2012 3:42 AM, Frederic Rentsch wrote:
> > Hi all,
> >
> > Is is a bad idea to develop Tkinter applications in IDLE? I understand
> > that IDLE is itself a Tkinter application, supposedly in a mainloop a
y and text appears in the root
window. Is there a way to switch a widget's master?
Thanks for comments
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
ctable ()
Fine so far.
:
hit list.color_selected ()# Still fine
or or :
hit list.color_selectable () # Not so fine!
hit list.color_selected ()
(or -2 or -3)
(nothing)
Thanks for any suggestion
Frederic
OS: Ubuntu 10.04 LTS
Python: sys.v
t on the contrary
want to find out which error occurred, I can catch any error by omitting
the name:
except: (handle)
But now I don't have access to the error message 'e'. I'm sure there's a
way and it's probably ridiculously simple.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2011-11-16 at 09:09 -0800, Chris Kaynor wrote:
> On Wed, Nov 16, 2011 at 8:57 AM, Frederic Rentsch
> wrote:
> > Hi all,
> >
> >
> > I'd like to log MySQL errors. If I do:
> >
> >try: (command)
> >except MySQLdb.Operatio
Hi all,
I would like to change the ownership of an object when changing its
state.
However when I call :
obj=state_change
print obj.getOwnerTuple()
I get (['MyPortal', 'portal_workflow', 'TC_Workflow'], 'scripts') with
scripts as owner.
The method changeOwnership do nothing.
Are there any tips t
> f.seek (f.tell ()) # Workaround 2: Setting the cursor (to where
it is!)
>>> f.write ('abcdefg')
(No error)
I found no problem with writing into the file. So it looks like it has
to do with the cursor which a read puts past the end, unless it is past
the end, in which case it goes back to the end. Is there a less kludgy
alternative to "fseek (ftell ())"?
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Tim,
Thanks a lot for your input. I seemed to notice that everything
works fine without setting the cursor as long as it stops before the end
of the file. Is that also a coincidence that may not work?
Frederic
Tim Peters wrote:
> [Frederic Rentsch]
>
>>Working with re
# etc.
''')
>>> print Formatter ('select id, people.* from ids left outer join
people where ...\nSELECT name, job from people INNER JOIN jobs WHERE
...;\n')
select id, people.* from ids
left outer join people
where ...;
SELECT name, job from people
INNER
Frederic Rentsch wrote:
> Matt wrote:
>> I am attempting to reformat a string, inserting newlines before certain
>> phrases. For example, in formatting SQL, I want to start a new line at
>> each JOIN condition. Noting that strings are immutable, I thought it
>> best to s
Tim Peters wrote:
> [Frederic Rentsch]
>
>> Thanks a lot for your input. I seemed to notice that everything
>> works fine without setting the cursor as long as it stops before the end
>> of the file. Is that also a coincidence that may not work?
>>
>
# | |
if running_total >= GOAL: # -- - running
total >= max?
break # +
# |
report_done ()
Nick Craig-Wood wrote:
> Frederic Rentsch <[EMAIL PROTECTED]> wrote:
>
>> It was called a flow chart. Flow charts could be translated directly
>> into machine code written in assembly languages which had labels, tests
>> and jumps as the only flow-contr
t; Are you sure text goes
into the same place as the controls?
if(len(AnsiBuffer) > 0):
wx.TextCtrl.AppendText(self, AnsiBuffer) <<< You say you want to
strip the control sequences
Frederic
*
--
http://mail.python.org/mailman/listinfo/python-list
Paul McGuire wrote:
> "Michael B. Trausch" <"mike$#at^&nospam!%trauschus"> wrote in message
> news:[EMAIL PROTECTED]
>
>> Alright... I am attempting to find a way to parse ANSI text from a
>> telnet application. However, I am experiencing a bit of trouble.
>>
>> What I want to do is have all A
Frederic Rentsch wrote:
> Paul McGuire wrote:
>
>> "Michael B. Trausch" <"mike$#at^&nospam!%trauschus"> wrote in message
>>
Sorry about the line wrap mess in the previous messa
Frederic Rentsch wrote:
> Frederic Rentsch wrote:
>
>> Paul McGuire wrote:
>>
>>
>>> "Michael B. Trausch" <"mike$#at^&nospam!%trauschus"> wrote in message
>>>
>>>
>
> Sorry about the li
Steve Holden wrote:
Frederic Rentsch wrote:
Frederic Rentsch wrote:
Frederic Rentsch wrote:
Paul McGuire wrote:
"Michael B. Trausch" <"mike$#at^&nospam!%trauschus"> wrote in message
Sorry about the line wra
gt; else:
> docout.write(line)
>
> doc.close()
> docout.close()
>
>
DOC files contain housekeeping info which becomes inconsistent if you
change text. Possibly you can exchange stuff of equal length but that
wouldn't serve your purpose. RTF files let you do substitutions and they
save a lot of space too. But I kind of doubt whether RTF files can
contain pictures.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
is that I verified my settings by sending the message to
myself and it looked fine. Then I sent it to the news group and it was
messed up again. I will work some more on my setting.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
gt;
I quickly fish this out of my functions toolbox. There's got to be
faster functions in scipy, though.
Frederic
(Disclaimer: If you build an air liner or a ocean liner with this and
the wings fall off at thirty thousand feet or it turns upside down in
the middle of an ocean, respectively
, which is required for line-by-line
processing and is very useful for development or verification:
>>> print Replacements (replacement_definitions) # Use definitions as
test data
FromLeft=FromLeft
ToLeft=ToLeft
FromRight=FromRight
ToRight=ToRight
Checks out. All substitutions are made.
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
the inner function with a declaration analogous to a
declaration of globals, listing the outer variables which I wish to
remain writable directly.
I guess I could put the outer variables into a list as argument to
the inner function. But while this relieves the inner function of
returning lots of values it burdens the outer function with handling the
list which it wouldn't otherwise need.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
# Assignee remains outer
m, seconds = divmod (s, 60)
h, minutes = divmod (m, 60)
d, hours = divmod (h, 24)
weeks, days = divmod (d, 7) # No return necessary
The call would now be:
increment_time (msec) # No reassignment necessary
Hope this makes sense
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
SE objects, one for stripping tags and one for
decoding the ampersands, you can nest them like this:
>>> test_string = "René est un garçon qui
paraît plus âgé. "
>>> print Tag_Stripper (HTM_Decoder (test_string))
René est un garçon qui paraît plus âgé.
Nesting works with file names too, because file names are returned:
>>> Tag_Stripper (HTM_Decoder ('input_file_name'), 'output_file_name')
'output_file_name'
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Frederic Rentsch wrote:
>
>
>> At some later point I need to increment my units some more and probably
>> will again a number of times. Clearly this has to go into a function.
>>
>
> since Python is an object-based language, clear
; My_Translator = SE.SE (my_translations)
>>> print My_Translator ('ABC DEFGXYZ')
ABC DEFG
XYZ
SE can also strip tags and translate all HTM escapes and generally lets
you do ad hoc translations in seconds. You just write them up, make an
SE object from your text an run your data through it. As simple as that.
If you wish further explanations, I'll be happy to explain.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Rob Williscroft wrote:
> Frederic Rentsch wrote in news:mailman.1428.1162113628.11739.python-
> [EMAIL PROTECTED] in comp.lang.python:
>
>
>>def increment_time (interval_ms):
>> outer weeks, days, hours, minutes, seconds, mseconds #
Rob Williscroft wrote:
> Frederic Rentsch wrote in news:mailman.1536.1162292996.11739.python-
> [EMAIL PROTECTED] in comp.lang.python:
>
>
>> Rob Williscroft wrote:
>>
>>> Frederic Rentsch wrote in news:mailman.1428.1162113628.11739.python-
>>
Rob Williscroft wrote:
> Frederic Rentsch wrote in news:mailman.1556.1162316571.11739.python-
> [EMAIL PROTECTED] in comp.lang.python:
>
>
>> Rob Williscroft wrote:
>>
>>> Frederic Rentsch wrote in news:mailman.1536.1162292996.11739.python-
>
> will not work as Python expects the file extension to be "py".
>
> Thanks,
> Ray
>
> Frederic Rentsch wrote:
>
>> Rares Vernica wrote:
>>
>>> Hi,
>>>
>>> How can I unescape HTML entities like " "
this upload is made, I will be happy to send
SE-2.3 out off list by request.
Infinite thanks
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
...: '''
>
> In [18]: print HTM_Decoder (test_string)
>
> ø=(xf8) # 248 f8
> ù=(xf9) # 249 f9
> ú=(xfa) # 250 fa
> û=(xfb)# 251 fb
> ü=(xfc) # 252 fc
> ý=(xfd) # 253 fd
> þ=(xfe)# 254 fe
> é=(xe9)
> ê=(xea)
> ë=
jim-on-linux wrote:
> Frederic,
>
> I've been trying to get back into my package in
> the Cheese Shop for over a year. The phone
> company changed my e:mail address and to make a
> long and frustrating story short I can't get back
> into the Cheese Shop to make
how_translators = 1)
(snip)
Single-Byte Targets
1: |<|->|LT|
2: |>|->|GT|
Multi-Byte Targets
3: |&&|->|AND|
4: ->|OR|
etc...
The display makes definition errors conspicuous. Missing definitions
indicate malformed or redefined (overwritten) ones.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
sting file, then that file is translated. Admittedly this is not a
very robust mechanism. In practice, though, I have never had a problem
with it, because input data just about never are single words. If names
of existing files are the object of a translation they would be passed
all together and be unambiguously recognized as a string. To translate a
single file name SE is hardly a means of choice, but it could still be
done if the file name is given a leading space.
Now, if a single dot (or multiple dots) come along, os.stat does not
raise an error and that results in a typing error at that point. The
patch above takes care of that.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Gary Herron wrote:
> Frederic Rentsch wrote:
>
>> A few Cheese Shop upload problems have been solved with the help of this
>> creative group. Thank you all!
>>
>> Version 2.2 beta should be phased out. It has a functional defect,
>> missing matches wit
on c.l.python lately, you'd
> noticed that it's the Solution to Everything (up there with pyparsing, I
> think).
>
>
>
>
And here's the proof I am being perceived as a nuisance. I apologize,
keeping to myself that I don't care.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Frederic Rentsch wrote:
>
>
>> And here's the proof I am being perceived as a nuisance. I apologize,
>> keeping to myself that I don't care.
>>
>
> since you're constantly targeting newbies, and are hawking your stu
Is there any alternative way?
>
> Thanks.
> Suresh
>
>
s = '((1,2), (3,4))'
separators = re.compile ('\(\s*\(|\)\s*,\s*\(|\)\s*\)')
tuple ([(float (n[0]), float (n[1])) for n in [pair.split (',') for pair
in separators.split (s) if pair]])
((1.0, 2.0), (3.0, 4.0))
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
t; http://cheeseshop.python.org/pypi/SE/2.3. The
translation definitions file "htm2iso.se" is included. If you open it in your
editor, you can see how to write your own definition files for other
translation tasks you may have some other time.
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
gt;
>
> I hope this gets formatted correctly :-p
>
> Cheers, hope you can help.
>
>
Here's a suggestion:
>>> import SE
>>> Editor = SE.SE ('== img:=[[Image:
.jpg=.jpg]] .gif=.gif]]')
>>> Editor (' img: .jpg .gif')# See if it works
'
#x27;)(test_string)
'a/:=/b/+/c/:/ apple/:=/blue/://+/cart'
Ah! It's two slashes next to each other. No problem. We de-multiply
double slashes in a second pass:
>>> SE.SE (':\==/:\=/ +=/+/ :=/:/ | //=/')(test_string).split ('/')
['a', ':=
I wrote a script on Linux that uses pyserial to read status messages
from a serial line using readlines(). For now, it just displays what
it gets on stdout:
17:42 | 0005 | 02 | | 5 |Rack Abs.| - | --210
17:42 | 0008 | 02 | | 5 |Rack Abs.| - | --210
17:42 | 0001 | 02 | | 5 |Rack Abs
I wrote a script on Linux that uses pyserial to read status messages
from a serial line using readlines(). For now, it just displays what
it gets on stdout:
17:42 | 0005 | 02 | | 5 |Rack Abs.| - | --210
17:42 | 0008 | 02 | | 5 |Rack Abs.| - | --210
17:42 | 0001 | 02 | | 5 |Rack Abs
On 9/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> can configure, make and install
> everything fine. I'm using python 2.4 I have ubuntu dapper drake. I am
> trying to install hplip which requires python. When I do this, this
> also works but while running the following error occurs:
> Tr
On 9/9/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> | I wrote a script on Linux that uses pyserial to read status messages
> | from a serial line using readlines(). For now, it just displays what
> | it gets on stdout:
> | (...)
> | ser = serial.Serial(port=1,
> |
On 9/9/06, Frederic Wenzel <[EMAIL PROTECTED]> wrote:
> On 9/9/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> > | I wrote a script on Linux that uses pyserial to read status messages
> > | from a serial line using readlines(). For now, it just displays w
dn't
want to BE a BEE ever again."
Because SE works by precedence on length, the targets can be defined in any
order and modular theme sets can be spliced freely to form supersets.
>>> SE.SE (' be==, bee==, been==, being==,')(above_sting)
'been,bee,being,be,bee
[EMAIL PROTECTED] wrote:
> Frederic Rentsch wrote:
>
>
>
>>If you need regexes, why not just reverse-sort your expressions? This
>> seems a lot easier and faster than writing another regex compiler.
>> Reverse-sorting places the longer
[EMAIL PROTECTED] wrote:
> Frederic Rentsch wrote:
>
>
>
>>If you need regexes, why not just reverse-sort your expressions? This
>> seems a lot easier and faster than writing another regex compiler.
>> Reverse-sorting places the longer
27;AA',
'MER'))
GE 3:17PM ET 33.15 0.30 0.90%
IBM 3:17PM ET 76.20 0.47 0.61%
AAPL 3:22PM ET 55.66 0.66 1.20%
MSFT 3:22PM ET 23.13 0.37 1.57%
AA 3:17PM ET 31.80 1.61 4.82%
MER 3:17PM ET 70.24 0.82 1.15%
-
If this meets your requirements you'll find SE here:
http://cheeseshop.python.org/pypi/SE/2.2%20beta
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
d could be used as its own transparency mask.
(This could well be an needlessly complicated approach. When
confronting a problem, I tend to weigh the estimated time of hacking
against the estimated time of shopping and reading recipes and often
decide for hacking as the faster alternative.)
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
om it? In what format?
if no:
Question 1.1: What is your input?
Question 1.2: What do you want to extract from it? In what format?
Question 2: Do you need to generate output file names from the data?
(One file per instrument?)
if yes:
Question 2.1: What do you want to make your file name from?
(Instrument number?)
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Frederic Rentsch wrote:
>
>> [EMAIL PROTECTED] wrote:
>>
>>> All I am after realy is to change this
>>>
>>> reline = re.line.split('instr', '/d$')
>>>
>>> into something that grab
[EMAIL PROTECTED] wrote:
> Frederic Rentsch wrote:
>
>> [EMAIL PROTECTED] wrote:
>>
>>> Frederic Rentsch wrote:
>>>
>>>
>>>> [EMAIL PROTECTED] wrote:
>>>>
>>>>
>>>>> All I am af
change the
substitution definition that makes the Translator to suit your needs. In an
IDLE window you can work trial-and-error style five seconds per try. If you
want to do other translations, just add more substitution definitions, as many
as you want. It will do files too. No need to read
lets you write ugly looking
> song code that is almost unreadable at times (would look nice in a
> grid)
>
> http://www.msn.com
> ..
>
>
> Frederic Rentsch wrote:
>
>> [EMAIL PROTECTED] wrote:
>>
>>> Frederic Rentsch wrote:
>>>
>
that they can be
kept simple and that the performance of the entire set can be
incrementally improved by adding another simple expression whenever an
unexpected contingency occurs, as they may occur at any time with
informal systems. One may not win a coding contest this way, but saving
time isn't bad either, or is even better.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Frederic Rentsch wrote:
>
>> [EMAIL PROTECTED] wrote:
>>
>>> These are csound files. Csound recently added python as a scripting
>>> language and is allowing also allowing csound calls from outside of
>>> csound. T
000 9=1001 A=1010 a=1010 B=1011 b=1011 C=1100
c=1100 D=1101 d=1101 E=1110 e=1110 F= f=')
>>> Int_To_Binary ('%x' % 1234567890')
'0100100110010110001011010010'
>>> Int_To_Binary.save ('se_definition_files/int_to_binary.se&
[EMAIL PROTECTED] wrote:
> Frederic Rentsch:
>
>> Good idea, but shorter with ->
>> >>> SE.SE ('se_definition_files/int_to_binary.se') ('%X' % 987654321)
>> '0011101011000110100010110001'
>>
>
> Note that y
> Printabilizer = SE.SE ( '''
(1)=\\1 # All 256 octets can be written as parenthesized ascii
(2)=\\2
"\a=\\a" # (7)=\\a"
"\n=\\n" # or (10)=\\n or (10)=LF or whatever
"\r=\\r" # (13)=CR
"\f=\\f"
"\v=\\v"
# Add whatever other ones you like
#and translate them to anything you like.
''')
>>> print Printabilizer ('abd\aefg\r\nhijk\vlmnop\1\2.')
abd\aefg\r\nhijk\vlmno\1\2.
If you think this may help, you'll find SE here:
http://cheeseshop.python.org/pypi/SE/2.2%20beta
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
repeat the operation, it fails and leaves me utterly mystified and crushed.
Craving to be uncrushed by a superior intelligence.
Frederic
---
A test:
>>> TS1 = TIME_SERIES_7.Time_Series (range (10), 'TS1')
John Machin wrote:
> Frederic Rentsch wrote:
>
>> Hi all,
>>
>>I have a class Time_Series derived from list. It lists days and
>> contains a dictionary of various Lists also derived from list which
>> contain values related to said days. (e.g. Stock quot
riting them up in one single
string from which the translator object is made:
>>> Split_Marker = SE.SE (' ,=| ;=| ", =|" "; =|" ')
>>> for item in Split_Marker (longstring).split ('|'): print item
Agricultural subsidies
Foreign aidAgriculture
Sustainable Agriculture - Support
Organic Agriculture
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xff\xe7\xe8\xe9\xea\xeb'
to_characters =
'AAACDNOOYaaaono
lt to backtrace such obtrusive, if not criminal, traffic to the
source and squash it there. Perhaps some knowledgeable volunteer would
share his insights. Perhaps stalking con artists could be another
interest group.
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
non-destructive dedent.
>
> It's not that I don't understand /why/ it does it; indeed I'm sure it
> does this so you can mix tabs and spaces in Python source. Why anyone
> would intentionally do that
Tom Plunket wrote:
> Frederic Rentsch wrote:
>
>
>>> Well, there is that small problem that there are leading tabs that I
>>> want stripped. I guess I could manually replace all tabs with eight
>>> spaces (as opposed to 'correct' tab stops),
Tom Plunket wrote:
> Frederic Rentsch wrote:
>
>
>> Following a call to dedent () it shouldn't be hard to translate leading
>> groups of so many spaces back to tabs.
>>
>
> Sure, but the point is more that I don't think it's valid
heeseshop.python.org/pypi/SE/2.3
>>> HTM_Escapes = SE.SE (definitions) # See definitions below the
dotted line
>>> print HTM_Escapes (s)
htm tag should not translate
> & should
Tom Plunket wrote:
> Frederic Rentsch wrote:
>
>
>> It this works, good for you. I can't say I understand your objective.
>> (You dedent common leading tabs, except if preceded by common leading
>> spaces (?)).
>>
>
> I dedent common leadi
Tom Plunket wrote:
> Frederic Rentsch wrote:
>
>
>> Your rules seem incomplete.
>>
>
> Not my rules, the stated documentation for dedent. "My" understanding
> of them may not be equivalent to yours, however.
It's not about understanding, I
Greets,
I've some troubles getting my memory freed by python, how can I force
it to release the memory ?
I've tried del and gc.collect() with no success.
Here is a code sample, parsing an XML file under linux python 2.4
(same problem with windows 2.5, tried with the first example) :
#Python interp
On 31 mai, 14:16, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, frederic.pica
> wrote:
>
> > So as I can see, python maintain a memory pool for lists.
> > In my first example, if I reparse the xml file, the memory doesn't
> > grow very much (0.1 Mb precisely)
> > So
On 31 mai, 16:22, Paul Melis <[EMAIL PROTECTED]> wrote:
> Hello,
>
> [EMAIL PROTECTED] wrote:
> > I've some troubles getting my memory freed by python, how can I force
> > it to release the memory ?
> > I've tried del and gc.collect() with no success.
>
> [...]
>
>
>
> > The same problem here with
On 31 mai, 17:29, "Josh Bloom" <[EMAIL PROTECTED]> wrote:
> If the memory usage is that important to you, you could break this out
> into 2 programs, one that starts the jobs when needed, the other that
> does the processing and then quits.
> As long as the python startup time isn't an issue for yo
)
...
This looks expensive. Moreover __init__ () may not be available if it
needs to to something else.
Thanks for suggestions
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
Chris Mellon wrote:
> On 11 Jan 2007 15:01:48 +0100, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
>> On 2007-01-11, Frederic Rentsch <[EMAIL PROTECTED]> wrote:
>>
>>> If I derive a class from another one because I need a few extra
>>> features,
7;'')
If it works, this REPLACE should read REPLACE
and another replace should become another replace
and this >>int<< should become >>int<<
and this >>float<< is a float and so should read >>float<<.
PS 2: It is convenient to keep large and frequently used substitution
sets in text files. The SE constructor accepts a file name instead of
the replacements string:
>>> Stream_Edtor = SE.SE ('path/replacement_definitions_file')
Regards
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
mtuller wrote:
> Alright. I have tried everything I can find, but am not getting
> anywhere. I have a web page that has data like this:
>
>
>
> LETTER
>
> 33,699
>
> 1.0
>
>
>
> What is show is only a small section.
>
> I want to extract the 33,699 (which is dynamic) and set the value to a
>
rgument assigned regardless
of the transformation __init__ () performs on it prior to calling
long.__init__ (). Looks like long.__init__ () isn't called at all. Any
idea anyone what's going on?
Frederic
(P.S. I am not currently a subscriber. I was and had to bail out when I
couldn't h
Gabriel Genellina wrote:
> En Mon, 21 Jan 2008 18:33:10 -0200, Frederic Rentsch
> <[EMAIL PROTECTED]> escribió:
>
>> Hi, here's something that puzzles me:
>>
>> >>> class Fix_Point (long):
>> def __init__ (self, l):
>>
hint
Frederic
--
http://mail.python.org/mailman/listinfo/python-list
>>> t = translator.Translator (nodia.items ())
>>> t (name) # Your example
'Rasca'
Frederic
class Translator:
"""
Will translate any number of targets, handling them correctly if some overlap.
Making
I reload M again and still nothing changes.
The id of the reloaded function 'M.f' is still the
same as it was before the purge and so M.f still isn't
fixed.
I know I have more radical options, such as starting
a new IDLE window. That would save me time, but
I'
1 - 100 of 108 matches
Mail list logo