Re: Handling some isolated iso-8859-1 characters

2008-06-04 Thread Max M
-unicode-lessons-from-school-of.html -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Sydebar 1.0 - A browser sidebar generator for Python documentation

2008-06-04 Thread Max M
/ This looks great. I have been missing my chm based docs since moving to Python. This goes a long way. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: New chairman

2008-05-27 Thread Max M
/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Literate programs in Python

2008-05-13 Thread Max M
/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematics in Python are not correct

2008-05-11 Thread Max M
will probably get better responses if you just state that there are things you do not understand, and ask why it works that way. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Python MIDI in 2008

2008-05-06 Thread Max M
it to be a bore to get real time midi working. It would probably be easier now that I am on Linux. Well I just thought I would mention that it is not dead. Merely middle aged. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo

Re: Am I missing something with Python not having interfaces?

2008-05-06 Thread Max M
have interfaces. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Real Time Midi File Playback - Reading and Writing midi at the same time

2008-05-04 Thread Max M
csound can help with this. It has a lot of midi, realtime and python stuff. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: tool to calculate color combination

2008-05-01 Thread Max M
' col = RGB(blue) print col.color print col.bytes() print col brighter = col.change_ls(0.0, 0.0) print 'brighter:',brighter #complementary = col.hls_delta(0.50, 0.0, 0.0) #print complementary -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science

Re: Given a string - execute a function by the same name

2008-04-29 Thread Max M
will be doing is a variation of the factory pattern. So this search might give you some new ideas: http://www.google.dk/search?hl=enq=python+factory+pattern -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Given a string - execute a function by the same name

2008-04-28 Thread Max M
calling a built in method on your object . Which you risk doing with something like: getattr(obj, 'join') -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Little novice program written in Python

2008-04-25 Thread Max M
for the language. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Little novice program written in Python

2008-04-25 Thread Max M
algorithms due to the low level coding. Memory handling, list, dicts etc. qickly becomes more like math algorithms than in Python. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Success stories

2008-04-22 Thread Max M
. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: expanding a variable to a dict

2008-04-09 Thread Max M
John Machin skrev: On Apr 4, 9:44 am, Max M [EMAIL PROTECTED] wrote: Ummm ... excessive apostrophes plus bonus gross syntax error, dood. Did you try running any of these snippets??? No I just wanted to quickly show different ways to do it. The dicts in the original question wasn't dicts

Re: expanding a variable to a dict

2008-04-03 Thread Max M
']: a.setdefault('srcdir') = '/usr/src' -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: speeding things up with C++

2007-06-01 Thread Max M
and had better develop an arsenal of tricks for the rare times when it's just not fast enough. A dash of c combined integrated via ctypes is probably the easiest solution? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python

Re: Xml parser

2007-05-25 Thread Max M
ashish skrev: Hi All, I want to know weather is there any api available in python for parsing xml(XML parser) I have had very good succes with lxml -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic question

2007-05-14 Thread Max M
is a callable. map(float, str.split(',')) -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Cgi File Upload without Form

2007-04-28 Thread Max M
than necessary. The client program I have to use does not support FTP. Try out urllib2 -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing HTML/XML documents

2007-04-26 Thread Max M
expressions. That is pretty good in my book. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Email attachments

2007-01-24 Thread Max M
not be sent' REQUEST.RESPONSE.redirect(self.absolute_url() + '/mxmImapClient_compose?portal_status_message=%s' % message) -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to push data into Ical from Python ?

2006-12-18 Thread Max M
-- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Ensure a variable is divisible by 4

2006-12-05 Thread Max M
Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Email headers and non-ASCII characters

2006-11-24 Thread Max M
Christoph Haas skrev: On Thursday 23 November 2006 16:31, Max M wrote: Christoph Haas skrev: Hello, everyone... I'm trying to send an email to people with non-ASCII characters in their names. A recpient's address may look like: Jörg Nørgens [EMAIL PROTECTED] My example code

Re: Email headers and non-ASCII characters

2006-11-23 Thread Max M
] Of course my mail transfer agent is not happy with the first string Why offcourse? But it seems that you are passing the Header object a utf-8 encoded string, not a latin-1 encoded. You are telling the header the encoding. Not asking it to encode. -- hilsen/regards Max M, Denmark http

Re: OT: Sarcasm and irony

2006-10-10 Thread Max M
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

Re: OT: Sarcasm and irony

2006-10-10 Thread Max M
the difference for someone not used to irony. I believe the reason that irony works here is that we have such a homogenous society. Somewhere like the US where the cultural differences are larger, it is probably a lot harder for irony to be taken as such and not as sarcasm. -- hilsen/regards Max

Re: Memory Management in python 2.5

