Re: GUIs - A Modest Proposal

2010-06-07 Thread Martin P. Hellwig
On 06/06/10 03:22, ant wrote: I get the strong feeling that nobody is really happy with the state of Python GUIs. Tkinter is not widely liked, but is widely distributed. WxPython and PyGtk are both powerful, but quirky in different ways. PyQt is tied to one platform. And there are dozens more.

introducing Lettuce, BDD tool for python with Django integration

2010-06-07 Thread Gabriel Falcão
There is not much to say, the documentation is at http://lettuce.it, and the code is GNU/GPL3+ located at http://github.com/gabrielfalcao/lettuce There is a blog post introducing it at http://gabrielfalcao.com/2010/06/08/lettuce-0-1-official-release/

Re: Which objects are expanded by double-star ** operator?

2010-06-07 Thread Terry Reedy
On 6/7/2010 6:03 PM, Peter Otten wrote: kkumer wrote: I have to merge two dictionaries into one, and in a "shallow" way: changing items should be possible by operating either on two parents or on a new dictionary. I am open to suggestions how to do this (values are always numbers, BTW), but I

Re: GUIs - A Modest Proposal

2010-06-07 Thread Stephen Hansen
On Mon, Jun 7, 2010 at 10:34 PM, Rick Johnson wrote: > Hi Stephen, > > Great to hear from you. You're right about the powers that be, and i agree! > I was just being a bit theatrical (i've been known to do that from time to > time...Sorry. ;-). > > I know one of at least is interested enough to

Re: Non Sequitur: Re: Python Forum

2010-06-07 Thread rantingrick
On Jun 7, 12:41 am, Steven D'Aprano wrote: > "Fish" can be either singular (as in "I fed the fish") or a collective > noun ("there are many fish that live in salt water"). Plural is "fishes", > as in "I ate three fishes", although in common use people tend to use > fish/fishes as both plural and

Re: GUIs - A Modest Proposal

2010-06-07 Thread Ben Finney
alex23 writes: > What gets me is the implicit attitude in some of these posts that it's > just so _obvious_ that something needs to be done and it's simply that > _everyone else_ is either stupid, lazy or biased towards actually > existing code. When deciding what code is valuable and what's not

Re: if, continuation and indentation

2010-06-07 Thread Greg Couch
On May 27, 5:22 am, HH wrote: > I have a question about best practices when it comes to line wrapping/ > continuation and indentation, specifically in the case of an if > statement. > > When I write an if statement with many conditions, I prefer to use a > parenthesis around the whole block and ge

Re: GUIs - A Modest Proposal

2010-06-07 Thread rantingrick
On Jun 7, 11:51 pm, alex23 wrote: Of course i was just being theatrical alex, i hope your last post was in the same manner. However your right about everything you said except your accusations that i am not willing to help bring this into reality -- i just need to find the right base... and i m

Re: GUIs - A Modest Proposal

2010-06-07 Thread alex23
rantingrick wrote: > The problem is getting a large enough group of Python users to agree > on anything about GUIs. No, the problem is it's a lot easier to find fault than it is to provide a solution. And that maybe, just maybe, other people don't want to have to do your dirty work for you. > I

Re: GUIs - A Modest Proposal

2010-06-07 Thread Stephen Hansen
> > However as i have mentioned before there will NEVER be a crowd of us > marching in the streets behind one GUI. People are just too busy to > get involved. This has to be an executive decision. The powers that be > must make the change themselves or it will never happen -- i can > guarantee that

Re: GUIs - A Modest Proposal

2010-06-07 Thread Michael Torrie
On 06/07/2010 09:19 PM, rantingrick wrote: > On Jun 7, 5:05 pm, Michael Torrie wrote: > >> Thus for Python to really be successful in a broader sense, we need >> good, solid, bindings for Cocoa, or Windows forms (whatever they are >> using these days), as well as the most popular windows toolkits

Re: GUIs - A Modest Proposal

