Re: Python bug? Indexing to matrices

2011-07-11 Thread Ben Finney
David writes: > Should the following line work for defining a matrix with zeros? > > c= [[0]*col]*row No. Python lists are not matrixes and are not arrays. If you want good implementations of arrays and matrices, use NumPy http://numpy.scipy.org/>. -- \ “Properly read, the Bible is the

Re: Please Help with vertical histogram

2011-07-11 Thread Thorsten Kampe
* Cathy James (Mon, 11 Jul 2011 19:42:10 -0500) > Please kindly help- i have a project where I need to plot dict results > as a histogram. I just can't get the y- axis to print right. May > someone please help? I have pulled my hair for the past two weeks, I > am a few steps ahead, but stuck for no

Re: Python bug? Indexing to matrices

2011-07-11 Thread Chris Rebert
On Mon, Jul 11, 2011 at 10:39 PM, David wrote: > Should the following line work for defining a matrix with zeros? > > c= [[0]*col]*row > > where "col" is the number of columns in the matrix and "row" is of > course the number of rows. Nope. See the FAQ: http://docs.python.org/faq/programming.html

Python bug? Indexing to matrices

2011-07-11 Thread David
Should the following line work for defining a matrix with zeros? c= [[0]*col]*row where "col" is the number of columns in the matrix and "row" is of course the number of rows. If this a valid way of initializing a matrix in Python 3.2.1, then it appears to me that a bug surfaces in Python when p

Re: Why isn't there a good RAD Gui tool for python

2011-07-11 Thread Hansmeet Singh
lol isnt billy mays dead On 7/11/11, Billy Mays wrote: > On 07/11/2011 02:59 PM, Elias Fotinis wrote: >> On Mon, 11 Jul 2011 20:11:56 +0300, Stefan Behnel >> wrote: >> >>> Just a quick suggestion regarding the way you posed your question. It's >>> usually better to ask if anyone knows a good too

Questions about os.waitpid(pid, options) on windows

2011-07-11 Thread Fan
It seems that waitpid take process handle instead of process id as the first parameter on Windows. On Unices platform, the first parameter is process id. This interface is a little bit confusing. What's the purpose for such a design? Thanks a lot, Fan -- http://mail.python.org/mailman/listinfo/

Re: Lisp refactoring puzzle

2011-07-11 Thread Xah Lee
2011-07-11 On Jul 11, 6:51 am, jvt wrote: > I might as well toss my two cents in here.  Xah, I don't believe that > the functional programming idiom demands that we construct our entire > program out of compositions and other combinators without ever naming > anything.  That is much more the pro

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 12 Jul, 01:33, Dave Cook wrote: > I prefer spec-generators (almost all generate XML these days) like > QtDesigner to code-generators like Boa. I've only seen one good > argument for code generation, and that's to generate code for a layout > to "see how it's done".  But code could always be ge

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 12 Jul, 01:33, Dave Cook wrote: > I prefer spec-generators (almost all generate XML these days) like > QtDesigner to code-generators like Boa. I've only seen one good > argument for code generation, and that's to generate code for a layout > to "see how it's done". But code could always be ge

Re: Finding duplicated photo

2011-07-11 Thread Kevin Zhang
On Mon, Jul 11, 2011 at 10:50 PM, Fulvio wrote: > > > I found that isn't python 3 code :( > > It's written in python 2.6. > Then the code should go into some other program to allow actions on those > pictures which are matching each other. Am I right? > > The leverages PIL to get the job done.

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Ben Finney
Ivan Kljaic writes: > My comPany would switch to python but they complained that there is > not even one single gui builder or framework that can allow it to make > a living from it. That response from your company is a non sequitur. What does “one single gui builder or framework” have to do wit

Re: Please Help with vertical histogram