2006-10-09 Thread Max M
. 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/regards Max M, Denmark http://www.mxm.dk

Re: Making posts to an ASP.NET webform.

2006-10-02 Thread Max M
Bernard skrev: Has anyone tried what I'm doing? and if you tried how have you succeeded getting the data back after the post action? Most likely you get assigned a cookie that you then need to return. Try the cookielib which automates all this for you. --

Re: builtin regular expressions?

2006-10-01 Thread Max M
community. Or, I suspect, everybody disrespects them in public but secretly use them when they're hacking ;-) When I used to program in Perl I used regex' for lots of stuff. In python I probably use them once every half year. I sinply do not need them. Max M -- http://mail.python.org/mailman

Re: A critique of cgi.escape

2006-09-26 Thread Max M
Lawrence D'Oliveiro skrev: In message [EMAIL PROTECTED], Gabriel G wrote: At Monday 25/9/2006 11:08, Jon Ribbens wrote: What precisely do you think it would break? existing code, and existing tests. I'm sorry, that's not good enough. How, precisely, would it break existing code? Can you

Re: A critique of cgi.escape

2006-09-25 Thread Max M
is happy, and the escape works as expected. Several man years has been saved. Max M -- http://mail.python.org/mailman/listinfo/python-list

Re: A critique of cgi.escape

2006-09-25 Thread Max M
not an experienced enough programmer to suggest changes in the standard lib! Max M -- http://mail.python.org/mailman/listinfo/python-list

Re: A critique of cgi.escape

2006-09-25 Thread Max M
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. I find it amazing that you cannot understand this. I will stop replying in this thread now. Max M -- http://mail.python.org/mailman/listinfo/python-list

Re: does anybody earn a living programming in python?

2006-09-25 Thread Max M
walterbyrd skrev: If so, I doubt there are many. I wonder why that is? Because you are ignorant? -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with email.Generator.Generator

2006-09-12 Thread Max M
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

Re: Problems with email.Generator.Generator

2006-09-12 Thread Max M
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) Where'd you find that? I must have missed it in my digging :-S End

Re: sending emails using python

2006-09-07 Thread Max M
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

Re: The lib email parse problem...

2006-08-29 Thread Max 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.mxm.dk/ IT's Mad Science

Re: Two Classes In Two Files

2006-08-09 Thread Max M
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

Re: A game idea.

2006-06-27 Thread Max M
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 Mobile: +45 29 93 42 96

Re: Python is fun (useless social thread) ;-)

2006-06-20 Thread Max M
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 end of the last century, with v1.5.2. 1.5.2 was an excellent version

Re: Python is fun (useless social thread) ;-)

2006-06-19 Thread Max M
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

Re: Best Python Editor

2006-05-31 Thread Max M
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 Mobile: +45 29 93 42

Re: Variable name has a typo, but code still works. Why?

2006-05-31 Thread Max M
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, Denmark http://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94 Mobile: +45 29 93 42 96

Re: John Bokma harassment

2006-05-30 Thread Max M
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 Mobile: +45 29 93 42 96 -- http

Re: send an email with picture/rich text format in the body

2006-05-29 Thread Max M
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://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94 Mobile: +45 29 93 42 96 -- http

Re: send an email with picture/rich text format in the body

2006-05-29 Thread Max M
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 it that way. So why bother with the lecture? I

Re: datetime: the date of the day one month ago...how?

2006-04-12 Thread Max M
.mar.2006) or one-month-ago(28.feb.2006) to work? No one can know but you. -- 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

Re: Difference between 'is' and '=='

2006-03-29 Thread Max M
is a possible parameter you can use your own object as a marker:: _marker = [] def somefunc(val=_marker): if val is marker: val = [] do_stuff(val) -- 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

Re: Difference between 'is' and '=='

2006-03-27 Thread Max M
as memory adresses.) -- 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

Re: doctest, unittest, or if __name__='__main__'

2006-03-22 Thread Max M
in practice. Testing and Literate Programming In the process it even manages to make both a lot easier. -- 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

Re: Markov process representation

2006-03-16 Thread Max M
._all_states |= set([key[i] for key in probabilities]) And sets aren't a builtin in 2.3 try: set() except NameError: import sets set = sets.Set nitpick: try: set except NameError: from sets import Set as set -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science

Re: MS word document generator

2006-03-15 Thread Max M
Raja Raman Sundararajan wrote: I was wondering if there was any library as reportlab to generate word documents. If you are on Windows, why dont you use word for it? You can call it from Python. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94

Re: Cheese Shop: some history for the new-comers

2006-03-13 Thread Max M
obvious perhaps? When we start using eggs will it then be renamed to Dairy Shop or perhaps Daisy to make it obscure? Or the Chickens Nest? Please. If it is meant to be used and understood, both Cheeseshop and Pypi are bad names. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad

