> try
>import sqlite3 as sqlite # Python 2.5
> except ImportError:
>from pysqlite2 import dbapi2 as sqlite
i second kent's suggestion here. in fact, i ran into a very similar
issue while working on the database chapter for the new edition of the
book. i had 2.4.2 with pysqlite 2.1.3 on
Hi folks,
How can I know that the user has pressed a particular key or a combination of keys.. for example 'q' or 'Ctrl-c' ?
Thanks in anticipation.
Regards,
Asrarahmed
-- To HIM you shall return.
___
Tutor maillist - Tutor@python.org
h
Tony Cappellini wrote:
> >From Kent
> >>You don't say what OS you are running but under Windows it is trivial to
> >>have multiple versions of Python installed, I have 2.3, 2.4 and 2.5.
> >>They are each in their own directories, all in the system path. I have
> >>aliases called py23, py24 and
Joe Cox wrote:
> I found this simple calculator on the web:
>
> from Tkinter import *
> from math import *
> ###http://sunsite.uakom.sk/sunworldonline/swol-02-1998/swol-02-python.htmlBy
> Cameron Laird and Kathryn Soraiz...Getting Started with Python###
>
> def evaluate(event):
> label['t
Hi Joe,
On Tue, 31 Oct 2006 18:37:27 -0800
"Joe Cox" <[EMAIL PROTECTED]> wrote:
> I found this simple calculator on the web:
>
> from Tkinter import *
> from math import *
> ###http://sunsite.uakom.sk/sunworldonline/swol-02-1998/swol-02-python.htmlBy
> Cameron Laird and Kathryn Soraiz...Getting
Am Mittwoch, den 01.11.2006, 10:14 + schrieb Asrarahmed Kadri:
>
>
> Hi folks,
> How can I know that the user has pressed a particular key or c
> combination of keys.. for example 'q' or 'Ctrl-c' ?
In practice that depends upon your environment. Unix/Linux, MacOS,
Windows, GUI vs. cmdli
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Alan Gauld
> Sent: Tuesday, October 31, 2006 4:47 PM
> To: tutor@python.org
> Subject: Re: [Tutor] Mapping to object attributes
>
>
> "Mike Hansen" <[EMAIL PROTECTED]> wrote
>
> > I've got a web f
> here is the stack
> trace. i know that SOAPpy is doing wrong by not checking the type of
> the element along with id(ele).
> I thought if there is any work around the problem i could use that without
> upgrading SOAPpy after it is fixed.
Hi Premnath,
You might want to see if some other SOAP mod
On Tue, 31 Oct 2006, Amadeo Bellotti wrote:
> my background just disappeared it shows a black screen like it cant find
> the default background. if that makes sense I've added my own and it
> cant seem to find it i removed it and re added it it doesn't seem to be
> working though anyone have
I know that python has many packages such as nose, which is for
testing. Now I am going to test a quicktime file to find out if it
works properly. Are there an existing python package could do that? And
how to write the program?
Thanks,
Yi
___
Tutor mail
Hi folks,
I want to draw bar-charts using Tkinter. I am not able to find material on this topic.
Help me
Regards,
Asrarahmed
-- To HIM you shall return.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tut
Kent Johnson wrote:
> Bob Gailer wrote:
>> Asrarahmed Kadri wrote:
>>>
>>> What are generators and iterators...??And why are they are needed..??
>>>
>>> I can do my stuff with a 'for' or a 'while' loop.. so why do I need an
>>> ITERATOR..?
>> iterators & generators do not replace while or for
On 11/1/06, Danny Yoo <[EMAIL PROTECTED]> wrote:
> here is the stack> trace. i know that SOAPpy is doing wrong by not checking the type of> the element along with id(ele).> I thought if there is any work around the problem i could use that without
> upgrading SOAPpy after it is fixed.Hi Premnath,Y
Am Mittwoch, den 01.11.2006, 10:39 -0500 schrieb [EMAIL PROTECTED]:
> I know that python has many packages such as nose, which is for
> testing. Now I am going to test a quicktime file to find out if it
> works properly. Are there an existing python package could do that?
> And how to write the pro
Hi Asrarahmed,
On Wed, 1 Nov 2006 16:16:31 +
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I want to draw bar-charts using Tkinter. I am not able to find material on
> this topic.
>
have a look at the Canvas widget and especially at its create_rectangle()
method.
Document
Do you by chance know of a way to capture special keys like "Print Screen"?I have a small script to grab all they keycodes, but it doesn't seem to catch several keys on the keyboard. I've got a utility that I'd like to be able to automagically get a screenshot when something goes wrong so I dont ha
Andreas,
Thank you very much for your reply. "Using mplayer to test if the video
track decodes" sounds like a good idea. I am a new python user. Could
you please talk more details about how to do that.
Thanks again,
YiOn 11/1/06, Andreas Kostyrka <[EMAIL PROTECTED]> wrote:
Am Mittwoch, den 01.11.
I am new to Python and i have a very basic question about writing classes.
Lets say i have the following code :
class Sample:
'A simple class'
def method1():
print 'Inside Method1'
When i create an instance of the class and when i try to call the method
method1, i get an error message.
[EMAIL PROTECTED] wrote:
> Andreas,
> Thank you very much for your reply. "Using mplayer to test if the video
> track decodes" sounds like a good idea. I am a new python user. Could
> you please talk more details about how to do that.
Hi,
mplayer is a separate program and has nothing to do with
Rajesh R wrote:
> I am new to Python and i have a very basic question about writing classes.
> Lets say i have the following code :
>
> class Sample:
> 'A simple class'
>
> def method1():
>print 'Inside Method1'
>
> When i create an instance of the class and when i try to call the metho
On Wed, 1 Nov 2006, Rajesh R wrote:
> I am new to Python and i have a very basic question about writing
> classes. Lets say i have the following code :
>
[code cut]
Hi Rajesh,
Take a look at a Python class tutorial:
http://www.diveintopython.org/object_oriented_framework/defining_classes.htm
Am Mittwoch, den 01.11.2006, 15:57 -0500 schrieb [EMAIL PROTECTED]:
> Andreas,
> Thank you very much for your reply. "Using mplayer to test if the
Well, that's nothing python related. mplayer is an Linux movie player
that can be used for all kinds of secondary uses.
Andreas
> video track decodes"
class Sample:
def method1(self):
print "method1"
s = Sample()
s.method1()
Please notice, you need () to invoke a method in Python, and you need an
explicit self argument on the method definition.
Andreas
Am Mittwoch, den 01.11.2006, 21:21 + schrieb Rajesh R:
> I am new to Python
Thanks All, It worked.
Rajesh
>From: Andreas Kostyrka <[EMAIL PROTECTED]>
>To: Rajesh R <[EMAIL PROTECTED]>
>CC: Tutor@python.org
>Subject: Re: [Tutor] Writing Classes in python
>Date: Wed, 01 Nov 2006 22:39:57 +0100
>
>class Sample:
> def method1(self):
> print "method1"
>
>s = Sampl
At 12:14 AM 10/31/2006, Alan Gauld wrote:
>"Dick Moores" <[EMAIL PROTECTED]> wrote
> > I'd like to know how to use sys.exit() to quit a program.
> >
>
>I see that you already figured that out.
>You can also quit by raising SystemExit, which is
>what sys.exit does... but you don't need to import sy
Am Mittwoch, den 01.11.2006, 15:43 -0800 schrieb Dick Moores:
> At 12:14 AM 10/31/2006, Alan Gauld wrote:
>
> >"Dick Moores" <[EMAIL PROTECTED]> wrote
> > > I'd like to know how to use sys.exit() to quit a program.
> > >
> >
> >I see that you already figured that out.
> >You can also quit by raisi
I can't figure out a way to .strip("string")Example might look like this:>>> myStr = "I want to strip my words.">>> print myStr.strip("my")>>> 'I want to strip words.'
Thanks.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo
On 02/11/06, Chris Hengge <[EMAIL PROTECTED]> wrote:
> I can't figure out a way to .strip("string")
>
> Example might look like this:
>
> >>> myStr = "I want to strip my words."
> >>> print myStr.strip("my")
> >>> 'I want to strip words.'
.strip() only removes text from the beginning and end of th
At 03:56 PM 11/1/2006, Andreas Kostyrka wrote:
>Am Mittwoch, den 01.11.2006, 15:43 -0800 schrieb Dick Moores:
> > At 12:14 AM 10/31/2006, Alan Gauld wrote:
> >
> > >"Dick Moores" <[EMAIL PROTECTED]> wrote
> > > > I'd like to know how to use sys.exit() to quit a program.
> > > >
> > >
> > >I see tha
At 10:16 PM 11/1/2006, Dick Moores wrote:
>BTW at the command line, "raise SystemExit(2)" produces a completely
>silent exit. In Win IDE I get "SystemExit: 2". With IDLE:
>
>Traceback (most recent call last):
>File "E:\Python25\dev\1unitConversion5a.py", line 425, in
> main()
>File "E
Dick Moores wrote:
> At 03:56 PM 11/1/2006, Andreas Kostyrka wrote:
>
>> Am Mittwoch, den 01.11.2006, 15:43 -0800 schrieb Dick Moores:
>>
>>> At 12:14 AM 10/31/2006, Alan Gauld wrote:
>>>
>>>
"Dick Moores" <[EMAIL PROTECTED]> wrote
> I'd like to know how to use
31 matches
Mail list logo