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: 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 >>

Re: builtin regular expressions?

2006-10-01 Thread Max M
rrently /underrated/ in the Python 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.

Re: changing a file's permissions

2006-10-02 Thread Max Erickson
ssions > inside of python? > > James > Assuming you want to operate on the output file: import os os.chmod(path, 755) Hope this helps, max -- http://mail.python.org/mailman/listinfo/python-list

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. -- http://mail.python.org/mailman/list

Re: Email headers and non-ASCII characters

2006-11-23 Thread Max M
irst 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://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

Re: Ensure a variable is divisible by 4

2006-12-05 Thread Max M
; >>> x = 111 >>> x = (x /4) * 4 X *= 4 ;-) -- 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
ttp://www.google.dk/search?q=python+icalendar -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Boost Python tutorial needs MSVC?

2006-12-20 Thread Max Wilson
fied Jamfile/Jamrules straight from the Boost subdirectory, and as you can see I'm using the sTOOLS=gcc option. 4. So why is it looking for Visual Studio and how do I stop it? Any ideas much appreciated. -Max Wilson -- http://mail.python.org/mailman/listinfo/python-list

Re: Boost Python tutorial needs MSVC?

2006-12-20 Thread Max Wilson
y case I simply copied bjam.exe to my working directory, for now. -Max Wilson -- http://mail.python.org/mailman/listinfo/python-list

Re: scopes of local and global variable

2006-12-22 Thread Max Wilson
is different than the local t_len--two variables with the same name. You need to declare "global t_len" inside your function so it knows that "t_len=..." is assigning to the old, global variable instead of creating a new one. See #6 here: http://zephyrfalcon.org/labs/python_pitfal

Re: recursive function

2007-01-08 Thread Max Erickson
orehand but this is not the case. I guess > I need a recursive function. Can anyone help? > > Thanks in advance > Francesco > This thread is probably of interest: http://groups.google.com/group/comp.lang.python/browse_frm/thread/f0c0 406fce981a54/59a2a5dcd1507ab9#59a2a5dcd1507ab9 max -- http://mail.python.org/mailman/listinfo/python-list

Re: Webmail with Python

2006-02-06 Thread Max M
iler written > in python? 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

Re: How to I write DBASE files without ODBC

2006-02-06 Thread Max Erickson
Durumdara <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Can anybody known about DBASE handler module for Python ? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 max -- http://mail.python.org/mailman/listinfo/python-list

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

2006-02-21 Thread Max M
py Make a Zope instance with Python24\Scripts\mkzopeinstance.bat Start that instance by running /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: [Python-de] PyUNO with different Python

2006-02-22 Thread Max Muxe
Am Mittwoch, den 22.02.2006, 16:39 +0100 schrieb Katja Süss: > Hi! > maybe somebody can give me an hint to my problem setting up PyUNO on my > Mac to work with my Python not the Python delivered with OpenOffice. > As said in installation instructions I've set >OPENOFFICE_PATH="/usr/lib/openoff

Re: [Python-de] PyUNO with different Python

2006-02-22 Thread Max Muxe
Am Mittwoch, den 22.02.2006, 16:39 +0100 schrieb Katja Süss: > Hi! > maybe somebody can give me an hint to my problem setting up PyUNO on my > Mac to work with my Python not the Python delivered with OpenOffice. > As said in installation instructions I've set >OPENOFFICE_PATH="/usr/lib/openoff

Re: Is Python a Zen language?

2006-02-25 Thread Max Erickson
Given that python code is often described in terms of being 'pythonic' or not, and that pythonic is a term that is apparently well agreed upon yet seemingly impossible to define for someone who does not already understand the word, python is probably a zen language. max

Re: groupwise send mail

2006-02-25 Thread Max M
thon 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, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

Re: Read / Write image file

2005-05-03 Thread Max M
ing something like.. > > x = open("abc.jpg") > y = x.read() > tmp = open("newFile.jpg", "w") > tmp.write(y) > tmp.close() > x.close() > > ...but that doesn't give me a copy of abc.jpg > > any ideas? Thanks > x = open("abc