2011-07-11 Thread Dan Stromberg
I have a histogram script in Python at http://stromberg.dnsalias.org/svn/histogram/trunk/ It's under a UCI (BSD-like) license. Feel free to use it or borrow ideas from it. On Mon, Jul 11, 2011 at 5:42 PM, Cathy James wrote: > Please kindly help- i have a project where I need to plot dict resul

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Gregory Ewing
Chris Angelico wrote: either brain something'd (keeping this G-rated) or an orangutan, There's a certain librarian who might take issue with your lumping orangutans in with the brain-something'd... -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Please Help with vertical histogram

2011-07-11 Thread Cathy James
Please kindly help- i have a project where I need to plot dict results as a histogram. I just can't get the y- axis to print right. May someone please help? I have pulled my hair for the past two weeks, I am a few steps ahead, but stuck for now. def histo(his_dict = {1:16, 2:267, 3:267, 4:169,

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Dan Stromberg
On Mon, Jul 11, 2011 at 8:28 AM, Ian Kelly wrote: > On Mon, Jul 11, 2011 at 8:50 AM, Sébastien Volle > wrote: > > Could it have been made optional, like the trailing comma in list > > declaration? > > Cobra makes the colons optional, so probably yes. > -- > http://mail.python.org/mailman/listinf

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Dave Cook
On 2011-07-10, Ivan Kljaic wrote: > a lot of times. But seriously. Why is the not even one single RAD tool > for Python. I mean what happened to boa constructor that it stopped > developing. I simply do not see any reasons why there isn't anything. I prefer spec-generators (almost all generate XM

Re: parsing packets

