Sorry for the forward, i forgot to reply to tutor
On Mon, May 27, 2013 at 3:53 AM, Sunitha Misra sunith...@gmail.com wrote:
self.fileDialog = QtGui.QFileDialog()
QtCore.QObject.connect(self.toolButton,
QtCore.SIGNAL(_fromUtf8(clicked())), self.fileDialog.getOpenFileName)
i think the way
Thanks!
I defined a function, as you suggested, to call when the button was
clicked. But then I also had to use self.fileDialog from within the
function. Not sure how I could avoid using fileDialog.
I also defined global variable (under the class) and assigned it to the
filename, so I could
On Mon, May 27, 2013 at 2:14 PM, SM sunith...@gmail.com wrote:
But then I also had to use self.fileDialog from within the function. Not
sure how I could avoid using fileDialog.
Thanks.
No problem. to do it without the instance variable, you access its
method directly. so replace:
path =
Yes, the following works.
path = QtGui.QFileDialog.getOpenFileName()
Thanks!
On Mon, May 27, 2013 at 9:45 AM, Matthew Ngaha chigga...@gmail.com wrote:
On Mon, May 27, 2013 at 2:14 PM, SM sunith...@gmail.com wrote:
But then I also had to use self.fileDialog from within the function. Not
Is there a way to make buttons a little like a raw_input in the context when
the user presses the button, the program performs a function?___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
On Mon, May 27, 2013 at 9:45 AM, Matthew Ngaha chigga...@gmail.com wrote:
On Mon, May 27, 2013 at 2:14 PM, SM sunith...@gmail.com wrote:
But then I also had to use self.fileDialog from within the function. Not
sure how I could avoid using fileDialog.
No problem. to do it without the instance
On 27/05/13 15:17, Jack Little wrote:
Is there a way to make buttons a little like a raw_input in the context
when the user presses the button, the program performs a function?
Yes, but its a lot more complicated than raw_input.
See the GUI topic of my tutorial for examples.
Also check out
I was looking at the bytecode doc page as a break from the Lutz book,
since I like Assembler-type code due to its total non-ambiguity, but
the page doesn't say much. Is there a doc somewhere that corresponds
some of the bytecode to Python source? I thought rot_1, 2, 3, and 4
looked useful, but it
On 27 May 2013 21:01, Jim Mooney cybervigila...@gmail.com wrote:
I was looking at the bytecode doc page as a break from the Lutz book,
since I like Assembler-type code due to its total non-ambiguity, but
the page doesn't say much. Is there a doc somewhere that corresponds
some of the bytecode
Oscar Benjamin oscar.j.benja...@gmail.com
What do you want these for? I've never needed to know what the
interpreter's bytecodes are.
I programmed A86 Assembler years ago, and just find the bytecode has a
comfortable clarity as a learning tool, at least for me. When an
author vaguely tried to
On 27/05/13 21:21, Jim Mooney wrote:
Oscar Benjamin oscar.j.benja...@gmail.com
What do you want these for? I've never needed to know what the
interpreter's bytecodes are.
I programmed A86 Assembler years ago, and just find the bytecode has a
comfortable clarity as a learning tool,
To me,
Thank you, for the details.
On Mon, May 27, 2013 at 10:13 AM, eryksun eryk...@gmail.com wrote:
On Mon, May 27, 2013 at 9:45 AM, Matthew Ngaha chigga...@gmail.com
wrote:
On Mon, May 27, 2013 at 2:14 PM, SM sunith...@gmail.com wrote:
But then I also had to use self.fileDialog from within
On Mon, May 27, 2013 at 7:20 PM, Alan Gauld alan.ga...@btinternet.com wrote:
Can you give a use case of how you think you could use them?
There may be another way to do what you want.
I can't speak for Jim, but I have used the dis module in the past to
quickly check how python parsed an
On 28/05/13 06:01, Jim Mooney wrote:
I was looking at the bytecode doc page as a break from the Lutz book,
since I like Assembler-type code due to its total non-ambiguity, but
the page doesn't say much. Is there a doc somewhere that corresponds
some of the bytecode to Python source? I thought
I can't speak for Jim, but I have used the dis module in the past to
quickly check how python parsed an expression (e.g. not x is y).
Yes, I've done that too. But that's not the bytecodes (at least not what
I understand as bytecodes) that's the dis-assembly listing which is
usually far more
On 28/05/2013 00:32, Steven D'Aprano wrote:
On 28/05/13 06:01, Jim Mooney wrote:
Another question. I tried installing a package that back-compiles (in
win 7), so I could see things that way, and got the error
Unable to find vcvarsall.bat
Shall we guess what package that is? I love guessing
On 05/27/2013 07:56 PM, ALAN GAULD wrote:
I can't speak for Jim, but I have used the dis module in the past to
quickly check how python parsed an expression (e.g. not x is y).
Yes, I've done that too. But that's not the bytecodes (at least not what
I understand as bytecodes) that's the
On Mon, May 27, 2013 at 4:01 PM, Jim Mooney cybervigila...@gmail.com wrote:
I was looking at the bytecode doc page as a break from the Lutz book,
since I like Assembler-type code due to its total non-ambiguity, but
the page doesn't say much. Is there a doc somewhere that corresponds
some of
Okay, so I made it to FOR loops in the Lutz book. A couple of days ago I was
helped here with the .join method for creating strings from lists or tuples of
strings. I got to wondering if I could just, for the sake of learning, do the
same thing in a FOR loop, since that's today's chapter:
One way I can suggest is
x=0; ham=''; b=['s','p','a','m'] #or, b=('s','p','a','m')
for t in b:
ham=ham+b[x]
print(ham);x+=1
't' is actually equal to b[x] and its faster then indexed based look-up.
so you can rewrite
ham = ham + b[x]
as
ham += t
and remove the x
20 matches
Mail list logo