Re: [Plone] DTML instead of ZPT for PHPParse

2005-05-03 Thread Max M
master"> > > > > HERE IS MY DYNAMIC PHP: > > > > > > I need to use DTML instead of ZPT because PHPParse product cannot work with > ZPT. :( Just an idea, cant you put the PHP into a dtml method that you the

Re: PHPParser pod Zope

2005-05-04 Thread Max M
omething like that. And if somebody knows the language he speaks, then >>a pointer to an appropiate list would be usefull. As far as I know, there is no rule that you have to use english in this forum. But it is a lot easier to get answers if you do. -- hilsen/regards Max M, De

python and glut

2005-05-04 Thread max(01)*
o run it: $ python GLE.py freeglut (GLE.py): OpenGL GLX extension not supported by display ':0.0' what's up? what's missing? i use a standard debian installation. thanks for your attention bye max -- http://mail.python.org/mailman/listinfo/python-list

Adding new methods to new-style classes dynamically

2005-05-05 Thread Max Derkachev
Good day to all. Some time ago I'd been playing with a framework which uses dynamic class creation havily. Say, I could do: class A: pass # I method name is dynamic meth_name = 'foo' #method code can also be dynamic - any executable object will be good enough func = lambda self: self.__clas

Re: Adding new methods to new-style classes dynamically

2005-05-05 Thread Max Derkachev
John Machin wrote: > >>> A.foo > 123 Oh, I've been a little dumb to forget about it :) Thanks. Max. -- http://mail.python.org/mailman/listinfo/python-list

Re: python and glut

2005-05-05 Thread max(01)*
Mike Meyer wrote: > "max(01)*" <[EMAIL PROTECTED]> writes: > > >>$ python GLE.py >>freeglut (GLE.py): OpenGL GLX extension not supported by display ':0.0' >> >>what's up? what's missing? > > > The GLX extension t

Re: python and glut

2005-05-05 Thread max(01)*
t accumbuffer ms cav id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat -- Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". 0x21 16 tc 1 0 0 c . . 0 0 0 0 0 0 0 0 0 0 0 0 0 None now what? bye max -- http://mail.python.org/mailman/listinfo/python-list

Re: python and glut

2005-05-05 Thread max(01)*
d "glx" in my /etc/X11/XF86Config file. now glxgears seems to work... except for the following message: Xlib: extension "XFree86-DRI" missing on display ":0.0". can you give some more help? (sorry again for being offtopic) max -- http://mail.python.org/mailman/listinfo/python-list

Re: python and glut

2005-05-07 Thread max(01)*
Lonnie Princehouse wrote: > DRI not working could also be a permissions issue; check to see if it > works as root. that's it! :-) now, how can i make it work as "joe user"? bye max -- http://mail.python.org/mailman/listinfo/python-list

Re: python and glut

2005-05-07 Thread max(01)*
Lonnie Princehouse wrote: > Welcome to the exciting world of trying to make graphics work on Linux > =) > > DRI is direct rendering. [...] > DRI not working could also be a permissions issue; check to see if it > works as root. that's it! :-) now, how can i make it work a

Re: Trouble saving unicode text to file

2005-05-09 Thread Max M
Fredrik Lundh wrote: > (I just noticed that there's no euro sign on my swedish keyboard. I've > never missed it ;-) It's probably "AltGR + E" like here in DK -- 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])) -- h

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

Re: Regarding Mail sending Module

2005-05-10 Thread Max M
already gone through MimeWriter,smtplib and so > on. But I can't get clear details. so if anyone know > regarding this kindly give me answer You need the 'email' module for reading and writing email messages, and the 'smtplib' module for sending them. -- hilsen

Merging overlapping spans/ranges

