Re: INCONTROVERTIBLE PROOF of the Incompetence of FBI

2010-06-16 Thread nanothermite911fbibustards
Pity this patsy of the FBI Bustards - why FBI bustards ? coz they tout to be honest defenders of the CONSTITUTION !!! I dont blame the jews - because most of them are beyond the realm of cure. http://www.youtube.com/watch?v=2u-EErXEnjI&feature=player_embedded#! On Jun 15, 9:40 pm, nanothermite911

Re: Why I have to do a deepcopy to the argument?

2010-06-16 Thread Thomas Jollans
On 06/16/2010 02:02 AM, Dimitris Leventeas wrote: > from copy import deepcopy > > def access_trie(d, sequence, position=None): > [snip] > To see what you're on about, I removed the deepcopies from your code and ran your examples with doctest: % python3.1 -m doctest trie.py *

[ANN] OpenOpt 0.29, FuncDesigner 0.19, DerApproximator 0.19

2010-06-16 Thread dmitrey
Hi all, I'm glad to inform you about new release of the free cross-platform (Linux, Windows, Mac etc) software (numerical optimization, linear/ nonlinear/ODE systems, automatic differentiation, etc), that is written in Python language and released quarterly since 2007. For more details see http://

Re: Overriding "__setattr__" of a module - possible?

2010-06-16 Thread Christian Heimes
> There aren't any; modules do not follow the class object protocol. They > are simple types with a __dict__ (which you can't change, either, so no > replacing it with a dict that implements __setattr__). You are wrong, my friend. :) Modules follow the new style class and instance protocol. Modul

Re: Why I have to do a deepcopy to the argument?

