py2exe is on Sourceforge list of top growth projects

2012-12-17 Thread Frank Millman
This is from Sourceforge's monthly update - Top Growth Projects We're always on the lookout for projects that might be doing interesting things, and a surge in downloads is one of many metrics that we look at to identify them. Here's the projects that had the greatest growth in the last mon

Re: where to view open() function's C implementation source code �

2012-12-17 Thread iMath
在 2012年12月18日星期二UTC+8下午1时35分58秒,Roy Smith写道: > In article , > > iMath wrote: > > > > > where to view open() function's C implementation source code ? > > > > http://www.python.org/download/releases/ > > > > Download the source for the version you're in

Re: where to view open() function's C implementation source code ��

2012-12-17 Thread Roy Smith
In article , iMath wrote: > where to view open() function's C implementation source code ? http://www.python.org/download/releases/ Download the source for the version you're interested in. -- http://mail.python.org/mailman/listinfo/python-list

Re: Delete dict and subdict items of some name

2012-12-17 Thread Gnarlodious
This problem is solved, I am so proud of myself for figuring it out! After reading some of these ideas I discovered the plist is really lists underneath any "Children" key: from plistlib import readPlist def explicate(listDicts): for dict in listDicts: if 'FavIcon' in d

where to view open() function's C implementation source code ?

2012-12-17 Thread iMath
where to view open() function's C implementation source code ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-17 Thread Jason Friedman
> if you're interested in learning Python and/or game programming in > Python, you might want to take a look at http://inventwithpython.com/ And https://www.coursera.org/course/interactivepython. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system and subprocess odd behavior

2012-12-17 Thread photonymous
I hope I understand the question... but shouldn't you wait for the process to complete before exiting? Something like: pid = subprocess.Popen(...) pid.wait() Otherwise, it'll exit before the background process is done. -- http://mail.python.org/mailman/listinfo/python-list

Install python with custom tk-tcl installation