2005-05-10 Thread Max M
overlapping spans are changed to one span starts = [] ends = [] for start, end in overlapping: starts.append(start) ends.append(end) min_start = min(starts) max_end = max(ends) non_overlapping.append( (min_start, max

Re: Merging overlapping spans/ranges

2005-05-11 Thread Max M
with regards 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.pyth

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

2D vector graphics Problem

2005-05-29 Thread Karl Max
Hi all, I'm new here. Name's Max from tuscany, and I don't speak english very well :-) I am not veteran at coding, I am most like an "artisan coder" since commodore 64 times. Now the problem: I would like to have a little 2d engine to calculate and trace segme

Re: 2D vector graphics Problem

2005-05-29 Thread Karl Max
uses the new x, not the old x. De hi hi ho. I must sleep some more hours at night... ;-) >Be more free with names. Well, I often report book formulas, and forget renaming variables to more comprehensive language. Thank you for your help. Max -- http://mail.python.org/mailman/listinfo/python-list

Re: The need to put "self" in every method

2005-06-01 Thread Max M
lf to a could have made 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 Ma

Re: how to export data from ZODB to text files

2005-06-08 Thread Max M
nt to export from, you only 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
; > I get h : ['Helo\n', 'World'] > > I thought notepad use \r\n 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: speeding things up with C++

2007-06-01 Thread Max M
oured with python 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:/

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Max Erickson
Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-20, Max Erickson <[EMAIL PROTECTED]> wrote: >> >> If we are being pedantic about describing a curve that shows the >> progress of a person in learning a topic, there is no arguing >> with you, a steep cu

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Max Erickson
and that such a learning curve could exclude people that were unable to take in knowledge at that rate(for whatever reason) from mastering that topic, making it reasonable to describe such a topic as both 'hard' and 'having a steep learning curve'. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing HTML/XML documents

2007-04-26 Thread Max M
at all. Just inefficient xpath 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: Cgi File Upload without Form

2007-04-28 Thread Max M
lieve that would be more difficult 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: Installation of eyeD3 on Windows (newbie)

2007-05-06 Thread Max Erickson
tever. You might also give mutagen a look, I settled on it last time I went looking for an id3 library: http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen (I was not using if for writing though) max -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic question

2007-05-14 Thread Max M
ns: [53.0, 20.0, 4.0, 2.0] The lambda is not needed there, as float 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: 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: Python command line error

2007-05-28 Thread Max Erickson
bberish? Actual garbage characters and the like? Anyway, maybe try running which; this one should be easy to get going: http://gnuwin32.sourceforge.net/packages/which.htm But I have never used it, I use the one in this package: http://unxutils.sourceforge.net/ It expects 'python.exe' or whatever, not just 'python', I would expect the gnuwin32 version to behave similarly. max -- http://mail.python.org/mailman/listinfo/python-list

wxPython version question

2007-08-01 Thread The Max
Hi at all Hi have need of testing the version of wxPython in use at the moment I use wxversion, but I don't can find a method for testing version like this: if versionOfWX() <= 2.8: or if versionOfWX() >= 2.8: ( versioneOfWX is a pseudo-function create for this example ) Someone know

Re: Alternatives for Extracting EXIF and JPEG Data from Images

2007-03-04 Thread Max Erickson
ribute, e.g: >>> im.quantization {0: array('b', [6, 4, 4, 5, 4, 4, 6, 5, 5, 5, 6, 6, 6, 7, 9, 14, 9, 9, 8, 8, 9, 18, 13, 13, 10, 14, 21, 18, 22, 22, 21, 18, 20, 20, 23, 26, 33, 28, max -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL: reading bytes from Image

2007-03-10 Thread Max Erickson
le like object like StringIO.StringIO is an easy path to take. Sparklines shows this in action: http://bitworking.org/projects/sparklines/ max -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL: reading bytes from Image

2007-03-11 Thread Max Erickson
ilt in object 'file') The following: >>> import Image >>> import StringIO >>> im=Image.new('RGB', (100,100)) >>> fp=StringIO.StringIO() >>> im.save(fp, 'jpeg') >>> len(fp.getvalue()) 823 Works for me on python 2.5 on windows. max -- http://mail.python.org/mailman/listinfo/python-list

Re: help!! *extra* tricky web page to extract data from...

2007-03-13 Thread Max Erickson
ginal page for some reason(instead of iframe url directly), you can use urlparse.urljoin to resolve the relative url. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Idiom for running compiled python scripts?

2007-03-20 Thread Max Erickson
s avoiding the need to split the other scripts). There are also the py_compile and compileall modules, which have facilities for generating byte code. More here: http://effbot.org/zone/python-compile.htm under 'Compiling python modules to byte code'. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Join strings - very simple Q.

2007-03-24 Thread Max Erickson
odeError: 'ascii' codec can't encode character u'\xd7' > in position 5: ordinal not in range(128) > Your terminal is likely the problem. Get rid of the print: q=unicode.join(u'\u00d7',['hello','world']) and you will probably get rid of the exception. (so I guess the issue is the display, not the logic) max -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find to HTML strings and 'save' them?

2007-03-26 Thread Max Erickson
, and then I tried this: >>> import BeautifulSoup as BS >>> soup=BS.BeautifulSoup('onetwo') >>> soup.findAll('b') [one, two] >>> soup.findAll({'b':True}) [one, two] >>> So I am a little curious. max -- http://mail.python.org/mailman/listinfo/python-list

Game programming for kids: looking for open source 2D game development kit

2007-03-29 Thread Max Kubierschky
s via drag and drop without programming - Integration into an IDE - Based on Java or Python Pluses: - Good Tutorial - German documentation Any Ideas? Max -- http://mail.python.org/mailman/listinfo/python-list

Re: Game programming for kids: looking for open source 2D game development kit

2007-03-30 Thread Max Kubierschky
Diez B. Roggisch schrieb: > Max Kubierschky schrieb: >> Hello, >> >> I'm planning to give a game programming course for kids of mixed age. >> For this, I am looking for an open source 2D game development kit. >> I am also willing to participate in the

New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Hey gang, I'm new to python coding. I'm trying to find the simplest way to open a text file (on the same server) and display it's content. The text file is plain text (no markup language of any kind). The filename gets found and placed into a variable named [plainfiles.href] I'm using python t

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Hmm.. maybe it'd help if I explained that I'm playing with edna http://edna.sourceforge.net/ I'll play with this simple code: f = open(r'pathToFile) for line in f: # do something with the line of text such as print it. f.close() and this one from Skip: f = open(plainfiles.href, "r")

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
nothing is "lame" to me , all help is appreciated :) .\\ax <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mar 30, 11:39 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> In <[EMAIL PROTECTED]>, kyosohma >> wrote: >> > I'm not familiar with ezt formats, however readin

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Nope. that's not what i mean... Here's a quick run down: edna, is a python mp3 server. (.py) What it does is searches directories for: 1) mp3s 2) jpgs 3) mp3us 4) txt files 5) other folders What I'd like it to do, is upon finding a folder, with a .txt file in it (in my case is probably an albu