2010-06-07 Thread rantingrick
On Jun 7, 5:05 pm, Michael Torrie wrote: > Thus for Python to really be successful in a broader sense, we need > good, solid, bindings for Cocoa, or Windows forms (whatever they are > using these days), as well as the most popular windows toolkits.  We > don't need another Swing.  As someone else

Re: GUIs - A Modest Proposal

2010-06-07 Thread rantingrick
On Jun 7, 1:29 pm, Terry Reedy wrote: > Ant > I agree that the current tk situation is not completely satisfactory. In > particular, the IO facilities are inadequate and have not, to my > knowledge, changed in a decade. Image input formats are limited. There > is no canvas output as an image. (Out

Re: GUIs - A Modest Proposal

2010-06-07 Thread Gregory Ewing
Terry Reedy wrote: pygui ... has its own problems. ... the api sytle is not standard in Python (get_xx and set_xx methods instead of direct access or properties); That was only true in a very early version of PyGUI. Properties are used very extensively now. (It uses get_xxx and set_xxx method

PyCon Australia 2010 registration deadline reminder

2010-06-07 Thread Richard Jones
Hi everyone, PyCon Australia 2010, to be held at the Sydney Masonic Center over the weekend of June 26 and 27, is drawing ever closer. REGISTRATION WILL CLOSE JUNE 22! We will NOT be accepting registrations at the door. Register here: http://pycon-au.org/reg We offer two levels of registration

Re: GUIs - A Modest Proposal

2010-06-07 Thread Terry Reedy
On 6/7/2010 5:25 PM, Arndt Roger Schneider wrote: Terry Reedy schrieb: ... Hah, You are ill-informed. How about 'under-informed'? That I readily admit ;-) tkpath 0.3 contains a surface element, which renders vector graphics elements in an off-screen tk image. As far as I know, tkpath is

Re: GUIs - A Modest Proposal

2010-06-07 Thread Grant Edwards
On 2010-06-06, ant wrote: > On Jun 6, 2:22?pm, ant wrote: >> I get the strong feeling that nobody is really happy with the state of >> Python GUIs. > > > What an interesting set of responses I got! And - even more > interesting - how few of them actually seem to think there is a > problem, I rar

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

2010-06-07 Thread Cameron Laird
QOTW: "... it's just laziness and hubris passed off under the banner of agility." - Clifford Heath, on the fashion of justification of "metaschemas" because those darn data architects are just too slow Efficient way to apply a function to every element in a list, discarding the results:

Re: Which objects are expanded by double-star ** operator?

2010-06-07 Thread Ian Kelly
On Mon, Jun 7, 2010 at 4:03 PM, Peter Otten <__pete...@web.de> wrote: > The following experiment shows that you only need to implement a keys() and > __getitem__() method. > > $ cat kw.py > class A(object): >    def keys(self): return list("ab") >    def __getitem__(self, key): >        return 42 >

Re: Plotting in batch with no display

2010-06-07 Thread Mark Lawrence
On 07/06/2010 08:41, Hans Georg Schaathun wrote: On Sat, 5 Jun 2010 16:10:01 + (UTC), Tim Harig wrote: : On 2010-06-05, Hans Georg Schaathun wrote: :> Raster graphics is not good enough, I will need a backend which :> does vector graphics and pdf output. AFAICS from the FAQ at :> s

Re: GUIs - A Modest Proposal

2010-06-07 Thread Michael Torrie
On 06/06/2010 04:55 PM, ant wrote: > What an interesting set of responses I got! > And - even more interesting - how few of them actually seem to think > there is a problem, let > alone make any attempt to move the situation forward. You simply haven't made a case that there is a problem to be sol

Re: Which objects are expanded by double-star ** operator?

2010-06-07 Thread Peter Otten
kkumer wrote: > > I have to merge two dictionaries into one, and in > a "shallow" way: changing items should be possible > by operating either on two parents or on a > new dictionary. I am open to suggestions how > to do this (values are always numbers, BTW), but > I tried to do it by creating a

Re: Which objects are expanded by double-star ** operator?

2010-06-07 Thread Terry Reedy
The answer depends on the version: in 2.5 "If the syntax "**expression" appears in the function call, "expression" must evaluate to a (subclass of) dictionary, " in 3.1 "If the syntax **expression appears in the function call, expression must evaluate to a mapping," ReferenceManual.Epressions

Re: Which objects are expanded by double-star ** operator?

2010-06-07 Thread Dave Angel
kkumer wrote: I have to merge two dictionaries into one, and in a "shallow" way: changing items should be possible by operating either on two parents or on a new dictionary. I am open to suggestions how to do this (values are always numbers, BTW), but I tried to do it by creating a dict-like clas

Re: GUIs - A Modest Proposal

2010-06-07 Thread Michael Torrie
On 06/06/2010 02:13 AM, Gabriele Lanaro wrote: > I'd really like to s/tkinter/WxWidgets/g, the multiplatformness is (almost) > the same but wx looks infinitely better. IMHO a good intention is to best > the API of wx. Does WX still do weird things like use event message maps instead of a sane sign

Re: python2.5 x python2.6 in interactive mode

2010-06-07 Thread Thomas Jollans
On 06/07/2010 01:43 PM, Alan wrote: > Hi there, > > I have a code with a 'exit()' at the end. We run it usually as: > > python2.5 -i code.py > > and if everything is fine, the 'exit()' is called and there's no > interactive terminal. You could instead do something like this: try: # ... except:

Re: GUIs - A Modest Proposal

2010-06-07 Thread Arndt Roger Schneider
Terry Reedy schrieb: Ant I agree that the current tk situation is not completely satisfactory. In particular, the IO facilities are inadequate and have not, to my knowledge, changed in a decade. Image input formats are limited. There is no canvas output as an image. (Output of the canvase dis

Re: Python + vim + spaces vs tab

2010-06-07 Thread Hans Mulder
Jean-Michel Pichavant wrote: Hello, Does anyone knows a way to configure vim so it automatically select to correct expandtab value depending on the current buffer 'way of doing' ? I need to edit different files, some are using spaces, others tabs. Those belong to different projects, and changi

Re: vector addition

2010-06-07 Thread Dan Stromberg
On Mon, Jun 7, 2010 at 1:16 PM, Thomas Jollans wrote: > On 06/07/2010 07:45 PM, Dan Stromberg wrote: > > > Call me strange, but I regard this as a good place to use a functional > style - IE, to use reduce, and furthermore I regard this as a good example > of why reduce is useful for more than j

Re: Which objects are expanded by double-star ** operator?

2010-06-07 Thread Ian Kelly
On Mon, Jun 7, 2010 at 2:17 PM, kkumer wrote: > > I have to merge two dictionaries into one, and in > a "shallow" way: changing items should be possible > by operating either on two parents or on a > new dictionary. I am open to suggestions how > to do this (values are always numbers, BTW), but >

Re: PyQt signals/slots dialogs question

2010-06-07 Thread Thomas Jollans
On 06/07/2010 08:21 PM, AlienBaby wrote: > On Jun 7, 5:21 pm, AlienBaby wrote: > >> My real aim here is to learn pyqt, so I would rather not the the >> QWizard process until I understand myself whats going on behind the >> scenes. >> > Perhaps I posted to early, but a little more perserver

Re: Which objects are expanded by double-star ** operator?

2010-06-07 Thread Thomas Jollans
On 06/07/2010 10:17 PM, kkumer wrote: > I have to merge two dictionaries into one, and in > a "shallow" way: changing items should be possible > by operating either on two parents or on a > new dictionary. I am open to suggestions how > to do this (values are always numbers, BTW), but > I tried to

Re: Plotting in batch with no display

2010-06-07 Thread Tim Harig
On 2010-06-07, Hans Georg Schaathun wrote: > On Sat, 5 Jun 2010 16:10:01 + (UTC), Tim Harig > wrote: >: On 2010-06-05, Hans Georg Schaathun wrote: >: > Raster graphics is not good enough, I will need a backend which >: > does vector graphics and pdf output. AFAICS from the FAQ at >: > sou

Re: vector addition

2010-06-07 Thread Thomas Jollans
On 06/07/2010 07:45 PM, Dan Stromberg wrote: > > Call me strange, but I regard this as a good place to use a functional > style - IE, to use reduce, and furthermore I regard this as a good > example of why reduce is useful for more than just summing numbers: > > #!/disc/gx/sdfw/dans/python26/bin/py

Re: Importing modules

2010-06-07 Thread Dan Stromberg
On Sun, Jun 6, 2010 at 8:16 PM, Ben Finney > wrote: > Anthony Papillion writes: > > > import os > > > > os.path.append('$HOME/gsutils/boto') > > > > thinking I could then successfully do the import boto statement. > > Nope. > > You'll need to give the literal path. Substitution of environment >

Which objects are expanded by double-star ** operator?

2010-06-07 Thread kkumer
I have to merge two dictionaries into one, and in a "shallow" way: changing items should be possible by operating either on two parents or on a new dictionary. I am open to suggestions how to do this (values are always numbers, BTW), but I tried to do it by creating a dict-like class that just for

Re: Plotting in batch with no display

2010-06-07 Thread Hans Georg Schaathun
On Sat, 5 Jun 2010 16:10:01 + (UTC), Tim Harig wrote: : On 2010-06-05, Hans Georg Schaathun wrote: : > Raster graphics is not good enough, I will need a backend which : > does vector graphics and pdf output. AFAICS from the FAQ at : > sourceforge, agg only supports raster and png. Cairo

Re: Reading file bit by bit

2010-06-07 Thread Terry Reedy
On 6/7/2010 6:20 AM, Ulrich Eckhardt wrote: Ulrich Eckhardt wrote: data = f.read() for byte in data: for i in range(8): bit = 2**i& byte ... Correction: Of course you have to use ord() to get from the single-element string ("byte" above) to its integral

Re: Missing DLL in win98

2010-06-07 Thread Terry Reedy
On 6/7/2010 8:15 AM, Jean-Michel Pichavant wrote: Spyder42 wrote: On Fri, 04 Jun 2010 14:03:48 -0400, Terry Reedy It was not obvious, without closely reading your original post... So it WAS obvious to anyone who was PAYING ATTENTION? That is not what I said, as indicated by a further line

Re: GUIs - A Modest Proposal

2010-06-07 Thread Terry Reedy
Ant I agree that the current tk situation is not completely satisfactory. In particular, the IO facilities are inadequate and have not, to my knowledge, changed in a decade. Image input formats are limited. There is no canvas output as an image. (Output of the canvase display list as a dialect

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
On Jun 7, 5:21 pm, AlienBaby wrote: > My real aim here is to learn pyqt, so I would rather not the the > QWizard process until I understand myself whats going on behind the > scenes. Perhaps I posted to early, but a little more perserverance and I have managed to unthaw the brain and move forward

Re: vector addition

2010-06-07 Thread Dan Stromberg
Call me strange, but I regard this as a good place to use a functional style - IE, to use reduce, and furthermore I regard this as a good example of why reduce is useful for more than just summing numbers: #!/disc/gx/sdfw/dans/python26/bin/python import collections def count_first_letters(dictio

Re: os.path.normpath question

2010-06-07 Thread Peter Otten
Bart wrote: > I'm using this and ran across backslash issues in one of my paths. > > archpath = os.path.normpath('E:\foo\FTP\HLS\archive') > > was translating to: > > E:\lsfprod\law\uch_interfaces\FTP\HLSrchive > > which caused me to start using the 'raw' declaration before the path

Re: Python + vim + spaces vs tab

2010-06-07 Thread Neil Cerutti
On 2010-06-07, Jean-Michel Pichavant wrote: > Hello, > > Does anyone knows a way to configure vim so it automatically > select to correct expandtab value depending on the current > buffer 'way of doing' ? I need to edit different files, some > are using spaces, others tabs. Those belong to differe

Python + vim + spaces vs tab

2010-06-07 Thread Jean-Michel Pichavant
Hello, Does anyone knows a way to configure vim so it automatically select to correct expandtab value depending on the current buffer 'way of doing' ? I need to edit different files, some are using spaces, others tabs. Those belong to different projects, and changing all spaces to tabs is not

Re: GUIs - A Modest Proposal

2010-06-07 Thread Lie Ryan
On 06/07/10 20:18, Adam Tauno Williams wrote: > On Mon, 2010-06-07 at 13:19 +1000, Lie Ryan wrote: >> On 06/07/10 12:18, Adam Tauno Williams wrote: >>> But then I don't know any of the local Python devs who use IDLE; the >>> IDE landscape for Python is very fragmented, which disincentives that >>

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
My real aim here is to learn pyqt, so I would rather not the the QWizard process until I understand myself whats going on behind the scenes. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
On Jun 7, 4:37 pm, Phil Thompson wrote: > On Mon, 7 Jun 2010 08:22:07 -0700 (PDT), AlienBaby > > wrote: > > > > > > > Hi, > > > I'm just starting to get to grips with PyQt, and I'm having a bit of > > trouble connecting slots / signals, or understanding how I should do > > so to achieve what I am

os.path.normpath question

2010-06-07 Thread Bart
I'm using this and ran across backslash issues in one of my paths. archpath = os.path.normpath('E:\foo\FTP\HLS\archive') was translating to: E:\lsfprod\law\uch_interfaces\FTP\HLSrchive which caused me to start using the 'raw' declaration before the path string like this: archpat

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
I've made a little progress; This appears to setup a connection that fires when the welcomeNext button in the Welcome dialog is clicked; self.Welcome.welcomeNext.connect(self.Welcome.welcomeNext,QtCore.SIGNAL("clicked()"),self.WelcomeNext) In the StartQT4 class I now have the WelcomeNext method

Re: PyQt signals/slots dialogs question

2010-06-07 Thread Phil Thompson
On Mon, 7 Jun 2010 08:22:07 -0700 (PDT), AlienBaby wrote: > Hi, > > I'm just starting to get to grips with PyQt, and I'm having a bit of > trouble connecting slots / signals, or understanding how I should do > so to achieve what I am after. > > I am trying to write an application that will displ

Re: GUIs - A Modest Proposal

2010-06-07 Thread Carl Banks
On Jun 7, 3:08 am, ant wrote: > I rather feel like I'm flogging a dead horse here, but time for > another mile... > > First off, I'm not volunteering to lead this effort. I don't think > anyone should > even think about that until and unless the Python Powers That Be > actually > decide that it is

PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
Hi, I'm just starting to get to grips with PyQt, and I'm having a bit of trouble connecting slots / signals, or understanding how I should do so to achieve what I am after. I am trying to write an application that will display a sequence of dialogs, with back / next / cancel buttons to step throu

Re: Python Forum

2010-06-07 Thread python
> However, it would be nice to have an expire function so that messages that I > don't read for a specified time simply disappear. Do any email clients do > that? I use Fastmail.fm as my email service (and browser based email client). Fastmail supports the ability to automatically delete message

Re: GUIs - A Modest Proposal

2010-06-07 Thread Mark Lawrence
On 07/06/2010 04:31, Carl Banks wrote: On Jun 5, 7:22 pm, ant wrote: I get the strong feeling that nobody is really happy with the state of Python GUIs. Tkinter is not widely liked, but is widely distributed. WxPython and PyGtk are both powerful, but quirky in different ways. PyQt is tied to on

Re: GUIs - A Modest Proposal

2010-06-07 Thread python
Ant, Have you checked out the Dabo framework? Dabo provides a set of tools and underlying framework that makes VB style GUI development possible using Python. Dabo is designed to be GUI framework independent however it currently only supports wxPython. Dabo has a very friendly and helpful mailin

Re: GUIs - A Modest Proposal

2010-06-07 Thread Mark Lawrence
On 06/06/2010 22:11, rantingrick wrote: On Jun 6, 2:06 pm, Mark Lawrence wrote: On 06/06/2010 16:31, rantingrick wrote: On Jun 5, 9:22 pm, antwrote: I ask the group; should we try to create a new GUI for Python, with the following properties?: - Pythonic - The default GUI (so it r

Re: Reading file bit by bit

2010-06-07 Thread Grant Edwards
On 2010-06-07, Richard Thomas wrote: > You're reading those bits backwards. You want to read the most > significant bit of each byte first... Can you explain the reasoning behind that assertion? -- Grant Edwards grant.b.edwardsYow! I can't decide which

Re: Drop Table w/ MySQLdb?

2010-06-07 Thread Mark Lawrence
On 06/06/2010 21:20, Dennis Lee Bieber wrote: On Sun, 6 Jun 2010 11:07:25 -0400, Victor Subervi declaimed the following in gmane.comp.python.general: Hi; I tried this: cursor.execute('drop table tmp%s', tmpTable) ONCE AGAIN... Database SCHEMA entities must be formatte

Re: GUIs - A Modest Proposal

2010-06-07 Thread Steven D'Aprano
On Mon, 07 Jun 2010 03:08:19 -0700, ant wrote: > First off, I'm not volunteering to lead this effort. I don't think > anyone should > even think about that until and unless the Python Powers That Be > actually > decide that it is worth doing. That is what I meant by 'strong > leadership'. You hav

Re: Tkinter help - Why this behavior ? (py3)

2010-06-07 Thread Alf P. Steinbach
* Dodo, on 07.06.2010 12:38: Le 05/06/2010 19:07, Alf P. Steinbach a écrit : * Dodo, on 05.06.2010 15:46: Hi, let's consider this exemple : from tkinter import * from tkinter.ttk import * class First: def __init__(self): self.root = Tk() B = Button(self.root, command=self.op) B.pack() self.

Re: Reading file bit by bit

2010-06-07 Thread Ulrich Eckhardt
superpollo wrote: > mine goes like this: > > >>> bin(192) > Traceback (most recent call last): >File "", line 1, in > NameError: name 'bin' is not defined Yep, one of mine, too. The "bin" function was new in 2.6, as were binary number literals ("0b1100"). Uli -- Sator Laser GmbH Geschäft

Re: GUIs - A Modest Proposal

2010-06-07 Thread Ben Finney
ant writes: > First off, I'm not volunteering to lead this effort. I don't think > anyone should even think about that until and unless the Python Powers > That Be actually decide that it is worth doing. That is what I meant > by 'strong leadership'. In that case, you have rather a misconception

Re: Missing DLL in win98

2010-06-07 Thread Jean-Michel Pichavant
Spyder42 wrote: On Fri, 04 Jun 2010 14:03:48 -0400, Terry Reedy wrote: On 6/4/2010 9:08 AM, Spyder42 wrote: On Fri, 04 Jun 2010 14:50:28 +0200, Christian Heimes Python 2.6 is not supported on Windows 98 and earlier. You need at least Windows 2000 with a recent service pack. C

Re: Reading file bit by bit

2010-06-07 Thread superpollo
Ulrich Eckhardt ha scritto: Peter Otten wrote: Ulrich Eckhardt wrote: Says Python: bin(192) '0x1100' Hmm, if that's what /your/ Python says, here's mine to counter: bin(192) '0_totally_faked_binary_0011' Argh! Of course one of my Pythons says '0b1100' and not what I mistype

Re: Reading file bit by bit

2010-06-07 Thread Ulrich Eckhardt
Peter Otten wrote: > Ulrich Eckhardt wrote: >> Says Python: >> > bin(192) >> '0x1100' > > Hmm, if that's what /your/ Python says, here's mine to counter: > bin(192) > '0_totally_faked_binary_0011' Argh! Of course one of my Pythons says '0b1100' and not what I mistyped above

Re: Reading file bit by bit

2010-06-07 Thread Peter Otten
Ulrich Eckhardt wrote: > Nobody wrote: >> On Mon, 07 Jun 2010 02:31:08 -0700, Richard Thomas wrote: >> >>> You're reading those bits backwards. You want to read the most >>> significant bit of each byte first... >> >> Says who? > > Says Python: > bin(192) > '0x1100' Hmm, if that's wh

python2.5 x python2.6 in interactive mode

2010-06-07 Thread Alan
Hi there, I have a code with a 'exit()' at the end. We run it usually as: python2.5 -i code.py and if everything is fine, the 'exit()' is called and there's no interactive terminal. However, doing the same above with python2.6 and I got: amadeus[2738]:~/TMP% python2.6 -i thread_ping.py Traceba

Simple hack to get $500 to your home.

2010-06-07 Thread SUHASINI
Simple hack to get $500 to your home at http://mastidunia.tk Due to high security risks,i have hidden the cheque link in an image. in that website on left side below search box, click on image and enter your name and address where you want to receive your cheque.please dont tell to anyone. -- ht

Re: Reading file bit by bit

2010-06-07 Thread Ulrich Eckhardt
Nobody wrote: > On Mon, 07 Jun 2010 02:31:08 -0700, Richard Thomas wrote: > >> You're reading those bits backwards. You want to read the most >> significant bit of each byte first... > > Says who? Says Python: >>> bin(192) '0x1100' That said, I totally agree that there is no inherently rig

Re: map is useless!

2010-06-07 Thread James Mills
On Mon, Jun 7, 2010 at 9:20 AM, Steven D'Aprano wrote: >> Ruby has a very nice map > > I'm thrilled for them. Personally I think the syntax is horrible. I concur! --James -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading file bit by bit

2010-06-07 Thread Nobody
On Mon, 07 Jun 2010 02:31:08 -0700, Richard Thomas wrote: > You're reading those bits backwards. You want to read the most > significant bit of each byte first... Says who? There is no universal standard for bit-order. Among bitmap image formats, XBM is LSB-first while BMP and PBM are MSB-first

Re: Tkinter help - Why this behavior ? (py3)

2010-06-07 Thread Dodo
Le 05/06/2010 19:07, Alf P. Steinbach a écrit : * Dodo, on 05.06.2010 15:46: Hi, let's consider this exemple : from tkinter import * from tkinter.ttk import * class First: def __init__(self): self.root = Tk() B = Button(self.root, command=self.op) B.pack() self.root.mainloop() def op(self):

Re: Reading file bit by bit

2010-06-07 Thread Peter Otten
Richard Thomas wrote: > On Jun 7, 10:17 am, Peter Otten <__pete...@web.de> wrote: >> Alfred Bovin wrote: >> > I'm working on something where I need to read a (binary) file bit by >> > bit and do something depending on whether the bit is 0 or 1. >> >> > Any help on doing the actual file reading is

Re: GUIs - A Modest Proposal

2010-06-07 Thread Simon Hibbs
On 6 June, 23:55, ant wrote: >If we are to make progress, I can see two obvious approaches: >1) Improve Tkinter to the point where it is supportable and supported >by a good fraction of Python programmers >or >2) Drop Tkinter as the default and use something else. IIRC Guido has ruled out offici

Re: Reading file bit by bit

2010-06-07 Thread Lie Ryan
On 06/07/10 19:31, Richard Thomas wrote: > On Jun 7, 10:17 am, Peter Otten <__pete...@web.de> wrote: >> Alfred Bovin wrote: >>> I'm working on something where I need to read a (binary) file bit by bit >>> and do something depending on whether the bit is 0 or 1. >> >>> Any help on doing the actual f

Re: Reading file bit by bit

2010-06-07 Thread Ulrich Eckhardt
Ulrich Eckhardt wrote: >data = f.read() >for byte in data: >for i in range(8): >bit = 2**i & byte >... Correction: Of course you have to use ord() to get from the single-element string ("byte" above) to its integral value first. Uli -- Sator Laser GmbH Ge

Re: GUIs - A Modest Proposal

2010-06-07 Thread Adam Tauno Williams
On Mon, 2010-06-07 at 13:19 +1000, Lie Ryan wrote: > On 06/07/10 12:18, Adam Tauno Williams wrote: > > On Mon, 2010-06-07 at 11:11 +1000, Lie Ryan wrote: > >> On 06/07/10 10:48, Adam Tauno Williams wrote: > >>> On Sun, 2010-06-06 at 17:03 -0700, AD. wrote: > On Jun 7, 10:55 am, ant wrote: > >

Re: GUIs - A Modest Proposal

2010-06-07 Thread Nobody
On Sun, 06 Jun 2010 15:55:41 -0700, ant wrote: > If we are to make progress, I can see two obvious approaches: > 1) Improve Tkinter to the point where it is supportable and supported > by a good fraction of Python programmers > or > 2) Drop Tkinter as the default and use something else. You forgo