2012-12-17 Thread Derek Thomas
Hello, I seem to have a problem because it seems Tkinter assumes relative paths for TCL_LIBRARY and TK_LIBRARY. I am working with the homebrew group to get python27 to install nicely with a custom installation of tk and tcl (https://github.com/mxcl/homebrew/pull/16626). However, this breaks

Re: Delete dict and subdict items of some name

2012-12-17 Thread Dave Angel
On 12/17/2012 06:08 PM, MRAB wrote: > On 2012-12-17 22:00, Dave Angel wrote: >> On 12/17/2012 04:33 PM, Mitya Sirenef wrote: >>> On 12/17/2012 01:30 PM, Tim Chase wrote: On 12/17/12 11:43, Mitya Sirenef wrote: > On 12/17/2012 12:27 PM, Gnarlodious wrote: >> Hello. What I want to do is

Re: Delete dict and subdict items of some name

2012-12-17 Thread Oscar Benjamin
On 17 December 2012 23:08, MRAB wrote: > On 2012-12-17 22:00, Dave Angel wrote: >> On 12/17/2012 04:33 PM, Mitya Sirenef wrote: >>> On 12/17/2012 01:30 PM, Tim Chase wrote: On 12/17/12 11:43, Mitya Sirenef wrote: > On 12/17/2012 12:27 PM, Gnarlodious wrote: >> >> Hello. What I wan

Re: Delete dict and subdict items of some name

2012-12-17 Thread Mitya Sirenef
On 12/17/2012 05:00 PM, Dave Angel wrote: On 12/17/2012 04:33 PM, Mitya Sirenef wrote: On 12/17/2012 01:30 PM, Tim Chase wrote: On 12/17/12 11:43, Mitya Sirenef wrote: On 12/17/2012 12:27 PM, Gnarlodious wrote: Hello. What I want to do is delete every dictionary key/value of the name 'Favicon

Re: os.system and subprocess odd behavior

2012-12-17 Thread Oscar Benjamin
On 17 December 2012 20:56, py_genetic wrote: > Oscar, seems you may be correct. I need to run this program as a superuser. > However, after some more tests with simple commands... I seem to be working > correctly from any permission level in python Except for the output write > command f

Re: Delete dict and subdict items of some name

2012-12-17 Thread Oscar Benjamin
On 17 December 2012 23:44, Oscar Benjamin wrote: > On 17 December 2012 23:08, MRAB wrote: >> Wouldn't a set of the id of the visited objects work? > > Of course it would. This is just a tree search. > > Here's a depth-first-search function: > > def dfs(root, childfunc, func): > '''depth first

Re: Delete dict and subdict items of some name

2012-12-17 Thread Steven D'Aprano
On Mon, 17 Dec 2012 09:27:48 -0800, Gnarlodious wrote: > Hello. What I want to do is delete every dictionary key/value of the > name 'Favicon' regardless of depth in subdicts, of which there are many. > What is the best way to do it? Firstly, you should assume we know what you are talking about,

Re: Unicode

2012-12-17 Thread Steven D'Aprano
On Mon, 17 Dec 2012 19:36:01 +0100, Anatoli Hristov wrote: >> src.decode() is creating a unicode string. The error is not happening >> there. But when print is used with a unicode string, it has to encode >> the data. And for whatever reason, yours is using latin-1, and you >> have a character

python ldap bind error

2012-12-17 Thread Jorge Alberto Diaz Orozco
hi there. I'm working with python ldap and I need to authenticate my user. this is the code I'm using. import ldap ldap.set_option(ldap.OPT_REFERRALS,0) ldap.protocol_version = 3 conn = ldap.initialize("ldap://ldap.domain.cu";) conn.simple_bind_s("u...@domain.cu","password") every time I do this

Re: Delete dict and subdict items of some name

2012-12-17 Thread MRAB
On 2012-12-17 22:00, Dave Angel wrote: On 12/17/2012 04:33 PM, Mitya Sirenef wrote: On 12/17/2012 01:30 PM, Tim Chase wrote: On 12/17/12 11:43, Mitya Sirenef wrote: On 12/17/2012 12:27 PM, Gnarlodious wrote: Hello. What I want to do is delete every dictionary key/value of the name 'Favicon' r

Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-17 Thread darnold
On Dec 16, 12:38 pm, tbg wrote: > Nice, will have to try it out... if you're interested in learning Python and/or game programming in Python, you might want to take a look at http://inventwithpython.com/ . HTH, Don -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Isn't Multiple Inheritance Automatic in Python?

2012-12-17 Thread Terry Reedy
On 12/17/2012 4:14 AM, Ian Kelly wrote: On Sun, Dec 16, 2012 at 9:30 PM, Nick M. Daly wrote: It's very unlikely that multiple inheritance would go horribly wrong, as long as classes adopt class-specific argument naming conventions. However, ever since bug 1683368 [0] was fixed, it's now impossi

Re: Unicode

2012-12-17 Thread Anatoli Hristov
>> Just realize that once you start using 'ignore' you're going to also >> ignore discrepancies that are real. For example, maybe your terminal is >> actual something other than either latin-1 or utf-8. > > If you need to see such discrepancies, you can do > > print src.decode("utf-8").encode("lati

Re: Unicode

2012-12-17 Thread Anatoli Hristov
> I doubted that 2.7 would make any difference. Yeah this complicated my life even more, all my import functions was gone - took me 2h to fix all :) and it does not solved my issue:) > > 1. What does your "terminal' expect. (For all I know you're using > TeraTermPro as a terminal, which doesn't su

Re: Unicode

2012-12-17 Thread Hans Mulder
On 17/12/12 22:09:04, Dave Angel wrote: > print src.decode("utf-8").encode("latin-1", "ignore") > > That says to decode it using utf-8 (because the html declared a utf-8 > encoding), and encode it back to latin-1 (because your terminal is stuck > there), then print. > > > Just realize that once

Re: Unicode

2012-12-17 Thread Terry Reedy
On 12/17/2012 3:00 PM, Anatoli Hristov wrote: I fixed the print, I changed the setting of the terminal and also on the sshconfig, so now when I print I'm able to print out without problems, but when I tried to run the script I've made it gives me again the same error : ""Unexpected error: excepti

Re: Delete dict and subdict items of some name

2012-12-17 Thread Dave Angel
On 12/17/2012 04:33 PM, Mitya Sirenef wrote: > On 12/17/2012 01:30 PM, Tim Chase wrote: >> On 12/17/12 11:43, Mitya Sirenef wrote: >>> On 12/17/2012 12:27 PM, Gnarlodious wrote: Hello. What I want to do is delete every dictionary key/value of the name 'Favicon' regardless of depth in subd

Re: Delete dict and subdict items of some name

2012-12-17 Thread Chris Angelico
On Tue, Dec 18, 2012 at 8:33 AM, Mitya Sirenef wrote: > On 12/17/2012 01:30 PM, Tim Chase wrote: >> >> On 12/17/12 11:43, Mitya Sirenef wrote: >>> >>> On 12/17/2012 12:27 PM, Gnarlodious wrote: Hello. What I want to do is delete every dictionary key/value of the name 'Favicon' regar

Re: Delete dict and subdict items of some name

2012-12-17 Thread Mitya Sirenef
On 12/17/2012 01:30 PM, Tim Chase wrote: On 12/17/12 11:43, Mitya Sirenef wrote: On 12/17/2012 12:27 PM, Gnarlodious wrote: Hello. What I want to do is delete every dictionary key/value of the name 'Favicon' regardless of depth in subdicts, of which there are many. What is the best way to do it

Re: Iterating over files of a huge directory

2012-12-17 Thread Terry Reedy
On 12/17/2012 10:28 AM, Gilles Lenfant wrote: Hi, I have googled but did not find an efficient solution to my problem. My customer provides a directory with a hge list of files (flat, potentially 10+) and I cannot reasonably use os.listdir(this_path) unless creating a big memory footprin

Re: Iterating over files of a huge directory

2012-12-17 Thread Chris Angelico
On Tue, Dec 18, 2012 at 5:29 AM, MRAB wrote: > > Years ago I had to deal with an in-house application that was written > using a certain database package. The package stored each predefined > query in a separate file in the same directory. > > I found that if I packed all the predefined queries i

Re: Unicode

2012-12-17 Thread Dave Angel
On 12/17/2012 03:00 PM, Anatoli Hristov wrote: >> I fixed the print, I changed the setting of the terminal and also on >> the sshconfig, so now when I print I'm able to print out without >> problems, but when I tried to run the script I've made it gives me >> again the same error : >> ""Unexpected

Re: os.system and subprocess odd behavior

2012-12-17 Thread py_genetic
Oscar, seems you may be correct. I need to run this program as a superuser. However, after some more tests with simple commands... I seem to be working correctly from any permission level in python Except for the output write command from the database to a file. Which runs fine if I past

Re: Iterating over files of a huge directory

2012-12-17 Thread Evan Driscoll
On 12/17/2012 01:50 PM, Oscar Benjamin wrote: > On 17 December 2012 18:40, Evan Driscoll wrote: >> On 12/17/2012 09:52 AM, Oscar Benjamin wrote: >>> https://github.com/benhoyt/betterwalk >> >> This is very useful to know about; thanks. >> >> I actually wrote something very similar on my own (I wan

Re: Unicode

2012-12-17 Thread Anatoli Hristov
> I fixed the print, I changed the setting of the terminal and also on > the sshconfig, so now when I print I'm able to print out without > problems, but when I tried to run the script I've made it gives me > again the same error : > ""Unexpected error: exceptions.UnicodeEncodeError > """ > Maybe I

Re: Re: Iterating over files of a huge directory

2012-12-17 Thread Oscar Benjamin
On 17 December 2012 18:40, Evan Driscoll wrote: > On 12/17/2012 09:52 AM, Oscar Benjamin wrote: >> https://github.com/benhoyt/betterwalk > > This is very useful to know about; thanks. > > I actually wrote something very similar on my own (I wanted to get > information about whether each directory

Quepy is a framework to transform questions in natural language into queries in a database language.

2012-12-17 Thread quepyproject
We are sharing an open source framework that we made here at Machinalis: Quepy https://github.com/machinalis/quepy Quepy is a framework to transform questions in natural language into queries in a database language. It can be easily adapted to different types of questions in natural language, so t

Re: How to exactly set style in tkinter.ttk

2012-12-17 Thread Vlastimil Brom
2012/12/17 Netrick : > So, we have now in python 3 the tile module > http://tktable.sourceforge.net/tile/screenshots/unix.html integrated as > tkinter.ttk. However, in the python and tk docs there is a lot about that > tkk, but only how to set your own style for specific widgets. There is > nothing

Re: Re: Iterating over files of a huge directory

2012-12-17 Thread Evan Driscoll
On 12/17/2012 09:52 AM, Oscar Benjamin wrote: > In the last couple of months there has been a lot of discussion (on > python-list or python-dev - not sure) about creating a library to more > efficiently iterate over the files in a directory. The result so far > is this library on github: > https://

Re: Unicode

2012-12-17 Thread Anatoli Hristov
> src.decode() is creating a unicode string. The error is not happening > there. But when print is used with a unicode string, it has to encode > the data. And for whatever reason, yours is using latin-1, and you have > a character in there which is not in the latin-1 encoding. I fixed the print

Re: Iterating over files of a huge directory

2012-12-17 Thread MRAB
On 2012-12-17 17:27, Paul Rudin wrote: Chris Angelico writes: On Tue, Dec 18, 2012 at 2:28 AM, Gilles Lenfant wrote: Hi, I have googled but did not find an efficient solution to my problem. My customer provides a directory with a hge list of files (flat, potentially 10+) and I canno

Re: Delete dict and subdict items of some name

2012-12-17 Thread Tim Chase
On 12/17/12 11:43, Mitya Sirenef wrote: > On 12/17/2012 12:27 PM, Gnarlodious wrote: >> Hello. What I want to do is delete every dictionary key/value >> of the name 'Favicon' regardless of depth in subdicts, of which >> there are many. What is the best way to do it? > > Something like this should

Re: Unicode

2012-12-17 Thread Dave Angel
On 12/17/2012 12:43 PM, Anatoli Hristov wrote: >> Hi, >> I don't know, what the product ID would look like, for this page, but >> assuming, the catalog pages are also utf-8 encoded as well as the >> error page I get, it should work ok; cf.: > You are right, I get it work on Windows too, but not in

Re: Delete dict and subdict items of some name

2012-12-17 Thread Dave Angel
On 12/17/2012 12:27 PM, Gnarlodious wrote: > Hello. What I want to do is delete every dictionary key/value of the name > 'Favicon' regardless of depth in subdicts, of which there are many. What is > the best way to do it? > > -- Gnarlie I would write a recursive function that accepts a dict. In

Re: Delete dict and subdict items of some name

2012-12-17 Thread Paul Rubin
Gnarlodious writes: > Hello. What I want to do is delete every dictionary key/value of the > name 'Favicon' regardless of depth in subdicts, of which there are > many. What is the best way to do it? Untested: def unfav(x): if type(x) != dict: return x return dict((k,unfav(v)) for k,v in x.it

Re: Delete dict and subdict items of some name

2012-12-17 Thread Mitya Sirenef
On 12/17/2012 12:27 PM, Gnarlodious wrote: Hello. What I want to do is delete every dictionary key/value of the name 'Favicon' regardless of depth in subdicts, of which there are many. What is the best way to do it? -- Gnarlie Something like this should work: def delkey(d, key): if isin

Re: Unicode

2012-12-17 Thread Anatoli Hristov
> Hi, > I don't know, what the product ID would look like, for this page, but > assuming, the catalog pages are also utf-8 encoded as well as the > error page I get, it should work ok; cf.: You are right, I get it work on Windows too, but not in Linux. I changed the codec of linux, but still I don'

Re: Delete dict and subdict items of some name

2012-12-17 Thread Oscar Benjamin
On 17 December 2012 17:27, Gnarlodious wrote: > Hello. What I want to do is delete every dictionary key/value of the name > 'Favicon' regardless of depth in subdicts, of which there are many. What is > the best way to do it? You might need to be a bit clearer about what you mean by subdicts. I

Re: Iterating over files of a huge directory

2012-12-17 Thread Paul Rudin
Chris Angelico writes: > On Tue, Dec 18, 2012 at 2:28 AM, Gilles Lenfant > wrote: >> Hi, >> >> I have googled but did not find an efficient solution to my >> problem. My customer provides a directory with a hge list of >> files (flat, potentially 10+) and I cannot reasonably use >> os.li

Delete dict and subdict items of some name

2012-12-17 Thread Gnarlodious
Hello. What I want to do is delete every dictionary key/value of the name 'Favicon' regardless of depth in subdicts, of which there are many. What is the best way to do it? -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

How to exactly set style in tkinter.ttk

2012-12-17 Thread Netrick
So, we have now in python 3 the tile module http://tktable.sourceforge.net/tile/screenshots/unix.html integrated as tkinter.ttk. However, in the python and tk docs there is a lot about that tkk, but only how to set your own style for specific widgets. There is nothing on how to use that built-i

Re: os.system and subprocess odd behavior

2012-12-17 Thread Oscar Benjamin
On 17 December 2012 16:39, py_genetic wrote: > Thanks for verifying this for me Steven. I'm glad you are seeing it work. > It's really the strangest thing. > > The issue seems to be with the " > outfile.txt" portion of the command. > > The actual command is running a query on a verticalDB and d

Re: os.system and subprocess odd behavior

2012-12-17 Thread py_genetic
Thanks for verifying this for me Steven. I'm glad you are seeing it work. It's really the strangest thing. The issue seems to be with the " > outfile.txt" portion of the command. The actual command is running a query on a verticalDB and dumping the result. The EXACT command run from the comm

Re: os.system and subprocess odd behavior

2012-12-17 Thread py_genetic
Thanks! I am using .txt extensions. Sorry for being a little vague. -- http://mail.python.org/mailman/listinfo/python-list

Re: Supporting list()

2012-12-17 Thread Dave Angel
On 12/17/2012 06:27 PM, Ethan Furman wrote: > Dave Angel wrote: >> On 12/17/2012 09:33 AM, Skip Montanaro wrote: >>> What method(s) does a class have to support to properly emulate a >>> container >>> which supports turning it into a list? For example: >>> >>> class Foo: >>> pass >>> >>> f

Re: Iterating over files of a huge directory

2012-12-17 Thread Gilles Lenfant
Le lundi 17 décembre 2012 16:52:19 UTC+1, Oscar Benjamin a écrit : > On 17 December 2012 15:28, Gilles Lenfant <...> wrote: > > > In the last couple of months there has been a lot of discussion (on > > python-list or python-dev - not sure) about creating a library to more > > efficiently iterat

Re: Iterating over files of a huge directory

2012-12-17 Thread marduk
On Mon, Dec 17, 2012, at 10:28 AM, Gilles Lenfant wrote: > Hi, > > I have googled but did not find an efficient solution to my problem. My > customer provides a directory with a hge list of files (flat, > potentially 10+) and I cannot reasonably use os.listdir(this_path) > unless creatin

Re: Supporting list()

2012-12-17 Thread Ethan Furman
Dave Angel wrote: On 12/17/2012 09:33 AM, Skip Montanaro wrote: What method(s) does a class have to support to properly emulate a container which supports turning it into a list? For example: class Foo: pass f = Foo() print list(f) Is it just __iter__() and next()? (I'm still usin

Re: Iterating over files of a huge directory

2012-12-17 Thread Oscar Benjamin
On 17 December 2012 15:28, Gilles Lenfant wrote: > I have googled but did not find an efficient solution to my problem. My > customer provides a directory with a hge list of files (flat, potentially > 10+) and I cannot reasonably use os.listdir(this_path) unless creating a > big memory

Re: Supporting list()

2012-12-17 Thread Skip Montanaro
> If using __getitem__ it needs to work with integers from 0 to len(f)-1, > and raise IndexError for len(f), len(f+1), etc. Ah, thanks. I have a __getitem__ method, but it currently doesn't raise IndexError. (I'm indexing into a ring buffer, and the usage of the class pretty much precludes index

Re: Iterating over files of a huge directory

2012-12-17 Thread Tim Golden
On 17/12/2012 15:41, Chris Angelico wrote: > On Tue, Dec 18, 2012 at 2:28 AM, Gilles Lenfant > wrote: >> Hi, >> >> I have googled but did not find an efficient solution to my >> problem. My customer provides a directory with a hge list of >> files (flat, potentially 10+) and I cannot rea

Re: Iterating over files of a huge directory

2012-12-17 Thread Chris Angelico
On Tue, Dec 18, 2012 at 2:28 AM, Gilles Lenfant wrote: > Hi, > > I have googled but did not find an efficient solution to my problem. My > customer provides a directory with a hge list of files (flat, potentially > 10+) and I cannot reasonably use os.listdir(this_path) unless creating a

Re: Supporting list()

2012-12-17 Thread Ethan Furman
Skip Montanaro wrote: What method(s) does a class have to support to properly emulate a container which supports turning it into a list? For example: class Foo: pass f = Foo() print list(f) Is it just __iter__() and next()? (I'm still using 2.4 and 2.7.) You can either use __ite

Iterating over files of a huge directory

2012-12-17 Thread Gilles Lenfant
Hi, I have googled but did not find an efficient solution to my problem. My customer provides a directory with a hge list of files (flat, potentially 10+) and I cannot reasonably use os.listdir(this_path) unless creating a big memory footprint. So I'm looking for an iterator that yield

Re: Supporting list()

2012-12-17 Thread Dave Angel
On 12/17/2012 09:33 AM, Skip Montanaro wrote: > What method(s) does a class have to support to properly emulate a container > which supports turning it into a list? For example: > > class Foo: > pass > > f = Foo() > print list(f) > > Is it just __iter__() and next()? (I'm still using 2.

Hot Requirement Business Objects Developer

2012-12-17 Thread Job Alert
Hot Requirement Business Objects Developer Apply here http://www.hot-skills.com/display-job/57491/Business-Objects-Developer.html -- http://mail.python.org/mailman/listinfo/python-list

Hot Requirement Business Objects Developer

2012-12-17 Thread Job Alert
Hot Requirement Business Objects Developer Apply here http://www.hot-skills.com/display-job/57491/Business-Objects-Developer.html -- http://mail.python.org/mailman/listinfo/python-list

Supporting list()

2012-12-17 Thread Skip Montanaro
What method(s) does a class have to support to properly emulate a container which supports turning it into a list? For example: class Foo: pass f = Foo() print list(f) Is it just __iter__() and next()? (I'm still using 2.4 and 2.7.) Thx, Skip -- http://mail.python.org/mailman/l

Re: python-daemon

2012-12-17 Thread Steven D'Aprano
On Sun, 16 Dec 2012 08:59:46 -0800, rurpy wrote: > Or you could repost from other than GG if you don't mind being a tool of > someone else's political agenda. We're all tools of someone's political agenda. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode

2012-12-17 Thread Vlastimil Brom
2012/12/17 Anatoli Hristov : >> if you only see encoding problems on printing results to your >> terminal, its settings or unicode capability might be the cause, >> however, if you also get badly encoding items in the database, you are >> likely using an inappropriate encoding in some step. > > I g

Re: Unicode

2012-12-17 Thread Anatoli Hristov
> if you only see encoding problems on printing results to your > terminal, its settings or unicode capability might be the cause, > however, if you also get badly encoding items in the database, you are > likely using an inappropriate encoding in some step. I get badly encoding into my DB > you

Re: Unicode

2012-12-17 Thread Anatoli Hristov
> What's your terminal's encoding? That looks like you have a CP-1252 > terminal trying to output UTF-8 text. Thanks for your answer, I tried in my terminal and it gives this as an output: LANG=en_US LC_CTYPE="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE="en_US" LC_MONETARY="en_US" LC_MES

Re: Unicode

2012-12-17 Thread Benjamin Kaplan
On Mon, Dec 17, 2012 at 12:59 AM, Anatoli Hristov wrote: >> What happens when you do use UTF-8? > This is the result when I encode the string: > " étroits, en utilisant un portable extrêmement puissant—le plus > petit et le plus léger des HP EliteBook pleine puissance—avec un > écran de di

Re: Why Isn't Multiple Inheritance Automatic in Python?

2012-12-17 Thread Ian Kelly
On Sun, Dec 16, 2012 at 9:30 PM, Nick M. Daly wrote: > It's very unlikely that multiple inheritance would go horribly wrong, as > long as classes adopt class-specific argument naming conventions. > However, ever since bug 1683368 [0] was fixed, it's now impossible to > cleanly create arbitrary inh

Re: modify image and save with exif data

2012-12-17 Thread jwe . van . dijk
On Sunday, 16 December 2012 20:43:12 UTC+1, jwe.va...@gmail.com wrote: > I want to resize an image but retain the exif data > > I now have: > > import Image > > > > img = Image.open('photo.jpg') > > img.thumbnail((800, 800), Image.ANTIALIAS) > > img.save('photo800.jpg', 'JPEG') > > > > T

Re: Unicode

2012-12-17 Thread Anatoli Hristov
> What happens when you do use UTF-8? This is the result when I encode the string: " étroits, en utilisant un portable extrêmement puissant—le plus petit et le plus léger des HP EliteBook pleine puissance—avec un écran de diagonale 31,75 cm (12,5 pouces), idéal pour le professionnel ultra-

Re: Pastebin [was: Trying to make a basic Python score counter in a game... will not count.]

2012-12-17 Thread Chris Angelico
On Mon, Dec 17, 2012 at 5:47 PM, Steven D'Aprano wrote: > On Mon, 17 Dec 2012 07:13:44 +1100, Chris Angelico wrote: >> I don't understand the idea behind the boycott. Are people worried about >> the longevity of linked-to content, in the event that pastebin should, >> as you say, cease to exist to

Re: python-daemon

2012-12-17 Thread rurpy
On Monday, December 17, 2012 12:33:52 AM UTC-7, Chris Angelico wrote: > On Mon, Dec 17, 2012 at 6:25 PM, wrote: > > No, that's not what you were "just" informing people of... > > you were also informing us that we are "twits" for finding > > Google Groups fits our needs better than some other cli