Re: Hashtables in pyhton ...

2006-03-09 Thread Max M
/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

Re: New python.org website

2006-03-08 Thread Max M
projecktzero wrote: I think the new site is great. I really don't understand all the nit picking that's going on from the armchair web designers. It's a nice site. It is not ugly, and its easy to navigate. *much* better than the old site, -- hilsen/regards Max M, Denmark http

Re: New python.org website

2006-03-08 Thread Max M
Comparing: http://www.python.org/ http://www.perl.org/ http://www.java.org/ http://www.ruby-lang.org/en/ http://java.sun.com/ http://www.php.net/ It is pretty easy to see that http://www.python.org/ is both prettier than the rest, and has a far better structure. -- hilsen/regards Max M

Re: Simple questions on use of objects (probably faq)

2006-03-08 Thread Max M
of the code. class Foo: def __init__(self, x): self.x = x y = [Foo(10.0), Foo(110.0), Foo(60.0)] x_values = [o.x for o in y] y_max = max(x_values) y_min = min(x_values) Otherwise you could try and describe with words what you are getting at. -- hilsen/regards Max M, Denmark http

Re: Simple questions on use of objects (probably faq)

2006-03-08 Thread Max M
Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon2006 - will the content be available for download?

2006-03-08 Thread Max M
/HomePage -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon2006 - will the content be available for download?

2006-03-08 Thread Max M
): http://us.pycon.org/zope/talks/talksRoster?year%3Alist=day%3Alist=track%3Alist=title=authors=abstract=flags%3Alist=audio-yesorder=Sequence Then most presentations with audio has several audio formats you can download. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science

Re: PyCon2006 - will the content be available for download?

2006-03-08 Thread Max M
John Salerno wrote: Max M wrote: abcd wrote: well actually, the site looked promising...only problem is no talks have audio, video or handouts available (at least right now). oh well. You really need to not give up so fast. http://us.pycon.org/talks makes it possible to search

Re: groupwise send mail

2006-02-25 Thread Max M
= The Python Hazmat script failed oMail.send gwApp.quit Methods must allways have a () in Python to be called oMail.send() gwApp.quit() Otherwise you are just adressing the objects eg. this is perfectly ok: send = oMail.send send() or q = gwApp.quit q() -- hilsen/regards Max M

Re: Zope 3?? How do you start it on Windows?

2006-02-21 Thread Max M
instance with Python24\Scripts\mkzopeinstance.bat Start that instance by running INSTANCE_HOME/bin/runzope.bat -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Webmail with Python

2006-02-06 Thread Max M
? This also requires Plone, so it might be a bit heavyweight for your needs: http://www.mxm.dk/products/public/mxmImapClient/ -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

python success story

2006-01-29 Thread Max M. Stalnaker
I urged a friend from Boeing to use python on a personal project. He liked it and repeatedly urged a Boeing developer to use it. Python is on the list of approved languages at Boeing. The developer wrote a thousand line enterprise level program in Python. He reports that it would have take

Re: Microsoft IronPython?

2006-01-06 Thread Max M
. 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

Re: Are there anybody using python as the script engine for ASP?

2006-01-05 Thread Max M
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

Re: MidiToText : EventDispatcher instance has no attribute 'sysex_events'

2006-01-01 Thread Max M
( 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

Re: Python Midi Package: writing events non-chronologically

2005-11-24 Thread Max M
structure is then is complete, you use the midi library to write it to disk. I have attached a simple example here. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science # event classes. Only used internally by notes2midi class NoteOn: def __init__(self, time=0, pitch=64

Re: append to non-existing list

2005-11-09 Thread Max M
()) to be nicer ;-) -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending email in utf-8?

2005-11-08 Thread Max M
=mfrom) success = 1 except: pass -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-23 Thread Max M
time. In my experience the LOC count is *far* less significant than the levels of indirections. Eg. how many levels of abstraction do I have to understand to follow a traceback, or to understand what a method relly does in a complex system. -- hilsen/regards Max M, Denmark http://www.mxm.dk

Re: How to do *args, **kwargs properly

2005-10-11 Thread Max M
in FN_LEGAL_ARGS: raise TypeError, '%s' is an invalid keyword argument for this function % key -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: How to do *args, **kwargs properly

2005-10-11 Thread Max M
Lasse Vågsæther Karlsen wrote: Max M wrote: So what you're saying is that instead of: def fn(*values, **options): I should use: def fn(values, cmp=cmp): in this specific case? and then instead of: fn(1, 2, 3, cmp=...) this: fn([1, 2, 3], cmp=...) Precisely. Sometimes