2011-07-11 Thread Dan Stromberg
On Sun, Jul 10, 2011 at 1:59 PM, Littlefield, Tyler wrote: > Hello all: > I'm working on a server that will need to parse packets sent from a client, > and construct it's own packets. > I like to use this module (I wrote while in the employ of UCI, so it's under a UCI - BSDesque - license, but th

Re: parsing packets

2011-07-11 Thread Dan Stromberg
On Mon, Jul 11, 2011 at 5:05 AM, Thomas Rachel < nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de> wrote: > Am 10.07.2011 22:59 schrieb Littlefield, Tyler: > > Hello all: >> I'm working on a server that will need to parse packets sent from a >> client, and construct it's own pac

Re: perceptron feed forward neural networks in python

2011-07-11 Thread Igor Begić
thx, bye On Mon, Jul 11, 2011 at 8:47 PM, Ken Watford wrote: > On Mon, Jul 11, 2011 at 2:31 PM, Igor Begić wrote: > > Hi, > > I,m new to Python and i want to study and write programs about perceptron > > feed forward neural networks in python. Does anyone have a good book or > link > > for this?

Re: Newbie help - Programming the Semantic Web with Python

2011-07-11 Thread Bruce Whealton
This didn't seem to work either. I was getting errors the number of arguments expected being two, when I changed to def add (self, args): I seem to remember that if I removed the parentheses around sub, pred, obj, it worked. I thought that was how it worked. What is strange is that this is n

Re: Problem compiling Python 3.2 in 32bit on Snow Leopard

2011-07-11 Thread Ned Deily
In article , Ned Deily wrote: > In article <8t5vunfca...@mid.individual.net>, > Gregory Ewing wrote: > > Attempting to compile Python 3.2 in 32-bit mode > > on MacOSX 10.6.4 I get: > > > > Undefined symbols: > >"___moddi3", referenced from: > >_PyThread_acquire_lock_timed in libpyt

Read SAS files with Python?

2011-07-11 Thread Jones, Rebecca
Apologies in advance if this is already a time-worn question! We are essentially a "SAS shop" and use Base SAS, Enterprise Guide and E-Miner for statistical and predictive modeling purposes, often working on big datasets (30M rows of 100+ columns). There are some applications for which we have

Re: How to compile on OS X PPC? was: Re: [RELEASED] Python 3.2

2011-07-11 Thread Ned Deily
In article , Ned Deily wrote: > In article <4d640175$0$81482$e4fe5...@news.xs4all.nl>, > Irmen de Jong wrote: > > However, I'm having trouble compiling a framework build from source on > > Mac OS 10.5.8 on PowerPC. No matter what I try (gcc 4.0, gcc 4.2, > > different compiler options), the

Re: Function docstring as a local variable

2011-07-11 Thread Carl Banks
On Sunday, July 10, 2011 4:06:27 PM UTC-7, Corey Richardson wrote: > Excerpts from Carl Banks's message of Sun Jul 10 18:59:02 -0400 2011: > > print __doc__ > > > > Python 2.7.1 (r271:86832, Jul 8 2011, 22:48:46) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for mor

Re: Virtual functions are virtually invisible!

2011-07-11 Thread rantingrick
On Jul 11, 9:41 am, Chris Angelico wrote: > On Mon, Jul 11, 2011 at 11:42 PM, rantingrick wrote: > > This mandate must be handed down from the gods who reside on "Mount > > REFUSE-E-OUS to RECOGNIZE-E-OUS a major PROBLEM-O-MOUS" > > I assume you're trying to reference Mount Olympus where the Gree

Re: perceptron feed forward neural networks in python

2011-07-11 Thread sturlamolden
On 11 Jul, 20:47, Ken Watford wrote: > On Mon, Jul 11, 2011 at 2:31 PM, Igor Begić wrote: > > Hi, > > I,m new to Python and i want to study and write programs about perceptron > > feed forward neural networks in python. Does anyone have a good book or link > > for this? > > Try Stephen Marsland's

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 22:35, Kevin Walzer wrote: > One reason there hasn't been much demand for a GUI builder is that, in > many cases, it's just as simpler or simpler to code a GUI by hand. Often a GUI builder is used as a bad replacement for sketch-pad and pencil. With layout managers (cf. wxWidgets, Qt

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Kevin Walzer
On 7/11/11 2:28 PM, Ivan Kljaic wrote: Did you notice that 2 of these 4 are not for python? One is out of dTe and one has a fucked up licence. Sorry guys but there is not even one single rad gui tool for python as long as there is no serious guibuilder. One reason there hasn't been much demand

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 21:58, sturlamolden wrote: > http://wxformbuilder.org/ This Demo is using C++, it works the same with Python (wxPython code is generated similarly). http://zamestnanci.fai.utb.cz/~bliznak/screencast/wxfbtut1/wxFBTut1_controller.swf Sturla -- http://mail.python.org/mailman/listin

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread cjrh
On Monday, 11 July 2011 00:50:31 UTC+2, Ivan Kljaic wrote: > But seriously. Why is the not even one single RAD tool > for Python. I simply do not see any reasons why there isn't anything. > Please help me understand it. Any insights? The set of reasons that nobody else has made one is *exactly* t

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 20:28, Ivan Kljaic wrote: > The ony worthly ones mentioning as an gui builder are boa constructor > fo wx, qtDesigner with the famous licence problems why companies do > not want to work with it, sharpdevelop for ironpython and netbeans for > jython. There is wxFormBuilder for wxPytho

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 21:58, sturlamolden wrote: > That's eight. Sorry, nine ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 20:28, Ivan Kljaic wrote: > To summarize it. It would be very helpfull for python to spread if > there qould be one single good rad gui builder similar to vs or > netbeAns but for python. So right now if i need to make a gui app i > need to work with an applicatio that is dicontinued f

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.11 02:16 PM, Chris Angelico wrote: > You think Microsoft makes decisions and sticks with them? Look at > Office's last few versions. They can't decide on a file format, an > interface, a featureset... everything keeps changing. Of cou

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Chris Angelico
On Tue, Jul 12, 2011 at 4:52 AM, rantingrick wrote: > As we all know you only need three types of geometry management: >  * Linear (horizontal&vertical) >  * Grid >  * Absolute > I contend that Absolute is unnecessary and potentially dangerous. Grid and Box (linear) are the most flexible, but the

Re: Why isn't there a good RAD Gui tool for python

2011-07-11 Thread Billy Mays
On 07/11/2011 02:59 PM, Elias Fotinis wrote: On Mon, 11 Jul 2011 20:11:56 +0300, Stefan Behnel wrote: Just a quick suggestion regarding the way you posed your question. It's usually better to ask if anyone knows a good tool to do a specific job (which you would describe in your post), instead

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread rantingrick
On Jul 11, 1:28 pm, Ivan Kljaic wrote: > To summarize it. It would be very helpfull for python to spread if > there qould be one single good rad gui builder similar to vs or > netbeAns but for python. Well don't hold your breath friend because i have been ranting for years about the sad state of

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Chris Angelico
On Tue, Jul 12, 2011 at 4:28 AM, Ivan Kljaic wrote: > For how many years are this vui library wars going on. How many. Look. > I am a open source supporter but Windows will always kick the ass of > open source because the open source comunity can not make a decision. You think Microsoft makes dec

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Elias Fotinis
On Mon, 11 Jul 2011 20:11:56 +0300, Stefan Behnel wrote: Just a quick suggestion regarding the way you posed your question. It's usually better to ask if anyone knows a good tool to do a specific job (which you would describe in your post), instead of complaining about there being none. Opini

Re: A beginning programmer

2011-07-11 Thread Eric Griffith
Shell scripts are ones that I do all the time, sometimes in BASH sometimes in python + system calls. A lot of the mainly for post-install setups of Ubuntu / Fedora / Arch trying to take some of the load off of my hands in a way that I actually know what is going on behind the scenes. But I'll defin

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread rantingrick
On Jul 11, 1:03 pm, Chris Angelico wrote: > > The one time where point and click is majorly superior to scripted > design is with pixel positioning of widgets. You can drag things > around until you're artistically happy with them, rather than have to > fiddle with the numbers in code. This is tr

Re: perceptron feed forward neural networks in python

2011-07-11 Thread Ken Watford
On Mon, Jul 11, 2011 at 2:31 PM, Igor Begić wrote: > Hi, > I,m new to Python and i want to study and write programs about perceptron > feed forward neural networks in python. Does anyone have a good book or link > for this? Try Stephen Marsland's "Machine Learning: An Algorithmic Perspective". Al

perceptron feed forward neural networks in python

2011-07-11 Thread Igor Begić
Hi, I,m new to Python and i want to study and write programs about perceptron feed forward neural networks in python. Does anyone have a good book or link for this? Thx, Bye -- http://mail.python.org/mailman/listinfo/python-list

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Ivan Kljaic
Ok. I asked about this questio because I am working with python for the last 5 years and I am always in touch about signifigact things in Python. I am pissed of that I make my living by developing applications at work in Java an C#. My comPany would switch to python but they complained that there i

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Chris Angelico
On Tue, Jul 12, 2011 at 2:56 AM, rantingrick wrote: > It is very rare to need to "bang out" hundreds of lines of code to > replace a mouse click interface. If properly designed a good API can > compete with a GUI. In far less time than it takes me to scroll down a > list of widgets, pick the appro

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
So subclass B has no access to __not_here in A after all... OK, in one of legacy Python I supported there are a lot of code floating around like this. It works OK (in term of business logic and unit test). That's probably due to luck :-) It also uses a lot of __slot__ = ['attr_a', 'attr_b'...] in

Re: Property setter and lambda question

2011-07-11 Thread Ian Kelly
On Mon, Jul 11, 2011 at 11:21 AM, Anthony Kong wrote: > Awesome, Thomas. The trick only works if there is only one leading > underscore in the method names. > The following example works as I expected for the derived class B. > class A(object): >     def __init__(self): >         self.__not_here =

Re: Property setter and lambda question

2011-07-11 Thread Ian Kelly
On Mon, Jul 11, 2011 at 10:53 AM, Anthony Kong wrote: > Thanks again for your input, Thomas. > I normally prefer > not_here = property(lambda self: self.__get_not_here(), lambda self, v: > self.__set_not_here(v)) > than > not_here = property(__get_not_here, __set_not_here) > Because it allows me t

Re: Property setter and lambda question

2011-07-11 Thread John Posner
On 2:59 PM, Anthony Kong wrote: > So the question: is it possible to use lambda expression at all for > the setter? (As in the last, commented-out line) > > Python interpreter will throw an exception right there if I use the > last line ('SyntaxError: lambda cannot contain assignment'). I'd use >

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread rantingrick
On Jul 11, 11:33 am, rusi wrote: > A gui-builder reduces the semantic gap by showing a widget when the > programmer things 'widget.' > Banging out hundreds of lines in vi/emacs for the same purpose does a > measurably poorer job. It is very rare to need to "bang out" hundreds of lines of code to

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
> > PS: are you sure the lambda self: self.__foo() trick works, with > subclasses or otherwise? I haven't tested it, and I'm not saying it > doesn't, but I have a feeling double-underscore name mangling might be a > problem somewhere down the line? > > Awesome, Thomas. The trick only works if there

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Stefan Behnel
Ivan Kljaic, 11.07.2011 00:50: Ok Guys. I know that most of us have been expiriencing the need for a nice Gui builder tool for RAD and most of us have been googling for it a lot of times. But seriously. Why is the not even one single RAD tool for Python. Just a quick suggestion regarding the wa

Re: Property setter and lambda question

2011-07-11 Thread Thomas Jollans
# On 07/11/2011 06:53 PM, Anthony Kong wrote: # But decorator! Of course! Thanks for reminding me this. # # In your example, where does '@not_here' come from? (Sorry, this syntax # is new to me) class A(object): def __init__(self): self.not_here = 1 @property def not_here(se

Re: My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Thomas Jollans
On 07/11/2011 06:42 PM, Anthony Kong wrote: > Thomas, > > Thanks for the excellent suggestions. > > Generator is certainly an interesting subject. > > From what i understand, the advantage of generator is mainly about > saving memory, right? (i.e. no need to create a list in memory before > ite

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
Good point! Need to get my terminology right. Thanks On Tue, Jul 12, 2011 at 2:43 AM, Ian Kelly wrote: > On Mon, Jul 11, 2011 at 9:54 AM, Anthony Kong > wrote: > > Hi, all, > > This question is in the same context of my two earlier questions. This > > question was raised by some python beginner

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
Thanks again for your input, Thomas. I normally prefer not_here = property(lambda self: self.__get_not_here(), lambda self, v: self.__set_not_here(v)) than not_here = property(__get_not_here, __set_not_here) Because it allows me to have a pair getter/setter (when there is a need for it). Use o

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Speedbird
> On Windows, you're a customer and the developer wants to make using his > application as convenient as possible for you, the customer. > So the well-behavioured, good-intentioned windows devs are making sure the customer feels pampered and cozy, how nice and dandy. > On Unix you don't pay and t

Re: Property setter and lambda question

2011-07-11 Thread Ian Kelly
On Mon, Jul 11, 2011 at 9:54 AM, Anthony Kong wrote: > Hi, all, > This question is in the same context of my two earlier questions. This > question was raised by some python beginners, and I would like to check with > the list to ensure I provide a correct answer. > Here is a code snippet I used t

Re: My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Anthony Kong
Thomas, Thanks for the excellent suggestions. Generator is certainly an interesting subject. >From what i understand, the advantage of generator is mainly about saving memory, right? (i.e. no need to create a list in memory before iterate thru it) Duck typing... Although it can be easily demons

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread rusi
On Jul 11, 7:39 pm, Chris Angelico wrote: > On Tue, Jul 12, 2011 at 12:21 AM, sturlamolden wrote: > > You are probably aware that Unix and Unix customers have been around > > since the 1970s. I would expect the paradigm to be changed by now. > > The paradigm of small tools that do exactly what th

Re: Property setter and lambda question

2011-07-11 Thread Thomas Jollans
On 07/11/2011 05:54 PM, Anthony Kong wrote: > Hi, all, > > This question is in the same context of my two earlier questions. This > question was raised by some python beginners, and I would like to check > with the list to ensure I provide a correct answer. > > Here is a code snippet I used to de

Re: ctypes: point to buffer in structure

2011-07-11 Thread Wanderer
On Jul 11, 1:12 am, Tim Roberts wrote: > Jesse R wrote: > > >Hey I've been trying to convert this to run through ctypes and i'm > >having a hard time > > >typedef struct _SYSTEM_PROCESS_ID_INFORMATION > >{ > >    HANDLE ProcessId; > >    UNICODE_STRING ImageName; > >} SYSTEM_PROCESS_IMAGE_NAME_IN

Re: My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Thomas Jollans
On 07/11/2011 05:07 PM, Anthony Kong wrote: > Hi, all, > > Lately I am giving some presentations to my colleagues about the python > language. A new internal project is coming up which will require the use > of python. > > One of the goals of the presentations, as told by the 'sponsor' of the > p

Property setter and lambda question

2011-07-11 Thread Anthony Kong
Hi, all, This question is in the same context of my two earlier questions. This question was raised by some python beginners, and I would like to check with the list to ensure I provide a correct answer. Here is a code snippet I used to demonstrate the keyword *property*: class A(object):

Re: OK, I lied, I do have another question...

2011-07-11 Thread Chris Hulan
The callback is a method so you need to specify the owner builder.connect_signals({"on_window_destroy" : gtk.main_quit, "on_btnExit_clicked" : self.btnExit_clicked}) Got this info from http://www.pygtk.org/articles/pygtk-glade-gui/Creating_a_GUI_using_PyGTK_and_Glade.htm cheers -- http://mail.

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Ian Kelly
On Mon, Jul 11, 2011 at 8:50 AM, Sébastien Volle wrote: > Could it have been made optional, like the trailing comma in list > declaration? Cobra makes the colons optional, so probably yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
Sorry, typo in my original question. I do mean 'colon'. It should have read *If Python use indentation to denote scope, why it still needs colon at the end of function declaration and for/while/if loop?* Thanks On Tue, Jul 12, 2011 at 12:36 AM, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, A

My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Anthony Kong
Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of the goals of the presentations, as told by the 'sponsor' of the presentation, is to help the existing Java/Excel VBA programm

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Thomas Jollans
On 07/11/2011 04:36 PM, Dave Angel wrote: > The character you're asking about is the colon. It goes at the end of > an if, else, for, with, while statement. I doubt it's absolutely > essential, but it helps readability, since a conditional expression > might span multiple lines. > if some

Re: Finding duplicated photo

2011-07-11 Thread Fulvio
Dave Angel wrote: > If your real problem is identifying a renamed file amongst thousands of > others, why not just compare the metadata? it'll be much faster. > This was the primer situation, then to get into the dirt I tought something more sophisticated. There was a program some year's back w

Re: Finding duplicated photo

2011-07-11 Thread Fulvio
Kevin Zhang wrote: > If anyone's interested, pleas checkout the source code in the attachment > and welcome any advise. I found that isn't python 3 code :( Then the code should go into some other program to allow actions on those pictures which are matching each other. Am I right? -- http://m

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Sébastien Volle
Could it have been made optional, like the trailing comma in list declaration? -- Seb 2011/7/11 Anthony Kong > Awesome! Thanks for blog post link > > Cheers > > > On Tue, Jul 12, 2011 at 12:16 AM, Thomas Jollans wrote: > >> On 07/11/2011 03:51 PM, Anthony Kong wrote: >> > Hi, all, >> > >> > La

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Grant Edwards
On 2011-07-11, Thomas Jollans wrote: > On 07/11/2011 03:51 PM, Anthony Kong wrote: >> Hi, all, >> >> Lately I am giving some presentations to my colleagues about the python >> language. A new internal project is coming up which will require the use >> of python. >> >> One of my colleague asked a

Re: Finding duplicated photo

2011-07-11 Thread Fulvio
Thomas Jollans wrote: > If Gwenview simply moves/renames the images, is it not enough to compare > the actual files, byte by byte? For the work at the spot I found Geeqie, doing right. In the other hand learning some PIL function is one of my interest. -- http://mail.python.org/mailman/listin

Re: Virtual functions are virtually invisible!

2011-07-11 Thread Chris Angelico
On Mon, Jul 11, 2011 at 11:42 PM, rantingrick wrote: > This mandate must be handed down from the gods who reside on "Mount > REFUSE-E-OUS to RECOGNIZE-E-OUS a major PROBLEM-O-MOUS" > I assume you're trying to reference Mount Olympus where the Greek gods live, but I'm left thinking more of Mount V

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Thorsten Kampe
* sturlamolden (Mon, 11 Jul 2011 07:21:37 -0700 (PDT)) > On 11 Jul, 16:10, Thorsten Kampe wrote: > > And as soon as developers start developing for Unix customers (say > > Komodo, for instance), they start following the "Windows model" - as > > you call it. > > You are probably aware that Unix an

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Chris Angelico
On Tue, Jul 12, 2011 at 12:21 AM, sturlamolden wrote: > You are probably aware that Unix and Unix customers have been around > since the 1970s. I would expect the paradigm to be changed by now. > The paradigm of small tools that do exactly what they're supposed to, and can be combined? Nope. Ther

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Anthony Kong wrote: Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of my colleague asked an interesting: *If Python use indentation to denote sco

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
Awesome! Thanks for blog post link Cheers On Tue, Jul 12, 2011 at 12:16 AM, Thomas Jollans wrote: > On 07/11/2011 03:51 PM, Anthony Kong wrote: > > Hi, all, > > > > Lately I am giving some presentations to my colleagues about the python > > language. A new internal project is coming up which wi

Re: How to get or set the text of a textfield?

2011-07-11 Thread John Gordon
In Adam Tauno Williams writes: > Google, or Bing, or even DuckDuckGo, are *not* your friends. They are > enormous and inefficient time-sinks. They are a *BAD* way to solve > problems. Use the documentation. One would hope that a Google search might lead to the documentation. -- John Gordo

Saving emails

2011-07-11 Thread Fulvio
Hello, my curiosity these day lay around the problem given by Kmail2. I'd like to keep my old emails and a backup would satisfy my needs. The only conditions should be that the mails will come back in a quick way. I found this page http://www.ducea.com/2006/11/25/cleanup-maildir-folders-archive-d

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 16:10, Thorsten Kampe wrote: > And as soon as developers start developing for Unix customers (say > Komodo, for instance), they start following the "Windows model" - as you > call it. You are probably aware that Unix and Unix customers have been around since the 1970s. I would expect

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Thomas Jollans
On 07/11/2011 03:51 PM, Anthony Kong wrote: > Hi, all, > > Lately I am giving some presentations to my colleagues about the python > language. A new internal project is coming up which will require the use > of python. > > One of my colleague asked an interesting: > > /If Python use indentation

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Thorsten Kampe
* sturlamolden (Mon, 11 Jul 2011 06:44:22 -0700 (PDT)) > On 11 Jul, 14:39, Ben Finney wrote: > > The Unix model is: a collection of general-purpose, customisable > > tools, with clear standard interfaces that work together well, and > > are easily replaceable without losing the benefit of all the

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Kevin Walzer
On 7/10/11 6:50 PM, Ivan Kljaic wrote: Ok Guys. I know that most of us have been expiriencing the need for a nice Gui builder tool for RAD and most of us have been googling for it a lot of times. But seriously. Why is the not even one single RAD tool for Python. I mean what happened to boa constr

An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of my colleague asked an interesting: *If Python use indentation to denote scope, why it still needs semi-colon at the end of f

Re: Virtual functions are virtually invisible!

2011-07-11 Thread rantingrick
On Jul 10, 11:45 pm, Michael Hrivnak wrote: > I can't believe you're saying that you will create a sub-class without > taking the time to understand the base class. I'm NOT saying that so stop putting words in my mouth! > Seriously?  That right > there is why you are seeing method overrides that

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 14:39, Ben Finney wrote: > The Unix model is: a collection of general-purpose, customisable tools, > with clear standard interfaces that work together well, and are easily > replaceable without losing the benefit of all the others. This is opposed to the "Windows model" of a one-click

Freeze statically

2011-07-11 Thread Sebastien Dudek
Hi everyone! Let me explain you my big adventure. So I trying to make a static python executable using the native Python freeze. I've modified the file Modules/Setup.dist using this perl cli : perl -pi -e 's!(^# \*shared\*)!*static*\n$1!' Modules/Setup.dist Then ./configure, make && make install

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Ben Finney
"bruno.desthuilli...@gmail.com" writes: > On Jul 11, 2:42 am, Adam Tauno Williams > wrote: > > > > But Open Source land is simply too fragmented.  There are too many > > database bindings [and RAD requires something like an ORM (think > > SQLalchemy)] and far too many GUI toolkits [Qt, Gtk, wx,

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread bruno.desthuilli...@gmail.com
On Jul 11, 2:42 am, Adam Tauno Williams wrote: > > But Open Source land is simply too fragmented.  There are too many > database bindings [and RAD requires something like an ORM (think > SQLalchemy)] and far too many GUI toolkits [Qt, Gtk, wx, and the list > goes on and on]. > > Nothing can muster

Re: parsing packets

2011-07-11 Thread Thomas Rachel
Am 10.07.2011 22:59 schrieb Littlefield, Tyler: Hello all: I'm working on a server that will need to parse packets sent from a client, and construct it's own packets. Are these packets sent as separate UDP packets or embedded in a TCP stream? In the first case, you already have packets and onl

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 00:50, Ivan Kljaic wrote: > Ok Guys. I know that most of us have been expiriencing the need for a > nice Gui builder tool for RAD and most of us have been googling for it > a lot of times. But seriously. Why is the not even one single RAD tool > for Python. I mean what happened to boa c

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread sturlamolden
On 11 Jul, 02:43, Adam Tauno Williams wrote: > >Because RAD tools are for GUI toolkits, not for languages. If you're > >using GTK, Glade works fine. Same with QT and QTDesigner. If you're > >using WPF with IronPython, t > > These [Glade, etc...] are *NOT* RAD tools.  They are GUI designers.  A > R

Re: How to get or set the text of a textfield?

2011-07-11 Thread Adam Tauno Williams
On Mon, 2011-07-11 at 03:44 +, John Gordon wrote: > In Anthony Papillion > writes: > > So I've built a UI with Glade and have loaded it using the standard > > Python code. In my UI, I have a textfield called txtUsername. How do I > > get and set the text in this field from my Python code? f

Re: A beginning programmer

2011-07-11 Thread Chris Angelico
On Mon, Jul 11, 2011 at 8:06 AM, Eric wrote: > But I just don't know what > to do with it, I don't have any problems that need to be solved... There are always more problems to be solved than people willing to solve them! It's just a matter of finding ones you're interested in. Several people ha

Re: python xauth

2011-07-11 Thread Ian Kelly
On Sun, Jul 10, 2011 at 11:23 PM, kracekumar ramaraju wrote: > I am looking to use xauth in python?It is for my command line process,I would > like to have few examples and resources. First, by "xauth" do you mean the X11 authorization scheme, or the "extended authentication" (xauth.org) scheme?