[EMAIL PROTECTED] wrote:
Your app seems to give the right state values only if you select 'Freni
a posto'. But I see you recognize that with your 'FIXME' note.
also the app seems to have too many variables and widgets defined as
self objects. That isn't necessary unless they will be used outside
at this a while ago, which might be a starter.
http://pyrtf.sourceforge.net/
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
your
strings as unicode, do the transfom, and encode it back as latin1.
print repr('før'.decode('latin-1').upper().encode('latin-1')) #
'F\xd8R'
print repr('FØR'.decode('latin-1').encode('latin-1'))
'F\xd8R'
--
hilsen
Peter Hansen wrote:
max(01)* wrote:
this leads me to another question. since *.pyc files are automatically
created the first time an import statement in executed on a given
module, i guess that if i ship a program with modules for use in a
directory where the user has no write privileges then i
also does the right thing - the key pont you were
missing was to use a 'textvariable' argument in defining your label
widgets in the 2nd window.
... and to use eval()
massimo = len(max(self.testo)) + 2
better: massimo = max(map(len, self.testo)) + 2
anyway, here it is. bye!
--
Peter Hansen wrote:
max(01)* wrote:
Peter Hansen wrote:
Not required except for performance reasons. If the .pyc
files don't exist, the .py files are recompiled and the
resulting bytecode is simply held in memory and not cached
and the next startup will recompile all over again.
but the
hi.
is there a way to define a class method which prints the instance name?
e.g.:
>>> class class_1:
... def myName(self):
... what should i do here
...
>>> instance_1 = class_1()
>>> instance_1.myName()
'instance_1'
>>>
bye
macs
--
http://mail.python.org/mailman/listinfo/python-list
Andrew Koenig wrote:
"max(01)*" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
is there a way to define a class method which prints the instance name?
The term "the instance name" is misleading, because it assumes, without
saying so explicitly, that e
Irmen de Jong wrote:
max(01)* wrote:
hi.
is there a way to define a class method which prints the instance name?
e.g.:
class class_1:
... def myName(self):
... what should i do here
...
instance_1 = class_1()
instance_1.myName()
'instance_1'
bye
macs
What should the fo
Peter Hansen wrote:
max(01)* wrote:
Peter Hansen wrote:
No it doesn't. I thought I was clear, but I can reword
it for you: the files are compiled *in-memory* and the
results are never written to disk.
> *if* they are compiled, where are they put, if the
corresponding *.py files are
many many thanks to each and everyone who bothered to answer my op.
best regards
macs
--
http://mail.python.org/mailman/listinfo/python-list
Mike Meyer wrote:
"max(01)*" <[EMAIL PROTECTED]> writes:
Peter Hansen wrote:
max(01)* wrote:
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it
uses names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *i
Unixish system won't let You execute a setuid script with the setuid
privileges. Only real machine code can be executed so.
But of course, there are workarounds. When, say, you have a perl script
with setuid bit set, and sperl (setuid root perl) is installed, the
perl interpreter choses sperl to i
I see that the last 255 bytes are missing.
How is this possible, I receive every last byte from stdin?
I don't think its a Python problem. Those methods are used in a lot of
places. Your file is most likely not what it is supposed to be.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
praba kar wrote:
Dear All,
I am new to Python I want to know how to
change a time into timestamp
Is there any specific reason for not using datetime instead of time ?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Matthew Thorley wrote:
I am creating an object database to store information about network
devices, e.g. switches and routers.
Possible usefull pages?
http://www.python.org/doc/essays/graphs.html
more at:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/119466
--
hilsen/regards Max M
y", line 3, in __init__
self.att_1 = anInstanceOfAClass.att_1
NameError: global name 'anInstanceOfAClass' is not defined
[EMAIL PROTECTED]:/tmp$
any suggestion?
bye max
--
http://mail.python.org/mailman/listinfo/python-list
hi.
i tried to serialize a list of StringVar's, but i got a pickle error.
this got me to thinking that tkinter objects are not picklable (in general).
would somebody confirm and/or give examples?
thanks
macs
--
http://mail.python.org/mailman/listinfo/python-list
f premuto_leggi(self):
ConsultazioneRecord()
class InserimentoRecord(Toplevel):
def __init__(self):
Toplevel.__init__(self)
self.titolo = "Inserimento"
self.wm_title(self.titolo)
quadro_grande = Frame(self)
quadro_grande.pack(expand = YES, fill = BOTH)
self.quad
(self.titolo)
quadro_grande = Frame(self)
quadro_grande.pack(expand = YES, fill = BOTH)
self.quadro_pulsanti = Frame(quadro_grande)
self.quadro_pulsanti.pack(
side = BOTTOM,
fill = X,
padx = "2m",
pady = "2m"
)
quadri_ing
hi.
in a previous thread, mr lundh talks about the possibility to create
"domain specific UI languages" using tkinter.
can he (or anyone else who pleases) explain what they are? give some
examples (simple is better)?
bye
macs
--
http://mail.python.org/mailman/listinfo/python-list
ecode such a
subject, returning a unicode string? The use would be like
human_readable = cool_library.decode_equals(message['Subject'])
parts = email.Header.decode_header(header)
new_header = email.Header.make_header(parts)
human_readable = unicode(new_header)
--
hilse
I have the following code to extract certain links from a webpage:
from bs4 import BeautifulSoup
import urllib2, sys
import re
def tonaton():
site = "http://tonaton.com/en/job-vacancies-in-ghana";
hdr = {'User-Agent' : 'Mozilla/5.0'}
req = urllib2.Request(site, headers=hdr)
jobpas
e
on my site as older pages.
It's my first programming project and don't know how to incorporate this
logic into my code.
Any help/pointers/references will be greatly appreciated.
regards, Max
--
https://mail.python.org/mailman/listinfo/python-list
This is my first programming pet project. I have the following script that
extracts links from specific sites and display them on the web(via django).
The script work fine but I'm unable to save any stuff in my database.
Hence if I run the code, I get the output I want but then it always
extracts
I have asked this question earlier but this should make more sense than the
earlier version and I don't want anyone who could potentially helped to be
put off by the initial mess even if I updated it with my cleaner version as
a reply
I want to save the links scraped to be save in my database so t
Hello all,
For Each SecurityGroup, how can i convert that into a List that in turn
will have a dictionary of the cidr block, protocol type and the port...so
from output below, the SecurityGroup called "default" had 2
rules...allowing TCP port from 80 and 5500 to the source IP and then
SecurityGrou
gt; mentioned (when proto is -1 and port is None-None, or the icmp case). This
> is just a very crude example, but hopefully you get the drift.
>
> Most text parsing problems can easily be solved with these simple tools.
> Fire up your shell and test it - this is really the best way to l
g-e632d982-995635159130', 'proto': '1', 'port': 'None'}
>
>
> You can alter this and add whatever extra checks you need as Chris A
> mentioned (when proto is -1 and port is None-None, or the icmp case). This
> is just a very crude examp
#x27;proto': 'tcp'}
{'cidr': '10.0.2.10/32', 'port': '1024', 'proto': 'tcp'}
{'cidr': '24.12.30.198/32', 'port': '80', 'proto': 'tcp'}
{'cidr': '10.
24', 'proto': 'tcp'}, {'cidr': '24.12.30.198/32',
'port': '80', 'proto': 'tcp'}, {'cidr': '10.0.2.10/32', 'port': '138',
'proto': 'udp'}, {'cidr':
Hello List,
I have posted a question on stack overflow for better readability ... but
is intended for python list Please see question below...
http://stackoverflow.com/questions/31574860/unexpected-output-while-using-listand-nested-dictionary
Any pointers is much appreciated.
--
https://
...
On Thu, Jul 23, 2015 at 12:36 AM, Steven D'Aprano <
[email protected]> wrote:
> On Thursday 23 July 2015 08:09, max scalf wrote:
>
> > Hello List,
> >
> > I have posted a question on stack overflow for better readability ... but
> > i
* Compare-and-set
* Atomicity without having to think in terms of locks
* Atoms! (http://clojure.org/atoms <http://clojure.org/atoms>)
Thanks,
Max--
https://mail.python.org/mailman/listinfo/python-list
reaction is that this is essentially useless that wasn't
necessarily my goal. Nonetheless I really would appreciate any kind of code
review the community might be willing to provide.
The project is available here: https://github.com/maxcountryman/irctk
Thanks for your time!
Max
--
http://ma
oosing between the two styles, or is it largely a matter of
personal preference?
Thanks for reading,
Max.
--
http://mail.python.org/mailman/listinfo/python-list
ack (most recent call last):
File "", line 1, in -toplevel-
j
NameError: name 'j' is not defined
>>> 1 + 2j
(1+2j)
>>> j=4
>>> 1 + 2j
(1+2j)
>>>
I am actually curious, as it doesn't appear to be, but you are usually
'right' when you say such things...
Max
--
http://mail.python.org/mailman/listinfo/python-list
Try changing "def sysex_event(self, data):" in
> ...\midi\EventDispatcher.py to "def sysex_events(self, data):"
Or just do a search and replace on the whole package::
search: sysex_events(
replace: sysex_event(
Apparently I have been inconsistent in my naming.
New version at:
http://www.mxm.dk/products/public/pythonmidi/download
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
eferring to wxFrame, you
would refer to wx.Frame.
See:
http://www.wxpython.org/MigrationGuide.html#the-wx-namespace
for more information about this.
Max
--
http://mail.python.org/mailman/listinfo/python-list
nPython would be worth trying out, though a bit premature.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
lanuage and make an
incompatible version that they could control.
As far as I can see C## has that role for them. So I don't see how
Python should be in any danger.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
%d hours %d minutes %d seconds' % prntime(10)
11 days 13 hours 46 minutes 40 seconds
>>> print '%d days %d hours %d minutes %d seconds' % prntime(418235000)
4 days 20 hours 10 minutes 35 seconds
>>>
max
--
http://mail.python.org/mailman/listinfo/python-list
lt; len(row) - 1:
>output.write('\n%s' %
(i,
> row[i]))
> if i == len(row) - 1:
>output.write('\n colname="col%s">%s\n' % (i, row[i]))
instead of testing for the first and last rows, just write the row
stuff in
The encoding argument to unicode() is used to specify the encoding of the
string that you want to translate into unicode. The interpreter stores
unicode as unicode, it isn't encoded...
>>> unicode('\xbe','cp1252')
u'\xbe'
>>> unicode(&
;]
try:
imd[par].append(v)
except:
imd[par]=[v]
>>> imd
{'Project': ['Geometries', 'Verticals'], 'Geometry': ['Points',
'Layers', 'Water'], 'root': ['Project
#x27;t think of why one might
> use round half even. I googled a bit and didn't really find a good
> answer. Any insight is appreciated.
>
> Louis
>
>
see http://www2.hursley.ibm.com/decimal/damodel.html#refdefcont
decimal.py was written following the specification at
iterature".
>
> regards
> Steve
A rather less cynical interpretation is that they are attempting to make
a children's book accessible to as many children as possible, i.e., the
youngest readers as is practical. I don't mean to disparage the book by
calling it a children's book, I have read and enjoyed several of them,
but the target audience for the books is clearly kids.
max
--
http://mail.python.org/mailman/listinfo/python-list
Sparklines is a script that does exactly what you are asking using python
and PIL:
http://bitworking.org/projects/sparklines/
max
--
http://mail.python.org/mailman/listinfo/python-list
:
http://diveintopython.org/xml_processing/unicode.html#kgp.unicode.4.1
hope this helps,
max
--
http://mail.python.org/mailman/listinfo/python-list
1)
>>> g,h,i
(<__main__.ID instance at 0x00A45FD0>, <__main__.ID instance at
0x00A4B918>, <__main__.ID instance at 0x00A45FD0>)
>>>
max
--
http://mail.python.org/mailman/listinfo/python-list
__name__ == "__main__":
> x = Two()
> x.methodA()
> x.methodB()
>
> When I run the Two.py file, I get the expected output but I'd like to
> eliminate the from line in two.py.
>
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
nvolve arbitrary numbers of function
> calls.
>
> Skip
Is it possible to define a class and create an instance without using
an open parens? I don't know how, but that isn't saying a great
deal...
max
--
http://mail.python.org/mailman/listinfo/python-list
Hello!
It is correct behaviour for python to call __del__ on some
identity of a class object more than once?
In brief I shall describe a situation. Sorry for my english.
For debugin purposes I'm put in my module global counters
for counting __init__ and __del__ calls.
This is a sample code for
Max Yuzhakov writes:
MY> print "difference = %d" % init_cnt-del_cnt
Little correction.
print "difference = %d" % (init_cnt-del_cnt)
--
GMT More Then ...
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth пишет:
DB> Not with the code which you gave as an example, but in the general case
DB> yes, the only guarantee that Python gives about the __del__ method on an
DB> instance is that it will be called zero, one or more than one times
during
DB> the run of the program. In pra
Duncan Booth wrote:
DB> You should post a working code sample which generates your output if you
DB> want a more useful answer.
Hello!
Today I have found a compact variant of a code which shows my question:
---
#!/usr/local
Duncan Booth wrote:
DB> I figured out what is going on in the code to deallocate an old-style
class
DB> instance:
DB>
DB> The reference count is temporarily incremented.
DB>
DB> If the class has a __del__ method then a descriptor is created for the
DB> method and called. When the
Duncan Booth wrote:
DB> BTW, the behaviour is completely different if you use a new style class,
DB> but still somewhat bizarre: for new style classes only the first 25
objects
DB> get freed when you clear a, the remainder are only released by the
garbage
DB> collector.
If to add the
You can also try HarvestMan:
http://harvestman.freezope.org/
Bo Yang wrote:
> Hi ,
> It is about one month passed since I post to this list
> last time . Yes , I use python , I used it in every day normal
> work , whenever I need to do some scripts or other little-scale
> works , python is
could reuse it again later.
From 2.5 onwards it should release most of the unused memory. However
it doesn't use less memory. The peak memory usage should be the same as
before. So for one-off programs that starts up and runs once, there
should not be much gain.
--
hilsen/re
"yes, that's what it means"
Are you an american?
Irony does mean that one says the opposite of what one really means.
If you do it for humor its irony, if you do it for mocking it is sarcasm.
So now I see... americans really *do* understand irony.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
as such
and not as sarcasm.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Karlo Lozovina <[EMAIL PROTECTED]> wrote:
> I'm looking for a Python lib which can read and _write_ ID3v1 and
> ID3v2 tags, and as well read as much as possible data from MP3
> file (size, bitrate, samplerate, etc...).
>
> MP3 reproduction is of no importance...
>
Try mutagen:
http://www.sacre
> Thanks
> Teja.P
>
LabcarController might be a function. See:
http://groups.google.com/group/comp.lang.python/msg/d7341f1aedcae6d3
for more detail.
hope this helps,
max
--
http://mail.python.org/mailman/listinfo/python-list
the
> second number, but it didn't seem to solve my problem. Help!
>
Reread whatever material you have about while loops, or just consult
the python documentation, and then think about why your program(as
posted anyway) is never printing done.
Hope this isn't too much help,
max
--
http://mail.python.org/mailman/listinfo/python-list
"Chris" <[EMAIL PROTECTED]> wrote:
from math import *
sin(0)
> 0.0
sin(pi)
> 1.2246063538223773e-016
sin(2*pi)
> -2.4492127076447545e-016
cos(0)
> 1.0
cos(pi)
> -1.0
cos(2*pi)
> 1.0
>
> The cosine function works fine, but I'm getting weird answers for
> sine. Is
Max Erickson <[EMAIL PROTECTED]> wrote:
>
> Try sin(pi*0.5) to see similar behavior to cos(pi) or cos(pi*2).
>
Uhh, switch that, cos(pi*0.5)...
--
http://mail.python.org/mailman/listinfo/python-list
access to the archives, visit
http://gmane.org.
max
--
http://mail.python.org/mailman/listinfo/python-list
er, if that makes a difference.
>
> Any suggestions would be greatly appreciated!
>
>
> thanks,
>
> Brian Blais
>
You might want to look at gallery:
http://gallery.menalto.com/
It is big and heavy and php, but it has most of what you want
nking more cofee while
> searching for this damn onliner im looking for.
>
> Thanks dudes.
> Gerardo
Is three lines ok?
>>> output=dict()
>>> for record in result:
output.setdefault(record['service_id'], list()).append(record
['value'])
>>> output
{1: [10, 15], 2: [5, 15]}
>>>
Creating the more verbose output that you specified should be
pretty straighforward from there.
max
--
http://mail.python.org/mailman/listinfo/python-list
gt;> >>
>>> >
>>> > And today's question for the novices is: which Python type
>>> > did Skip
>>> miss
>>> > from the above list?
>>>
>>> more that one:
>>>
>>> 0L
>>> decimal.Decimal(0) # is decimal.Decimal('0'), also
>>> u''
>>> array.array('c') # or any other typecode, I suspect, without
>>> initializer
>>
>>
>> Just for fun:
>> buffer('')
>> frozenset()
>> iter(())
>> xrange(0)
>>
> There's still a very obvious omission ...
>
> regards
> Steve
bool.
unicode and long if you are fussy.
max
--
http://mail.python.org/mailman/listinfo/python-list
Johanna Pfalz <[EMAIL PROTECTED]> wrote:
> Is there a module/method in python to convert a file from .DBF
> format to .CSV format?
>
> Johanna Pfalz
>
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715
There is an example provided.
max
--
http://mail.python
"kath" <[EMAIL PROTECTED]> wrote:
> hi, Larry Bates thanks for the reply...
>
>> You might consider doing it the same way wx passes things around.
>> When you instantiate the subclass pass the parent class' instance
>> as first argument to __init__ method.
>
> Yes thats absolutely right..
>
anything
> better in the meantime.
>
> -Greg
Maybe something of use at:
http://online.effbot.org/2005_10_01_archive.htm#20051003
max
--
http://mail.python.org/mailman/listinfo/python-list
t for the one I sent regarding this.
>
just use '/' if that is what you want:
>>> from path import path
>>> d=path('/some/dir')
>>> d / "file"
path(u'/some/dir\\file')
>>>
If + also did that, it would be more difficult to change the extension
when renaming a file or whatever.
max
--
http://mail.python.org/mailman/listinfo/python-list
>>> color='orange'
>>> if color=='red' or 'blue' or 'green':
print "Works?"
Works?
>>>
--
http://mail.python.org/mailman/listinfo/python-list
y read html messages.
In my experience the kind of user that receives emails with html and
pictures often prefer it that way.
So why bother with the lecture? I cannot remember when I have last
received a relevant email that I could not read in text mode.
--
hilsen/regards Max M, Denmark
http://w
Scott David Daniels wrote:
> Max M wrote:
>
>> 90% of users are non-technical users who use standard email readers,
>> that can easily read html messages.
>>
>> In my experience the kind of user that receives emails with html and
>> pictures often prefer i
ke you should be spending time on MySpace OMG!.
I assume that the single l in alright is the courteous misspelling that
should allways be in a posting, when correcting other peoples speling?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mo
"per9000" <[EMAIL PROTECTED]> wrote:
> # w is for writing
> myfile = open('theoutfile',w)
That won't work, the second argument to open needs to be a string:
myfile = open('theoutfile', 'w')
max
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Max Erickson wrote:
>
>>> # w is for writing
>>> myfile = open('theoutfile',w)
>>
>> That won't work, the second argument to open needs to be a string:
>
> w = 'w'
>
>
Manoj Kumar P wrote:
> Hi,
>
> Can anyone tell me a good python editor/IDE?
> It would be great if you can provide the download link also.
pydev on top of eclipse is a nice tool.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
spelled
> in the singular (session).
>
> Is there some type of name resolution of local variables where Python
> makes assumptions?
No. You are probably running your script in an ide that keeps an old
variable hanging around.
Try it from a command promt.
--
hilsen/regards Max M,
plural (sessionS) while later
> being spelled in the singular (session).
>
> Is there some type of name resolution of local variables where
> Python makes assumptions?
>
Is self.logger.items() empty?
This does not raise a NameError even when 'explode' is not defined:
for x in []:
explode
max
--
http://mail.python.org/mailman/listinfo/python-list
"David Isaac" <[EMAIL PROTECTED]> wrote:
> 1. Why is there no argmax built-in?
> (This would return the index of the largest element in a
> sequence.)
>
> 2. Is this a good argmax (as long as I know the iterable is
> finite)? def argmax(iterable): return
I'm no expert, but your post made me curious. It appears that __all__
has the effect of ensuring that
from test import *
picks up test1, but doesn't go any further than that.
from test.test1.test2 import *
should cause test3 to be imported.
max
--
http://mail.python.org/mailma
t;>> b="None"
>>> c=None
>>> ["" for i in [a,b,c] if i in ("None",None)]
['', '']
>>>
max
--
http://mail.python.org/mailman/listinfo/python-list
ifferent in use than
current version.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
bruno at modulix wrote:
> Max M wrote:
>> bruno at modulix wrote:
>>
>>>> Or did you just like what you saw and decided to learn it for fun?
>>>
>>> Well, I haven't be really impressed the first time - note that it was at
>>> the very e
clefb = str(clefb)
> print clefb
> clefc = calculclef(chiffrescabtri)
> cabtri = "zz" + chiffrescabtri + clefc
Your calculclef function returns an integer. You explitly convert
clefb into a string, but you never convert clefc into a string, hence
the TypeError.
max
--
http://mail.python.org/mailman/listinfo/python-list
//codespeak.net/pypy/dist/pypy/doc/getting-started.html
max
--
http://mail.python.org/mailman/listinfo/python-list
ill have to do it yourself.
I am not trying to be negative, but I will bet you that every competent
programmer on the list has 1+ project that she would love to do, if she
just had the time.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
M
叮叮当当 wrote:
> this is not enough.
>
> when a part is mulitpart/alternative, i must find out which sub part i
> need, not all the subparts. so i must know when the alternative is
> ended.
Have you tried the email module at all?
--
hilsen/regards Max M, Denmark
http://www.m
can lead you into so many traps.
Especially if you are using international characters in you messages.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
possible to use a unicode string as a message.
The charset passed in set_payload(pl ,charset) is the charset the the
string *is* encoded in. Not the charset it *should* be encoded in.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
Chris Withers wrote:
> Max M wrote:
>> From the docs:
>>
>> """
>> The payload is either a string in the case of simple message objects
>> or a list of Message objects for MIME container documents (e.g.
>> multipart/* and message/rfc822)
&g
tical and horisontal
> resolutions.
> Any idea how to do that?
> Thank you
>
If you just want to change the dpi flag that some software uses to
interpret the size of the image when rendering it, something like:
im.save('c:/tmp/out.jpg', dpi=(100,100))
might work. You c
pper and use that instead.
my_escape = lambda st: cgi.escape(st, 1)
So. Lawrence is happy, and the escape works as expected. Several man
years has been saved.
Max M
--
http://mail.python.org/mailman/listinfo/python-list
stuff.
If you cannot think of other examples for yourself where your change
would introduce breakage, you are certainly not an experienced enough
programmer to suggest changes in the standard lib!
Max M
--
http://mail.python.org/mailman/listinfo/python-list
content = f.read()
f.close()
return '"%s"' % someword in content:
You might think that it is stupid code that should be changed to take
escaped quotes into account. But that is really not your bussines to
decide if the other behaviour is documented and correct.
201 - 300 of 1012 matches
Mail list logo