Re: Basic JSON question: Do I really need the quotes

2012-10-14 Thread moogyd
On Friday, 12 October 2012 16:09:14 UTC+2, (unknown) wrote: > Hi, > > I need to define some configuration in a file that will be manually created. > > Internally, the data will be stored as a dict, which contains various > properties related to a design > > e.g. Design Name, dependencies, list

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread Alain Ketterlin
Steven D'Aprano writes: > On Sun, 14 Oct 2012 19:19:33 +0200, Alain Ketterlin wrote: > >> Usenet has no attachments. > > *snarfle* > > You almost owed me a new monitor. I nearly sprayed my breakfast all over > it. [...] I owe you nothing, and you can do whatever you want with your breakfast.

Re: Aggressive language on python-list

2012-10-14 Thread alex23
On Oct 15, 1:22 pm, ru...@yahoo.com wrote: > Thus when a member of this esteemed group > was recently attacked as racist, for punning another member's > name when responding somewhat heatedly, Again, there is a difference between "attacking" someone "as racist" and *criticising* their *comments* a

Re: Aggressive language on python-list

2012-10-14 Thread rurpy
On 10/14/2012 03:58 PM, Ben Finney wrote:> Zero Piraeus writes: >[...] > What's needed, IMO, is a difficult balance: there needs to be calm, > low-volume, but firm response to instances of hostile behaviour, making > clear by demonstration – especially to the people only observing the > discussio

Re: Can't run any script without it failing due to calling tkinter for no reason

2012-10-14 Thread Adam G
On Sunday, October 14, 2012 7:19:24 PM UTC-7, Benjamin Kaplan wrote: > On Sun, Oct 14, 2012 at 6:47 PM, wrote: > > > Hello All, > > > > > > > > > I'm running python 3.2 on Freebsd 9.0 Release and I must've screwed up my > > environment somehow, because now I can't run any script without it f

Re: Aggressive language on python-list

2012-10-14 Thread Michael Torrie
On 10/13/2012 09:46 AM, Etienne Robillard wrote: > OT. you obviously has no clue what agressive behavior mean. :-) > > So please continue with the passive tone saying nothing relevant > and login to facebook. There's a saying in English. Hit pigeons flutter. I have not been impressed with your

Re: Can't run any script without it failing due to calling tkinter for no reason

2012-10-14 Thread Benjamin Kaplan
On Sun, Oct 14, 2012 at 6:47 PM, wrote: > Hello All, > > > I'm running python 3.2 on Freebsd 9.0 Release and I must've screwed up my > environment somehow, because now I can't run any script without it failing > and throwing: > ** IDLE can't import Tkinter. Your Python may not be configured fo

Re: Aggressive language on python-list

2012-10-14 Thread Zero Piraeus
: On 14 October 2012 17:58, Ben Finney wrote: > What's needed, IMO, is a difficult balance: there needs to be calm, > low-volume, but firm response to instances of hostile behaviour, making > clear by demonstration – especially to the people only observing the > discussion – that such hostility i

Can't run any script without it failing due to calling tkinter for no reason

2012-10-14 Thread pythonusernw
Hello All, I'm running python 3.2 on Freebsd 9.0 Release and I must've screwed up my environment somehow, because now I can't run any script without it failing and throwing: ** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** Yet none of my scripts use tkinter nor call

Re: trouble with nested closures: one of my variables is missing...

2012-10-14 Thread Cameron Simpson
On 14Oct2012 19:27, Ian Kelly wrote: | On Sun, Oct 14, 2012 at 7:08 PM, Cameron Simpson wrote: | > Is attr_name omitted from locals() in made_file_property _because_ I | > have an assignment statement? | | Yes. Syntactically, a variable is treated as local to a function if | it is assigned to s

Re: trouble with nested closures: one of my variables is missing...

2012-10-14 Thread Ian Kelly
On Sun, Oct 14, 2012 at 7:08 PM, Cameron Simpson wrote: > On 14Oct2012 18:32, Ian Kelly wrote: > | 'attr_name' is not in locals because while it's a local variable, it > | has not been assigned to yet. It has no value and an attempt to > | reference it at that point would result in an UnboundLoc

Re: trouble with nested closures: one of my variables is missing...

2012-10-14 Thread Cameron Simpson
On 14Oct2012 18:32, Ian Kelly wrote: | On Sun, Oct 14, 2012 at 3:54 PM, Cameron Simpson wrote: | > | You assign to it, but there's no nonlocal declaration, so Python thinks | > | it's a local var, hence your error. | > | > But 'unset_object' is in locals(). Why one and not the other? | > Obvious

Re: Understanding http proxies

2012-10-14 Thread Cameron Simpson
On 13Oct2012 20:43, Olive wrote: | I am trying to understand how to build an http proxy server in python, | and I have found the following example: | http://www.oki-osk.jp/esc/python/proxy/ | | But I do not have found an exact description of what exactly a proxy | server is suppose to do (all ref

Re: trouble with nested closures: one of my variables is missing...