Re: GUIs - A Modest Proposal

2010-06-07 Thread ant
I rather feel like I'm flogging a dead horse here, but time for another mile... First off, I'm not volunteering to lead this effort. I don't think anyone should even think about that until and unless the Python Powers That Be actually decide that it is worth doing. That is what I meant by 'strong

Re: weird pickle behavior in Python 3.1.2 + Eclipse 3.5.2

2010-06-07 Thread Peter Otten
kirby.ur...@gmail.com wrote: > On Jun 4, 9:47 am, Peter Otten <__pete...@web.de> wrote: > >> I can provoke the error in "naked" Python 3 by changing the >> Example.__module__ attribute: >> >> Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00) >> [GCC 4.4.1] on linux2 >> Type "help", "copyright", "

Re: Reading file bit by bit

2010-06-07 Thread Richard Thomas
On Jun 7, 10:17 am, Peter Otten <__pete...@web.de> wrote: > Alfred Bovin wrote: > > I'm working on something where I need to read a (binary) file bit by bit > > and do something depending on whether the bit is 0 or 1. > > > Any help on doing the actual file reading is appreciated. > > The logical u

Re: Reading file bit by bit

2010-06-07 Thread Peter Otten
Alfred Bovin wrote: > I'm working on something where I need to read a (binary) file bit by bit > and do something depending on whether the bit is 0 or 1. > > Any help on doing the actual file reading is appreciated. The logical unit in which files are written is the byte. You can split the byte