Re: Python reliability

2005-10-10 Thread Max M
/NEWS.html -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Windows installer, different versions of Python on Windows

2005-10-10 Thread Max M
versions of Zope 3, and since it is installed under a specific python version, the simplest solution would be to install several Python versions, and install a different zope3 version under each python install. Have I misunderstood something here? -- hilsen/regards Max M, Denmark http://www.mxm.dk

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-04 Thread Max M
can run my very first Python program right now in the current version of Python. I cannot even find a platform to run my .asp code from that same timeframe ... So much for 'safe'! -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo

Re: Where to find python c-sources

2005-09-29 Thread Max M
elementary research on Google? Don't know, have you checked Google? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert from unicode to int

2005-09-22 Thread Max M
Tor Erik Sønvisen wrote: Hi Is there any simpler way to convert a unicode numeric to an int than: int(u'1024'.encode('ascii')) why doesn't: int(u'104') work for you? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman

Re: IDE, widget library

2005-09-16 Thread Max M
! -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionary to file

2005-09-16 Thread Max M
-pickle.html -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: brain cramp: emulating cgi.FieldStorage

2005-09-15 Thread Max M
not included. strict_parsing: flag indicating what to do with parsing errors. If false (the default), errors are silently ignored. If true, errors raise a ValueError exception. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's

Re: ANN: PyDev 0.9.8 released

2005-08-30 Thread Max M
wondered what experiences other users might have when using it for production. Being that my text editing environment is my bread and butter. Is it stable/effective etc? Anybody cares to share? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman

Re: Unix diff command under Window.

2005-08-25 Thread Max M
TonyHa wrote: Hello, Does any one have using Python to write a Unix diff command for Window? I generally just us the diff built into tortoiseSVN. That way it's only a rightclick away. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org

Re: mail sending using telnet in python

2005-07-08 Thread Max M
for it. Why not just use the smtp module? It's a tad easier. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: What are the other options against Zope?

2005-07-04 Thread Max M
parameters. But you can also use other protocols than http like dav, ftp etc. This is a very effective way to build web applications, and does not need sql-object remapping as normal web apps does. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org

Re: f*cking re module

2005-07-04 Thread Max M
out re interactively you could use: Python\Tools\Scripts\redemo.py -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-07-01 Thread Max M
certainly. Even though it can crash Python. People using ctypes would be aware of this. Another good bet is BeautifulSoup, which is absolutely great for scraping content from webpages. http://crummy.com/software/BeautifulSoup/index.html -- hilsen/regards Max M, Denmark http://www.mxm.dk

Re: Boss wants me to program

2005-06-28 Thread Max M
or dangerous. I agree. The language is more important than the gui. It is not very hard to make good applikations in eg. Tkinter, and you will understand evey part of it. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python

Re: how to export data from ZODB to text files

2005-06-08 Thread Max M
need to write an external method in Zope to export the data you want. Its pretty easy that way. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: \r\n or \n notepad editor end line ???

2005-06-08 Thread Max M
to to end the line. What's wrong with it? Python tries to be clever. Open it in binary mode to avoid it: FName = open(d:\myfile.txt,'rb') -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: The need to put self in every method

2005-06-01 Thread Max M
it obvious: def __add__(self, b): a = self return Vector((a.x+b.x), (a.y+b.y), (a.z+b.z)) -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: The need to put self in every method

2005-06-01 Thread Max M
Aahz wrote: [posted e-mailed] Any objection to swiping this for the FAQ? (Probably with some minor edits.) I think it is missing the most important reason, that functions can act as unbound methods. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http

Re: Markov chain with extras?

2005-05-19 Thread Max M
[EMAIL PROTECTED] wrote: I want to use it for music. So given list 1 (melody), list 2 (chords) could be generated by a Markov chain. Also, given the chords the melody could be generated again by a chain. I have this small module, that can be used for markov chains. -- hilsen/regards Max M

Re: Merging overlapping spans/ranges

2005-05-11 Thread Max M
to size of search window and number of events. Bengts/Jims and Jordans solutions seems to be relatively similar. I will use one of those instead of my own code. Thanks! -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Unique Elements in a List

2005-05-10 Thread Max M
Fredrik Lundh wrote: depending on the data, it might be more efficient to store the last seen index in a dictionary, and sort the result on the way out (if necessary). something like form sets import Set data = list(Set([0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9])) -- hilsen/regards Max M

Re: Unique Elements in a List

2005-05-10 Thread Max M
Fredrik Lundh wrote: Max M wrote: depending on the data, it might be more efficient to store the last seen index in a dictionary, and sort the result on the way out (if necessary). something like form sets import Set data = list(Set([0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9])) read the OP's

  1   2   >