2012-10-14 Thread Ian Kelly
On Sun, Oct 14, 2012 at 3:54 PM, Cameron Simpson wrote: > | You assign to it, but there's no nonlocal declaration, so Python thinks > | it's a local var, hence your error. > > But 'unset_object' is in locals(). Why one and not the other? > Obviously there's something about closures here I'm missi

Re: Aggressive language on python-list

2012-10-14 Thread alex23
On Oct 14, 3:39 pm, Dwight Hutto wrote: > I'm not a know it all, but when attacked personally I defend myself, > and those can turn into flame wars. I'm not wanting this to turn into another round of flames, but I do want to highlight that there's a big difference between being asked to moderate

Re: Feedback on my python framework I'm building.

2012-10-14 Thread MRAB
On 2012-10-14 23:38, Dave Angel wrote: On 10/14/2012 08:48 AM, Roy Smith wrote: In article <507a3365$0$6574$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: Remember using PEEK and POKE commands with BASIC back in 1978? Pretty much impossible in Python. But, trivial to implement

Re: Feedback on my python framework I'm building.

2012-10-14 Thread Dave Angel
On 10/14/2012 08:48 AM, Roy Smith wrote: > In article <507a3365$0$6574$c3e8da3$54964...@news.astraweb.com>, > Steven D'Aprano wrote: > >> Remember using PEEK and POKE commands with BASIC back in >> 1978? Pretty much impossible in Python. > But, trivial to implement as an extension :-) PEEK and

Re: Aggressive language on python-list

2012-10-14 Thread Ben Finney
Zero Piraeus writes: > I'm a mostly passive subscriber to this list - my posts here over the > years could probably be counted without having to take my socks off - > so perhaps I have no right to comment, but I've noticed a marked > increase in aggressive language here lately, so I'm putting my

Re: trouble with nested closures: one of my variables is missing...

2012-10-14 Thread Cameron Simpson
On 13Oct2012 22:07, Chris Rebert wrote: | On Saturday, October 13, 2012, Cameron Simpson wrote: | > I'm having some trouble with closures when defining a decorator. | | | > However, I can't make my make_file_property function work. I've stripped | > the code down and it does this: | | | > Tr

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread jjmeric
In article , ian.g.ke...@gmail.com says... > > On Sun, Oct 14, 2012 at 1:36 PM, jjmeric wrote: > > Is there some sort of defaut font, or is there in Python or Python for > > Windows any ini file where the font used can be seen, eventually changed > > to a more appropriate one with all the requir

Use the appropriate forum for recruitment (was: Client Needs Linux Admin position in Pleasanton, CA)

2012-10-14 Thread Ben Finney
ram dev writes: > Good Day, > We have an urgent Contract Opening in Pleasanton, CA. Please don't use this discussion forum for recruitment. For Python job recruiters and seekers, we have a separate Python Job Board http://www.python.org/community/jobs/>. > Job Title: Linux Admin You should

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread Ian Kelly
On Sun, Oct 14, 2012 at 1:36 PM, jjmeric wrote: > Is there some sort of defaut font, or is there in Python or Python for > Windows any ini file where the font used can be seen, eventually changed > to a more appropriate one with all the required glyphs (like Lucida Sans > Unicode has). No, this i

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread Steven D'Aprano
On Sun, 14 Oct 2012 19:19:33 +0200, Alain Ketterlin wrote: > Usenet has no attachments. *snarfle* You almost owed me a new monitor. I nearly sprayed my breakfast all over it. "Usenet has no attachments" -- that's like saying that the Web has no advertisements. Maybe the websites you visit ha

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread Roy Smith
In article , MRAB wrote: > Which codepoint is it? What is the codepoint's name? > > Here's how to find out: > > >>> hex(ord("?")) > '0x190' > >>> import unicodedata > >>> unicodedata.name("?") > 'LATIN CAPITAL LETTER OPEN E' Wow, I never knew you could do that. I usually just google for

Tkinter how to access the widget by name

2012-10-14 Thread Владимир Пылев
I'm a little teapot ... himself the question: if I want to appeal to the widget, knowing his name... ? # appropriated the name of the widget label = Label(frame, width = 40, text='text', name = 'name') ... name_='name' configure(name_) ... def configure(name_) #And how can that be?

Re: Understanding http proxies

2012-10-14 Thread Tim Roberts
Olive wrote: > >it seems when I read the code above that the proxy acts mostly as an >orinary server with respect to the client except that it is supposed to >receive the full URL instead of just the path. Am I right? Is there any >documentation on what an http proxy is supposed to implement. Con

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread jjmeric
Alain, MRAB Thank you for prompt responses. What they suggest to me is I should look into what font is being used by this Python for Windows program. I am not the programmer, so not idea where to look for. The program settings do not include a choice for display font. The font that used for disp

Re: Understanding and dealing with an exception