2010-06-16 Thread Dimitris Leventeas
Thanks Thomas! To reply the subject's question: I don't have to. The following works perfectly. def populate_trie(trie, sequence, position=None): """ Populate a trie. Assume that the counter is always at `position` 0 while the `position` of the dictionary is the last one.

Re: Scope (?) question

2010-06-16 Thread Peter Otten
Inyeol Lee wrote: > On Jun 15, 3:22 pm, Peter wrote: >> I am puzzled by what appears to be a scope issue - obviously I have >> something wrong :-) >> >> Why does this work: >> >> if __name__ == 'main': >> execfile('test-data.py') >> print data >> >> and yet this doesn't (I get "NameError: global

Jewish Pirates of the Caribbean

2010-06-16 Thread nanothermite911fbibustards
Jewish Pirates of the Caribbean http://www.youtube.com/watch?v=cFSjKaiN47I&feature=related Python Jewish Pirates of the Caribbean Lisp (Jewish-Pirates Caribbean) I rcvd appreciative and supporting replies from many of you. The world is moving in the direction of the Biblical predictions. I agre

Re: Jewish Pirates of the Caribbean

2010-06-16 Thread Thomas Jollans
On 06/16/2010 11:25 AM, nanothermite911fbibustards wrote: > I rcvd appreciative and supporting replies from many of you. Yeah, right. -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-16 Thread lkcl
On Jun 15, 2:47 pm, Steven D'Aprano wrote: > On Tue, 15 Jun 2010 05:57:13 -0700, lkcl wrote: > >  to be honest, if you don't put any effort in to use the appropriate > > "lovely-prettiness" panels you can end up with something truly "90s- > > esque".  but with a little effort you can do round-edge

Re: pythonize this!

2010-06-16 Thread Alessandro [AkiRoss] Re
On Jun 15, 1:49 pm, superpollo wrote: > goal (from e.c.m.): evaluate > 1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each three > consecutive + must be followed by two - (^ meaning ** in this context) My functional approach :) from operator import add from functools import reduce

Re: pythonize this!

2010-06-16 Thread Alessandro [AkiRoss] Re
On Jun 15, 2:37 pm, Peter Otten <__pete...@web.de> wrote: > >>> from itertools import cycle, izip > >>> sum(sign*i*i for sign, i in izip(cycle([1]*3+[-1]*2), range(1, 2011))) Wow!! :D I didn't knew cycle, great! With that i can reduce my solution (which isn't still elegant as your) to: print redu

Re: Advanced Dictionary

2010-06-16 Thread Thomas Lehmann
> > class AutoValueDict(dict): >     def __makeitem__(self, key): >         return self.setdefault(key, {}) > >     def __getitem__(self, key): >         return self.get(key, self.__makeitem__(key)) > > I would like to have a dictionary which ensures dictionaries as values > except when I'm assigni

Re: pythonize this!

2010-06-16 Thread Lie Ryan
On 06/15/10 21:49, superpollo wrote: > goal (from e.c.m.): evaluate > 1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each three > consecutive + must be followed by two - (^ meaning ** in this context) > > my solution: > s = 0 for i in range(1, 2011): > s += i**2 > .

Advanced Dictionary

2010-06-16 Thread Thomas Lehmann
Hi, I have seen a recipe which allows auto creation of missing values for dictionaries. However this recipe is not working for all. class AutoValueDict(dict): def __makeitem__(self, key): return self.setdefault(key, {}) def __getitem__(self, key): return self.get(key, sel

Re: pythonize this!

2010-06-16 Thread Jussi Piitulainen
Lie Ryan writes: > On 06/15/10 21:49, superpollo wrote: > > goal (from e.c.m.): evaluate > > 1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each > > three consecutive + must be followed by two - (^ meaning ** in > > this context) [...] > Probably bending the rules a little bit: > > >>

Re: pythonize this!

2010-06-16 Thread Stefan Behnel
Jussi Piitulainen, 16.06.2010 13:10: Lie Ryan writes: On 06/15/10 21:49, superpollo wrote: goal (from e.c.m.): evaluate 1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each three consecutive + must be followed by two - (^ meaning ** in this context) [...] Probably bending the rule

Re: Overriding "__setattr__" of a module - possible?

2010-06-16 Thread Lie Ryan
On 06/16/10 12:43, John Nagle wrote: > Is it possible to override "__setattr__" of a module? I > want to capture changes to global variables for debug purposes. > > None of the following seem to have any effect. > > modu.__setattr__ = myfn > > setattr(modu, "__setattr__", myfn) > >

Re: Updating a module level shared dictionary

2010-06-16 Thread Dave Angel
Vishal Rana wrote: Hi, A module level dictionary 'd' and is accessed by different threads/requests in a django web application. I need to update 'd' every minute with a new data and the process takes about 5 seconds. What could be best solution where I want the users to get either the old value

Coroutines: unexpected behaviour

2010-06-16 Thread Jérôme Mainka
Hello, I try to experiment with coroutines and I don't understand why this snippet doesn't work as expected... In python 2.5 and python 2.6 I get the following output: 0 Exception exceptions.TypeError: "'NoneType' object is not callable" in ignored The TypeError exception comes from the pprint

Re: Overriding "__setattr__" of a module - possible?

2010-06-16 Thread Steven D'Aprano
On Tue, 15 Jun 2010 20:34:47 -0700, Michele Simionato wrote: > On Jun 16, 4:43 am, John Nagle wrote: >>    Is it possible to override "__setattr__" of a module?  I >> want to capture changes to global variables for debug purposes. [...] > There is a dirty trick which involves fiddling with sys.mo

Re: Scope (?) question

2010-06-16 Thread Steven D'Aprano
On Tue, 15 Jun 2010 15:22:17 -0700, Peter wrote: > I checked help on execfile and could only find the following > (mystifying) sentence: > > "execfile() cannot be used reliably to modify a function’s locals." What is mystifying about it? It's short and clear -- execfile cannot be used to reliab

Re: GUIs - A Modest Proposal

2010-06-16 Thread lkcl
On Jun 15, 1:07 pm, superpollo wrote: > mind you, i am no python expert, but i really look forward to seeing > pyjamas in the stdlib :-) anytime soon? *choke* :) ... weelll... let me answer that as if it's serious. you'd have to: a) define http://python.org as including a javascript target

Re: Scope (?) question

2010-06-16 Thread Steven D'Aprano
On Tue, 15 Jun 2010 17:12:47 -0700, Inyeol Lee wrote: > > "execfile() cannot be used reliably to modify a function’s locals." [...] > This is due to CPython's static optimization of local name lookup. Dummy > 'exec' statement disables this and makes your example work: > > def X(): > exec "None"

Re: Coroutines: unexpected behaviour

2010-06-16 Thread Thomas Jollans
On 06/16/2010 02:03 PM, Jérôme Mainka wrote: > Hello, > > I try to experiment with coroutines and I don't understand why this > snippet doesn't work as expected... In python 2.5 and python 2.6 I get > the following output: > > 0 > Exception exceptions.TypeError: "'NoneType' object is not callable

Re: pythonize this!

2010-06-16 Thread Richard Brodie
"Lie Ryan" wrote in message news:4c18a...@dnews.tpgi.com.au... > Probably bending the rules a little bit: > sum(x**2 - 8*x - 20 for x in range(1, 2010, 5)) > 536926141 Or, letting Python do the algera for you: >>> from sympy import var, sum >>> dummy = var('j k') >>> k = (5 * j) + 1 >>>

Re: Advanced Dictionary

2010-06-16 Thread Peter Otten
Thomas Lehmann wrote: >> class AutoValueDict(dict): >> def __makeitem__(self, key): >> return self.setdefault(key, {}) I think it's bad style to invent your own __whatever__() methods, I'd rather call them _whatever(). >> def __getitem__(self, key): >> return self.get(ke

Re: INCONTROVERTIBLE PROOF of the Incompetence of FBI

2010-06-16 Thread Mark Lawrence
On 16/06/2010 08:32, nanothermite911fbibustards wrote: Pity this patsy of the FBI Bustards - why FBI bustards ? coz they tout to be honest defenders of the CONSTITUTION !!! I dont blame the jews - because most of them are beyond the realm of cure. Can't say I've ever heard of the FBI Bustards,

Wing IDE 3.2.9 released: Fixes debugger for Python 2.4.x and earlier

2010-06-16 Thread Wingware
Hi, Wingware has released version 3.2.9 of Wing IDE, an integrated development environment designed specifically for the Python programming language. This release includes the following bug fixes: * Fix debugger support for Python versions 2.4.x and earlier * Fix vi mode y$ See the change log

Re: INCONTROVERTIBLE PROOF of the Incompetence of FBI

2010-06-16 Thread Kryno Bosman
Hola, Would you, please, be so nice to share *your* truth somewhere else? Thanks On Jun 16, 3:26 pm, Mark Lawrence wrote: > On 16/06/2010 08:32, nanothermite911fbibustards wrote: > > > Pity this patsy of the FBI Bustards - why FBI bustards ? coz they tout > > to be honest defenders of the CONST

Re: Deformed Form

2010-06-16 Thread Victor Subervi
Stephen Hansen suggests running this line before running or testing code: python -m compileall -f . Noted. Will do. Stephen also mentions, along with many others, that using CGI these days is silly (my word). Noted. I'll switch over, but not today. Got other things more pressing ;) DavidA corr

Re: Possible to make subprocess.Popen jobs run serially rather than in parallel?

2010-06-16 Thread Chris Seberino
On Jun 15, 2:03 pm, Stephen Hansen wrote: > Just call "process.wait()" after you call process = subprocess.Popen(...) I may have not been clear. I *don't* want web app to block on Popen.wait. I *do* want the Popen process to run in the background which web app still runs doing other things.

Re: Possible to make subprocess.Popen jobs run serially rather than in parallel?

2010-06-16 Thread Thomas Jollans
On 06/16/2010 04:04 PM, Chris Seberino wrote: > On Jun 15, 2:03 pm, Stephen Hansen wrote: > >> Just call "process.wait()" after you call process = subprocess.Popen(...) > > I may have not been clear. > I *don't* want web app to block on Popen.wait. > I *do* want the Popen process to run in t

Re: Community (A Modest Proposal)

2010-06-16 Thread Duncan Booth
rantingrick wrote: > One feature i would like to create is an ability to redo the last > command. Pressing an F* key should return you to the last block for > editing. How would this differ from the current Alt-P function? Some of your other ideas sound good. -- Duncan Booth http://kupuguy.b

Re: Possible to make subprocess.Popen jobs run serially rather than in parallel?

2010-06-16 Thread Jean-Michel Pichavant
Chris Seberino wrote: On Jun 15, 2:03 pm, Stephen Hansen wrote: Just call "process.wait()" after you call process = subprocess.Popen(...) I may have not been clear. I *don't* want web app to block on Popen.wait. I *do* want the Popen process to run in the background which web app

Re: Advanced Dictionary

2010-06-16 Thread Ian Kelly
On Wed, Jun 16, 2010 at 4:43 AM, Thomas Lehmann wrote: > Hi, > > I have seen a recipe which allows auto creation of missing values for > dictionaries. > However this recipe is not working for all. > > class AutoValueDict(dict): >    def __makeitem__(self, key): >        return self.setdefault(key,

Re: Jewish Pirates of the Caribbean

2010-06-16 Thread Pascal J. Bourguignon
Kryno Bosman writes: > Would you, please, be so nice to share *your* truth somewhere else? He has been long time ago kill-filed by everybody. Your quoting of his message puts you at risk of being kill-filed too. The only way to deal with this kind of post is the kill file and foremost not qu

Re: Jewish Pirates of the Caribbean

2010-06-16 Thread Tamas K Papp
Most people capable of using their newsreaders probably killfiled this guy a long time ago. Would you, please, be so nice as to refrain from replying to his messages? If you do that, we won't even notice that he posted anything. Thanks, Tamas On Wed, 16 Jun 2010 06:48:32 -0700, Kryno Bosman wr

How do I fix this test so it runs on Windows? (it uses tzset)

2010-06-16 Thread Chris Withers
Hi All, I'd like to make test_non_gmt_timezone at the bottom of https://secure.simplistix.co.uk/svn/Simplistix/testfixtures/branches/1.8/testfixtures/tests/test_time.py run on Windows, any suggestions? cheers, Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonize this!

2010-06-16 Thread Boris Borcic
Ignacio Mondino wrote: On Tue, Jun 15, 2010 at 8:49 AM, superpollo wrote: goal (from e.c.m.): evaluate 1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each three consecutive + must be followed by two - (^ meaning ** in this context) my solution: s = 0 for i in range(1, 2011): ...

Re: Jewish Pirates of the Caribbean

2010-06-16 Thread Norbert_Paul
And note: Never ask: "What does kill-file mean?" :) Pascal J. Bourguignon wrote: Kryno Bosman writes: Would you, please, be so nice to share *your* truth somewhere else? He has been long time ago kill-filed by everybody. Your quoting of his message puts you at risk of being kill-filed too.

Re: Advanced Dictionary

2010-06-16 Thread Stephen Hansen
On 6/16/10 6:10 AM, Peter Otten wrote: > Thomas Lehmann wrote: > >>> class AutoValueDict(dict): >>> def __makeitem__(self, key): >>> return self.setdefault(key, {}) > > I think it's bad style to invent your own __whatever__() methods, I'd rather > call them _whatever(). It goes a bi

Re: Possible to make subprocess.Popen jobs run serially rather than in parallel?

2010-06-16 Thread Stephen Hansen
On 6/16/10 7:04 AM, Chris Seberino wrote: > On Jun 15, 2:03 pm, Stephen Hansen wrote: > >> Just call "process.wait()" after you call process = subprocess.Popen(...) > > I may have not been clear. > I *don't* want web app to block on Popen.wait. > I *do* want the Popen process to run in the b

Re: Overriding "__setattr__" of a module - possible?

2010-06-16 Thread Stephen Hansen
On 6/16/10 1:23 AM, Christian Heimes wrote: >> There aren't any; modules do not follow the class object protocol. They >> are simple types with a __dict__ (which you can't change, either, so no >> replacing it with a dict that implements __setattr__). > > You are wrong, my friend. :) > > Modules

Re: Advanced Dictionary

2010-06-16 Thread Steven D'Aprano
On Wed, 16 Jun 2010 09:17:47 -0700, Stephen Hansen wrote: > Leading-and-trailing double underscores are explicitly reserved for > Python to define as Special. That part is correct. But of course Python doesn't prevent you from ignoring this rule (more of a guideline really). > They also imp

Re: Coroutines: unexpected behaviour

2010-06-16 Thread Steven D'Aprano
On Wed, 16 Jun 2010 05:03:13 -0700, Jérôme Mainka wrote: > Hello, > > I try to experiment with coroutines and I don't understand why this > snippet doesn't work as expected... In python 2.5 and python 2.6 I get > the following output: > > 0 > Exception exceptions.TypeError: "'NoneType' object is

Re: Need to parse python dictionaries into xml

2010-06-16 Thread abhijeet thatte
I am parsing some hardware format which finally I need to convert in xml. The intermediate step is dicts. So, the structure looks like this: {chip_name:'myChip',chip_clock:'3.07',chip_peripherals:{peripheral1:{mode:'mode1',register:{}},peripheral2:{},peripheral3:{...}}} I think this example gi

Re: Advanced Dictionary

2010-06-16 Thread Stephen Hansen
On 6/16/10 9:34 AM, Steven D'Aprano wrote: > On Wed, 16 Jun 2010 09:17:47 -0700, Stephen Hansen wrote: > >> Leading-and-trailing double underscores are explicitly reserved for >> Python to define as Special. > > > That part is correct. But of course Python doesn't prevent you from > ignoring t

Re: Coroutines: unexpected behaviour

2010-06-16 Thread Jérôme Mainka
On Jun 16, 6:35 pm, Steven D'Aprano wrote: > How bizarre is that? Sure... > I have to say that your code is horribly opaque and unclear to me. Welcome to the coroutines world :-) This is mainly a pipeline where each function suspends execution waiting for data (yield), and feeding other functi

Re: Coroutines: unexpected behaviour

2010-06-16 Thread Thomas Jollans
On 06/16/2010 06:35 PM, Steven D'Aprano wrote: > On Wed, 16 Jun 2010 05:03:13 -0700, Jérôme Mainka wrote: > >> Hello, >> >> I try to experiment with coroutines and I don't understand why this >> snippet doesn't work as expected... In python 2.5 and python 2.6 I get >> the following output: >> >> 0

Installing Python 3.1.2 from source, how do you resolve the sqlite3-dev dependency?

2010-06-16 Thread Trevor
Running ubuntu 9.04 "jaunty". When I run make I get the following error: Python build finished, but the necessary bits to build these modules were not found: _sqlite3 So the easy solution is to just install the missing dependency using apt-get, "sudo apt-get -f install libsqlite3-dev" b

Re: Need to parse python dictionaries into xml

2010-06-16 Thread Ian Kelly
On Wed, Jun 16, 2010 at 10:46 AM, abhijeet thatte wrote: > I am parsing some hardware format which finally I need to convert in xml. > The intermediate step is dicts. > So, the structure looks like this: > {chip_name:'myChip',chip_clock:'3.07',chip_peripherals:{peripheral1:{mode:'mode1',register:{

Re: Installing Python 3.1.2 from source, how do you resolve the sqlite3-dev dependency?

2010-06-16 Thread Benjamin Kaplan
On Wed, Jun 16, 2010 at 10:29 AM, Trevor wrote: > Running ubuntu 9.04 "jaunty". > > When I run make I get the following error: > >    Python build finished, but the necessary bits to build these > modules were not found: >    _sqlite3 > > > So the easy solution is to just install the missing depen

Removing anti-Jewish postings from Python list

2010-06-16 Thread Alan Harris-Reid
Any idea how we get rid of this 'noise'? Will it eventually go away if we ignore it, or is there anything the moderators can do to clean-up this (normally) wonderful resource for Python programmers? Regards, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Need to parse python dictionaries into xml

2010-06-16 Thread Stefan Behnel
Hi, please avoid top-posting. abhijeet thatte, 16.06.2010 18:46: On Tue, Jun 15, 2010 at 11:09 PM, Stefan Behnel wrote: abhijeet thatte, 16.06.2010 03:05: I am a novice Python user. I am using Python to parse some hardware specifications and create xml files from them. I generate dict of reall

Re: Updating a module level shared dictionary

2010-06-16 Thread Dan Stromberg
On Tue, Jun 15, 2010 at 6:33 PM, MRAB wrote: > Vishal Rana wrote: > >> Hi, >> >> A module level dictionary 'd' and is accessed by different >> threads/requests in a django web application. I need to update 'd' every >> minute with a new data and the process takes about 5 seconds. >> What could be

Python Ajuda por favor

2010-06-16 Thread estimado estimado
boas eu gostaria de fazer um programa com o python mas não o sei fazer... podes-me ajudar sff. aguardo resposta cumps -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing Python 3.1.2 from source, how do you resolve the sqlite3-dev dependency?

2010-06-16 Thread Thomas Jollans
On 06/16/2010 07:29 PM, Trevor wrote: > Running ubuntu 9.04 "jaunty". > > When I run make I get the following error: > > Python build finished, but the necessary bits to build these > modules were not found: > _sqlite3 > > > So the easy solution is to just install the missing dependency

Re: Installing Python 3.1.2 from source, how do you resolve the sqlite3-dev dependency?

2010-06-16 Thread Philip Semanchuk
On Jun 16, 2010, at 1:29 PM, Trevor wrote: Running ubuntu 9.04 "jaunty". When I run make I get the following error: Python build finished, but the necessary bits to build these modules were not found: _sqlite3 So the easy solution is to just install the missing dependency using apt-ge

Re: Deformed Form

2010-06-16 Thread Dave Angel
Victor Subervi wrote: DavidA corrects me: Since you didn't name your modules (what you persist in calling scripts), I can only guess their names from the import statements: e.g.: >from New_Passengers_Curr_Customers import New_Passengers_Curr_Customers I don't see any case differe

Is there a way to see why a thread is still open?

2010-06-16 Thread JohnnyFive
I've got a rather complex program that, for some reason, is not closing the completed threads when they are finished. Just to cover my bases, when using the following: temp = threading.Thread(target=self.processMessages, args=(msg, args), name="pubmsg subthread") temp.setD

Re: Coroutines: unexpected behaviour

2010-06-16 Thread Carl Banks
On Jun 16, 5:03 am, Jérôme Mainka wrote: > Hello, > > I try to experiment with coroutines and I don't understand why this > snippet doesn't work as expected... In python 2.5 and python 2.6 I get > the following output: > > 0 > Exception exceptions.TypeError: "'NoneType' object is not callable" in

Re: Deformed Form

2010-06-16 Thread Victor Subervi
On Wed, Jun 16, 2010 at 2:09 PM, Dave Angel wrote: > Fix any one of them, and I'd probably have kept quiet. > Thanks for piping up ;) beno > > -- http://mail.python.org/mailman/listinfo/python-list

THE JEWISH GENOCIDE OF ARMENIAN CHRISTIANS - The Jews SCREWED Everyone - Spared NO ONE !!!

2010-06-16 Thread nanothermite911fbibustards
I rcvd appreciative and supporting replies (private emails) from many of you supporting my RIGHT to FREEDOM OF SPEECH and SPREADING the TRUTH. The world is moving in the direction of the Biblical predictions. I agree to some extent that we should encourage the jews to accelerate their self-destruc

Python-URL! - weekly Python news and links (Jun 16)

2010-06-16 Thread Cameron Laird
QOTW: "Python advocacy seems to be by example, not cheerleading." - Cameron Simpson http://groups.google.com/group/comp.lang.python/msg/2cc7e643702d0ec8 The first release candidate of Python 2.7 is now available for testing: http://groups.google.com/group/comp.lang.python/t/e3cd74b1

Re: Need to parse python dictionaries into xml

2010-06-16 Thread abhijeet thatte
On Wed, Jun 16, 2010 at 10:57 AM, Stefan Behnel wrote: > Hi, please avoid top-posting. > > abhijeet thatte, 16.06.2010 18:46: > > On Tue, Jun 15, 2010 at 11:09 PM, Stefan Behnel wrote: >> >>> abhijeet thatte, 16.06.2010 03:05: >>> I am a novice Python user. I am using Python to parse some h

Re: Need to parse python dictionaries into xml

2010-06-16 Thread abhijeet thatte
On Wed, Jun 16, 2010 at 10:43 AM, Ian Kelly wrote: > On Wed, Jun 16, 2010 at 10:46 AM, abhijeet thatte > wrote: > > I am parsing some hardware format which finally I need to convert in xml. > > The intermediate step is dicts. > > So, the structure looks like this: > > > {chip_name:'myChip',chip_

Re: GUIs - A Modest Proposal

2010-06-16 Thread Cameron Laird
On Jun 6, 5:49 pm, Kevin Walzer wrote: . [much wisdom, particularly in regard to Tkinter] . . > > The very diversity of GUI toolkits came into effect because Python is > very easy to extend and integrate with other C/C++ libraries. Writing a > GUI toolkit from scratch is much, muc

Re: Removing anti-Jewish postings from Python list

2010-06-16 Thread Stephen Hansen
On 6/16/10 10:56 AM, Alan Harris-Reid wrote: > Any idea how we get rid of this 'noise'? Will it eventually go away if > we ignore it, or is there anything the moderators can do to clean-up > this (normally) wonderful resource for Python programmers? The problem is, this forum has lots of access p

How to set up this usenet discussion?

2010-06-16 Thread L V
I have installed pan, but I fail to make it work with "news:comp.lang.python"; I tried adding the name as a newsserver and left all other info like Port, username and password empty. Stil I don't get any messages. How to fix this. Also I'm completely new to newsgroups. -- http://mail.pyt

Re: Overriding "__setattr__" of a module - possible?

2010-06-16 Thread John Nagle
On 6/15/2010 8:34 PM, Michele Simionato wrote: On Jun 16, 4:43 am, John Nagle wrote: Is it possible to override "__setattr__" of a module? I want to capture changes to global variables for debug purposes. None of the following seem to have any effect. modu.__setattr__ = myfn

Re: Is Scheme/LISP faster than C/C++

2010-06-16 Thread fortunatus
On Jun 14, 3:34 pm, Raymond Toy wrote: > There was even one example where the C compiler made spectacularly bad > code.  I only needed 6 pointer registers (the arch has 8), but the > compiler decided to use only one or two and spilled and reloaded them > from the stack for each use.  Yay! That's

Re: Removing anti-Jewish postings from Python list

2010-06-16 Thread Mark Lawrence
On 16/06/2010 18:56, Alan Harris-Reid wrote: Any idea how we get rid of this 'noise'? Will it eventually go away if we ignore it, or is there anything the moderators can do to clean-up this (normally) wonderful resource for Python programmers? Regards, Alan Alan, From an earlier thread by St

Re: Removing anti-Jewish postings from Python list

2010-06-16 Thread geremy condra
On Wed, Jun 16, 2010 at 11:50 AM, Stephen Hansen wrote: > On 6/16/10 10:56 AM, Alan Harris-Reid wrote: >> Any idea how we get rid of this 'noise'?  Will it eventually go away if >> we ignore it, or is there anything the moderators can do to clean-up >> this (normally) wonderful resource for Python

Re: Python editing .txt file

2010-06-16 Thread 187braintrust
MRAB mrabarnett.plus.com> writes: > input_file = open(input_path) > output_file = open(output_path, "w") > for line in input_file: > if line.startswith("factor("): > open_paren = line.find("(") > close_paren = line.find(")") > variable = line[open_paren + 1 : close_

FBI BUStards - Jews Supplied SMALLPOX blankets to the KILL THE NATIVES

2010-06-16 Thread small Pox
"They tell how they supplied smallpox to General Amherst (Secret Relationship, pp. 111-114) to send the blankets among the Native American - it's all here. "They tell how they supplied smallpox to General Amherst (Secret Relationship, pp. 111-114) to send the blankets among the Native American - i

Re: How to set up this usenet discussion?

2010-06-16 Thread Thomas Jollans
On 06/16/2010 08:55 PM, L V wrote: > I have installed pan, but I fail to make it work with > "news:comp.lang.python"; > I tried adding the name as a newsserver and left all other info like > Port, username and password empty. > Stil I don't get any messages. > How to fix this. > Also I'm completely

virtualenv / virtualenvwrapper resetting $PATH?

2010-06-16 Thread Nan
I just installed virtualenv and virtualenvwrapper on an OS X machine (10.6). My ~/.bash_login adds a few paths to the $PATH environment variable, but upon activating a virtualenv with "workon", those paths go missing from $PATH (and are not restored when I deactivate the virtualenv either). Any s

Re: How do I fix this test so it runs on Windows? (it uses tzset)

2010-06-16 Thread Nobody
On Wed, 16 Jun 2010 16:30:02 +0100, Chris Withers wrote: > I'd like to make test_non_gmt_timezone at the bottom of > https://... > run on Windows, any suggestions? MSVCRT has _tzset(), which understands the TZ environment variable. http://msdn.microsoft.com/en-us/library/90s5c885%28VS.80%29.asp

Re: Need to parse python dictionaries into xml

2010-06-16 Thread Stefan Behnel
abhijeet thatte, 16.06.2010 20:41: On Wed, Jun 16, 2010 at 10:57 AM, Stefan Behnel wrote: You should start by writing down the XML structure that you want to build for the above dict. That will make it clear what needs to be done. /**

Re: Python editing .txt file

2010-06-16 Thread 187braintrust
> > From: MRAB > To: python-list@python.org > Date: Wed, 16 Jun 2010 03:06:58 +0100 > Subject: Re: Python editing .txt file > 187braintr...@berkeley.edu wrote: > >> I am trying to write a program in Python that will edit .txt log files >> that contain regression output from R. Any thoughts or sug

Re: Removing anti-Jewish postings from Python list

2010-06-16 Thread Stephen Hansen
On 6/16/10 12:21 PM, Mark Lawrence wrote: > I actually don't know how to report such things because of the > combination of c.l.py, gmane.comp.python.general and > http://mail.python.org/mailman/listinfo/python-list, possibly others?. > Could somebody please show the correct direction? It depends

Re: How to set up this usenet discussion?

2010-06-16 Thread Grant Edwards
On 2010-06-16, Thomas Jollans wrote: > On 06/16/2010 08:55 PM, L V wrote: >> I have installed pan, but I fail to make it work with >> "news:comp.lang.python"; >> I tried adding the name as a newsserver and left all other info like >> Port, username and password empty. >> Stil I don't get any messa

Re: Removing anti-Jewish postings from Python list

2010-06-16 Thread Benjamin Kaplan
On Wed, Jun 16, 2010 at 12:21 PM, Mark Lawrence wrote: > On 16/06/2010 18:56, Alan Harris-Reid wrote: >> >> Any idea how we get rid of this 'noise'?  Will it eventually go away if >> we ignore it, or is there anything the moderators can do to clean-up >> this (normally) wonderful resource for Pyth

Re: Overriding "__setattr__" of a module - possible?

2010-06-16 Thread Ian Kelly
On Wed, Jun 16, 2010 at 12:55 PM, John Nagle wrote: > Note that there are now two copies of "a", one bound to the module and > referenced in "f", and a second bound to the class, and referenced by > "x.a".  Uh oh. > > The problem here is that when "def f..." was defined, its reference > to "a" was

exceptions and unicode

2010-06-16 Thread Stuart McGraw
I am having a problem with exceptions and unicode. try: open ('file.txt') except IOError, e: pass str (e) => "[Errno 2] No such file or directory: 'file.txt'" which is fine but... try: open (u'フィイル.txt') except IOError, e: pass str (e) => "[Errno 2] No such file or directory: u'\

Re: How to set up this usenet discussion?

2010-06-16 Thread Mark Lawrence
On 16/06/2010 19:55, L V wrote: I have installed pan, but I fail to make it work with "news:comp.lang.python"; I tried adding the name as a newsserver and left all other info like Port, username and password empty. Stil I don't get any messages. How to fix this. Also I'm completely new to newsgr

Writing to open subprocess pipes.

2010-06-16 Thread Brandon McGinty
All, I have researched this both in the python documentation, and via google. Neither subprocess nor os.popen* will do what I need. First, I would instanshiate an ongoing shell, that would remain active throughout the life of the socket connection. I am trying to take commands, coming in from a s

Re: Readability (html purifier) in Python

2010-06-16 Thread Дамјан Георгиевски
>> http://lab.arc90.com/experiments/readability/ >> >> Readability is a javascript bookmarklet that "makes reading on the >> Web more enjoyable by removing the clutter around what you're >> reading." >> >> Does anyone know of something similar in Python? > > Well, that sounds like a browser tool.

Re: Different byte-code in same major version (2.6.x)?

2010-06-16 Thread Hartmut Goebel
Am 15.06.2010 20:43, schrieb Paul Rubin: > Hartmut Goebel writes: >> I'm facing a curious problem: 2.6, 2.6.1 and 2.6.4 are generating >> different byte-code for the same source. I can not find the reason for. > > Why should they generate the same bytecode? All that you should expect Because a)

Re: Removing anti-Jewish postings from Python list

2010-06-16 Thread Mark Lawrence
On 16/06/2010 21:02, Stephen Hansen wrote: On 6/16/10 12:21 PM, Mark Lawrence wrote: I actually don't know how to report such things because of the combination of c.l.py, gmane.comp.python.general and http://mail.python.org/mailman/listinfo/python-list, possibly others?. Could somebody please sh

Re: Jewish Pirates of the Caribbean

2010-06-16 Thread George Neuner
On Wed, 16 Jun 2010 17:23:35 +0200, p...@informatimago.com (Pascal J. Bourguignon) wrote: >Kryno Bosman writes: >> Would you, please, be so nice to share *your* truth somewhere else? > >He has been long time ago kill-filed by everybody. > >Your quoting of his message puts you at risk of being

Re: Python Ajuda por favor

2010-06-16 Thread Francisco Souza
Olá, esta é uma lista em inglês, você pode encontrar apoio em língua portuguesa na lista Python Brasil: http://br.groups.yahoo.com/group/python-brasil/ Forte abraço, Francisco Souza Software developer at Giran and also full time Open source evangelist at full time http://www.franciscosouza.com.br

error on exe file

2010-06-16 Thread Ahmed, Shakir
HI, I created a script to do some GIS process ( basic GIS operation exam: create shape file, project and copy) and exporting one of the output to dbf too. The Script is running without any problem where ArcGIS and python are installed. I need to runt this application where both of the applicat

Re: Python Tkinter Linux Repair Question/ Python TCP Socket Example

2010-06-16 Thread My Python
1. Could u also quote some URLs for sample GUI programs written using Tkinter. I am looking for any aubstantial app that has Canvas, Frame, Button, LIstbox widgets, plus File Open/Save for simple text files. 2. Some good holistic article for positioning widgets on the frame/ canvas, basic concepts

Re: Removing anti-Jewish postings from Python list

2010-06-16 Thread Stephen Hansen
On 6/16/10 1:42 PM, Mark Lawrence wrote: > Thanks Stephen, > > But likely to be difficult as (presumably he) has already turned up this > evening as smallpox. I noticed. Reported too. Hopefully, Google'll like, ban his IP or something. Either way, I shall persistently continue to report! Even if

JBR ,Lower Market price ,Sea View and Marina View AED800per/sqft ,050-8320722

2010-06-16 Thread PETER WONG F H (+971 50 8320722)
JBR Lower market price AED800per/sqft 5 unit (3Bed + Maid)(packet) (1800sqft to 3000sqft) +Transfer Fee 2 % + Broker Fee 2% JBR Apartments Located near to Dubai Marina and lying in a beach front location comprises the area of JBR or Jumeirah Beach Residences, Comprising clusters of 6 tower covering

Re: Writing to open subprocess pipes.

2010-06-16 Thread Ian Kelly
On Wed, Jun 16, 2010 at 2:29 PM, Brandon McGinty wrote: > Both subprocess and os.popen* only allow inputput and output one time, and > the output to be read only when the process terminates. You can read output before the subprocess terminates by setting the pipe to be non-blocking: import fcntl

Re: Writing to open subprocess pipes.

2010-06-16 Thread Stephen Hansen
On 6/16/10 1:29 PM, Brandon McGinty wrote: > Both subprocess and os.popen* only allow inputput and output one time, > and the output to be read only when the process terminates. Its not that subprocess only *allow* input and output one at a time, but that it a) provides blocking file objects by de

Re: Different byte-code in same major version (2.6.x)?

2010-06-16 Thread Thomas Jollans
On 06/16/2010 10:36 PM, Hartmut Goebel wrote: > Am 15.06.2010 20:43, schrieb Paul Rubin: >> Hartmut Goebel writes: >>> I'm facing a curious problem: 2.6, 2.6.1 and 2.6.4 are generating >>> different byte-code for the same source. I can not find the reason for. >> >> Why should they generate the sa

Re: Writing to open subprocess pipes.

2010-06-16 Thread Thomas Jollans
On 06/16/2010 10:29 PM, Brandon McGinty wrote: > All, > I have researched this both in the python documentation, and via google. > Neither subprocess nor os.popen* will do what I need. > First, I would instanshiate an ongoing shell, that would remain active > throughout the life of the socket conne

  1   2   >