Re: Reading file bit by bit

2010-06-07 Thread Ulrich Eckhardt
Alfred Bovin wrote: > I'm working on something where I need to read a (binary) file bit by bit > and do something depending on whether the bit is 0 or 1. Well, smallest unit you can read is an octet/byte. You then check the individual digits of the byte using binary masks. f = open(...) da

Reading file bit by bit

2010-06-07 Thread Alfred Bovin
Hi all. I'm working on something where I need to read a (binary) file bit by bit and do something depending on whether the bit is 0 or 1. Any help on doing the actual file reading is appreciated. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

food-for-gold

2010-06-07 Thread ekr3d
Disasters age food-for-gold gold-ekramy.blogspot.com/2010/05/zimbabwe-gold-for-bread.html -- http://mail.python.org/mailman/listinfo/python-list

Re: threading and atexit: different behaviour in python2.6 from 2.5

2010-06-07 Thread Alan
Thanks MRAB. setDaemon gave some hope. Alan On Fri, Jun 4, 2010 at 16:46, wrote: > Alan wrote: > >> Hi there, >> >> That's another try to get help about this issue I am facing. To help you >> to help me here goes a simple example. This is a very simplification of a >> very complex code. >> >> -

Re: Importing modules

2010-06-07 Thread Anthony Papillion
On Jun 6, 10:16 pm, Ben Finney wrote: > Anthony Papillion writes: > > import os > > > os.path.append('$HOME/gsutils/boto') > > > thinking I could then successfully do the import boto statement. > > Nope. > > You'll need to give the literal path. Substitution of environment > variables isn't perfo