2012-10-14 Thread Vincent Davis
Yes afile is the file name and extension, ifile is the full file name and path. Thanks Vincent On Sunday, October 14, 2012, MRAB wrote: > On 2012-10-14 05:23, Vincent Davis wrote: > >> I am working on a script to find bad image files. I am using PIL >> and specifically image.verify() I have a se

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread MRAB
On 2012-10-14 17:55, jjmeric wrote: Hi everybody ! Our language lab at INALCO is using a nice language parsing and analysis program written in Python. As you well know a lot of languages use characters that can only be handled by unicode. Here is an example of the problem we have on some Windo

Re: pyw program not displaying unicode characters properly

2012-10-14 Thread Alain Ketterlin
jjmeric writes: > Our language lab at INALCO is using a nice language parsing and analysis > program written in Python. As you well know a lot of languages use > characters that can only be handled by unicode. > > Here is an example of the problem we have on some Windows computers. > In the att

pyw program not displaying unicode characters properly

2012-10-14 Thread jjmeric
Hi everybody ! Our language lab at INALCO is using a nice language parsing and analysis program written in Python. As you well know a lot of languages use characters that can only be handled by unicode. Here is an example of the problem we have on some Windows computers. In the attached screen

Re: Understanding and dealing with an exception

2012-10-14 Thread MRAB
On 2012-10-14 05:23, Vincent Davis wrote: I am working on a script to find bad image files. I am using PIL and specifically image.verify() I have a set of known to be bad image files to test. I also what to be able to test any file for example a .txt and deal with the exception. Currently my code

Re: __builtins__ thread-safe / __builtins__ as function?

2012-10-14 Thread Chris Angelico
On Sun, Oct 14, 2012 at 9:36 PM, Juergen Bartholomae wrote: > Unfortunately, replacing __builtins__ at import time won't do, because > external modules (that is, .py) get imported only once when they are > accessed by the first thread, which includes (of course) setting up of > __dict__ and __buil

Re: Feedback on my python framework I'm building.

2012-10-14 Thread Roy Smith
In article <507a3365$0$6574$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > Remember using PEEK and POKE commands with BASIC back in > 1978? Pretty much impossible in Python. But, trivial to implement as an extension :-) -- http://mail.python.org/mailman/listinfo/python-list

LinkedIn Python group discussions

2012-10-14 Thread Mark Lawrence
I've been sparked into raising the subject as this has just come up "Does Jython/Python fall short of true POSIX thread parallelism?". I'm not qualified to comment and I recognise relatively few names amongst the people who do participate over there. The last thing I'd want would be FUD or wo

Re: Understanding and dealing with an exception

2012-10-14 Thread Mark Lawrence
On 14/10/2012 11:06, Terry Reedy wrote: On 10/14/2012 4:20 AM, Mark Lawrence wrote: You've already had some advice so I'll just point out that a bare except is a bad idea as you wouldn't even be able to catch a user interrupt. Try (groan!) catching StandardError instead. There are some bare e

Re: python game develop:framework?

2012-10-14 Thread LeBas
On 2012-10-14 08:58:57 +, nepaul said: Something good framwork? I just want to sencond PyGame. It's compelling with a good user base and has development activity e.g. patches and improvements etc. are provided. -- http://mail.python.org/mailman/listinfo/python-list

Re: python game develop:framework?

2012-10-14 Thread Jason Benjamin
Pygame is my favorite. It's mature, has good documentation, and has lots of unfinished and finished games on its website. It also supports OpenGL. http://www.pygame.org/ On 10/14/2012 01:58 AM, nepaul wrote: Something good framwork? -- http://mail.python.org/mailman/listinfo/python-list

Re: __builtins__ thread-safe / __builtins__ as function?

2012-10-14 Thread Juergen Bartholomae
>> One possible solution is to somehow redirect every __builtins__ to a >> function that returns a different __builtins__ dictionary for each thread >> (such a function already exists). >How exactly does the code reference it? If they're simply referring to >the name __builtins__ at module level,

Re: python game develop:framework?

2012-10-14 Thread Steven D'Aprano
On Sun, 14 Oct 2012 01:58:57 -0700, nepaul wrote: > Something good framwork? http://duckduckgo.com/?q=python+%2Bgame+frameworks http://duckduckgo.com/?q=python+%2Bgame+libraries http://blekko.com/ws/?q=python%20game%20framework -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding and dealing with an exception

2012-10-14 Thread Terry Reedy
On 10/14/2012 4:20 AM, Mark Lawrence wrote: You've already had some advice so I'll just point out that a bare except is a bad idea as you wouldn't even be able to catch a user interrupt. Try (groan!) catching StandardError instead. There are some bare except:s in the stdlib, that adding anothe

python game develop:framework?

2012-10-14 Thread nepaul
Something good framwork? -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding and dealing with an exception

2012-10-14 Thread Mark Lawrence
On 14/10/2012 05:23, Vincent Davis wrote: I am working on a script to find bad image files. I am using PIL and specifically image.verify() I have a set of known to be bad image files to test. I also what to be able to test any file for example a .txt and deal with the exception. Currently my code