Re: Python Web Servers and Page Retrievers

2007-04-08 Thread Max Erickson
ou can. See: http://www.diveintopython.org/http_web_services/user_agent.html (though the behavior was changed for python 2.3 to make setting the user agent work better) max -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Web Servers and Page Retrievers

2007-04-11 Thread Max Erickson
;>> request.add_header('User-Agent','OpenAnything/1.0 +http://diveintopython.org/') >>> data=opener.open(request).read() >>> data 'tesla battery - Google Search< [snip rest of results page] This is with python 2.5 on windows. max -- http://mail.python.org/mailman/listinfo/python-list

Re: setuptools without unexpected downloads

2007-10-03 Thread Max Erickson
here: http://www.develer.com/oss/GccWinBinaries is quite a lot more straightforward. You do have to be okay with using GCC 4.1 though. As a bonus, it supports versions of python that link against several different versions of the Microsoft runtime, rather than just one. max -- http://mail.python.org/mailman/listinfo/python-list

Re: matching a street address with regular expressions

2007-10-11 Thread Max Erickson
ls/Scripts directory of the python installation will be a little quicker to get running. max -- http://mail.python.org/mailman/listinfo/python-list

shelve.open() and error 22: invalid argument

2007-11-01 Thread max . aginaga
valid argument') What is happening? I am running the same Python interpreter on the same file! Why different results? (To make things weirder, this actually fails on the machine in which I created the d.dat file using the shelve module!) Please advise, knowledgeable pythoners! The archives are

Re: Universal Feed Parser - How do I keep attributes?

2007-01-11 Thread Max Erickson
>>u'' > > You have to feed it the *contents* of the page, not its URL. > > The online documentation disagrees with you: http://feedparser.org/docs/introduction.html max -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 and HTTPBasicAuthHandler

2007-01-16 Thread Max Erickson
e the response for other reseans, you can use a default realm, see the bottom of this example: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305288 (The advantage of using a default rather than making sure the realm is correct is that it can change and you won't have to do anything) max -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 and HTTPBasicAuthHandler

2007-01-16 Thread Max Erickson
"m.banaouas" <[EMAIL PROTECTED]> wrote: ... >passman.add_password(None, auth_url, data['user'] , ... The only thing I can come up with is that auth_url can't begin with a protocol, like http:// or whatever. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Email attachments

2007-01-24 Thread Max M
tmp = email.message_from_string(str(attachment.headers)) filename = tmp.get_param('filename', 'Attachment', 'Content-Disposition') # clean up IE paths filename = filenam

Re: Help Required for Choosing Programming Language

2007-02-17 Thread Max Wilson
On Feb 17, 1:35 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > But I've done extensive, cross-platform development with Qt. And can > assert that it is unmatched in productivity and feature richness, > especially when combined with python. And certainly beat VB, and most > probably even delphi

Re: PyCon blogs?

2007-02-28 Thread Max Erickson
http://wamber.net/PyCon-2007/ max -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting Excel time-format (hours since 1.1.1901)

2007-12-07 Thread Max Erickson
English, 2000) version of excel is called 'MOD'. Also, you have misread or miscopied something, or are encountering some very strange issue, as when I put your formula in excel, I get the following output: 11/27/2307 7:00 max -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help removing list elements.

2006-04-29 Thread Max Erickson
the elements you want to keep avoids the problem. Or you can just use a list comprehension(untested): returned_lines=[line for line in open("lines.txt", 'rb') if line != ""] or just returned_lines=[line for line in open("lines.txt"

Re: cross platform libraries

2006-05-05 Thread Max Erickson
http://www.sysinternals.com/Utilities/PsTools.html specifically, psshutdown. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Option parser question - reading options from file as well as command line

2006-05-16 Thread Max Erickson
tents but the individual swithces do not get passed to > option parser. > > Doing a test print of options.qmanager shows it unassigned. > > Any ideas? > Check parser.usage, it is likely to look a lot like your infile. I'm not sure, but I think you need to pass your alt

Re: Option parser question - reading options from file as well as command line

2006-05-16 Thread Max Erickson
e "C:\bin\Python24\lib\optparse.py", line 1322, in _process_args del rargs[0] TypeError: object doesn't support item deletion >>> That's the result of poking an optionParser instance in Idle. parse_args is expecting something that looks like sys.argv[1:], which is a list. You are passing it a string. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Which is More Efficient?

2006-05-19 Thread Max Erickson
ort both clock time and cpu time. Cpu time is a rough analog for cycles, clock time is self explanatory. max -- http://mail.python.org/mailman/listinfo/python-list

Re: altering an object as you iterate over it?

2006-05-19 Thread Max Erickson
Bruno Desthuilliers wrote > > It has been, at a time, recommended to use file() instead of > open(). Don't worry, open() is ok - and I guess almost anyone > uses it. http://mail.python.org/pipermail/python-dev/2005-December/059073.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing object parent properties

2006-05-23 Thread Max Erickson
One way: class Boo: def __init__(self, parent): self.parent=parent class Foo: X=1 def __init__(self): self.test=boo(self) -- http://mail.python.org/mailman/listinfo/python-list

Re: regex/lambda black magic

2006-05-25 Thread Max Erickson
, line 1, in ? int('%', 16) ValueError: invalid literal for int(): % >>> max -- http://mail.python.org/mailman/listinfo/python-list

Re: regex/lambda black magic

2006-05-25 Thread Max Erickson
ason that base64.b16encode should be returning a string that starts with a '%'? All I would expect is: base64.b16decode(base64.b16encode(input))==input other than that I have no idea about the expected behavior. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting images from a PDF file

2007-12-27 Thread Max Erickson
to find corrupt images in the PDF files. If anyone > could help me out, or point me in the right direction, it would > be most appreciated! > > Also, does anyone know of a way to validate a PDF file? > > Thanks in advance, > Doug There is some discussion here: http://nedbatch

Re: a newbie regex question

2008-01-25 Thread Max Erickson
scapes the closing single quote of the raw string literal: >>> re.findall(r'\([A-Z].+[a-z])\', s) SyntaxError: EOL while scanning single-quoted string >>> max -- http://mail.python.org/mailman/listinfo/python-list

best(fastest) way to send and get lists from files

2008-01-31 Thread Abrahams, Max
I've looked into pickle, dump, load, save, readlines(), etc. Which is the best method? Fastest? My lists tend to be around a thousand to a million items. Binary and text files are both okay, text would be preferred in general unless there's a significant speed boost from something binary. tha

tkinter, unicode, arabic letter, mac os problem

2008-02-03 Thread Max Guat
Hi, i found a problem with tkinter and mac os x (10.5): tkinter shows chinese (?) letters instead of arabic letters, what it actually should do. Code, file encoding and database are ok: because 1. no problems with windows xp, 2. every other output (console, text file) is correct as well. T

Formatting arrays using myarrayy.tolist()

2008-02-06 Thread Max Abrahams
I've got an array that looks like this: >>> p.xv[20:25] array([[ 1.60783821e-01, 1.04174046e+01, -1.74045566e-03, 6.02421398e-01, 2.16078382e+00, -1.60783821e-02], [ 1.66704816e-01, 1.04390422e+01, -1.90421758e-03, 5.81767402e-01, 2.16670482e+00, -1.6

Re: Hyphenation module PyHyphen-0.3 released

2008-02-23 Thread Max Erickson
ed doesn't provide the appropriate runtime, you would have to track that down. The MingW/GCC package from the linked page provides a utility to do this, but it is a tossup/up to you if the version of GCC provided is suitable for 'production' use. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Mutagen File Problem

2008-03-12 Thread Max Erickson
.mp3' It looks like the error is happending in MP3(join...), so the os.path.isfile check is never reached. If that is the case, something along the lines of: try: audio=MP3(joined, ID3=EasyID3) except: #catches any error in MP3... print joined should suppress the error and print the filename that triggered it. max -- http://mail.python.org/mailman/listinfo/python-list

Re: A different kind of interface

2009-01-23 Thread Max Erickson
s at http://www.speqmath.com/index.php?id=1. The big differences are that it adds a good deal of functionality (variables, a larger variety of functions, plotting, etc.) and that it treats plain text as an error (unless the text is marked as a comment). max -- http://mail.python.org/mailman/listinfo/python-list

Reading the first MB of a binary file

2009-01-25 Thread Max Leason
Hi, I'm attempting to read the first MB of a binary file and then do a md5 hash on it so that i can find the file later despite it being moved or any file name changes that may have been made to it. These files are large (350-1400MB) video files and i often located on a different computer and I fi

Deepcopying slice objects

2008-12-14 Thread Max Argus
ork can someone please explain it. Max Argus -- http://mail.python.org/mailman/listinfo/python-list

Re: Geometry package

2009-03-29 Thread Max Erickson
tp://partiallydisassembled.net/euclid.html The geometry support is pretty basic. max -- http://mail.python.org/mailman/listinfo/python-list

Re: Delicious API and urllib2

2009-04-07 Thread Max Erickson
stymied me in my attempts to use handlers, rather than injecting the header): http://www.voidspace.org.uk/python/articles/authentication.shtml Max -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >