2. Re: Python interface problem with Windows (Benjamin Kaplan)

2010-06-27 Thread Kermit Rose
do not know how to import code from any other directory than the default, C:\Python26. And how do I save the code in a different directory than the default, c:\Python26? Kermit Rose -- http://mail.python.org/mailman/listinfo/python-list

Re: Python interface problem with Windows

2010-06-26 Thread Kermit Rose
On 6/26/2010 5:27 PM, Robert Kern wrote: I do not provide Python support in private email. Please try the python-list: http://mail.python.org/mailman/listinfo/python-list or its USENET gateway: news:comp.lang.python On Sat, Jun 26, 2010 at 16:23, Kermit Rose wrote: Hello Robert. I

Re: How can I use my modules here?

2009-09-11 Thread Kermit Mei
On Fri, 2009-09-11 at 07:48 -0400, Albert Hopkins wrote: > On Fri, 2009-09-11 at 02:29 -0700, Chris Rebert wrote: > > For some reason, your Python program is being executed by bash as if > > it were a shell script, which it's not. > > No idea what the cause is though. > > Because the first 2 bytes

How can I use my modules here?

2009-09-11 Thread Kermit Mei
I run the main.py, the following error takes: $ ./main.py from: can't read /var/mail/MyTestModules ./main.py: line 7: syntax error near unexpected token `(' ./main.py: line 7: `t1 = Test1()' Waiting for your help. Thanks. Best Regards Kermit Mei -- http://mail.python.or

Re: Why can't I run this test class?

2009-09-11 Thread Kermit Mei
On Fri, 2009-09-11 at 00:43 -0700, Chris Rebert wrote: > On Fri, Sep 11, 2009 at 12:40 AM, Kermit Mei wrote: > > On Fri, 2009-09-11 at 00:33 -0700, Chris Rebert wrote: > >> On Fri, Sep 11, 2009 at 12:30 AM, Kermit Mei wrote: > >> > Dear all, > >> >

Re: Why can't I run this test class?

2009-09-11 Thread Kermit Mei
On Fri, 2009-09-11 at 00:33 -0700, Chris Rebert wrote: > On Fri, Sep 11, 2009 at 12:30 AM, Kermit Mei wrote: > > Dear all, > >I'm a newbie for python, and I write a program to test how to > > implement a class: > > > > #!/usr/bin/env > > pyth

Why can't I run this test class?

2009-09-11 Thread Kermit Mei
nstance as first argument (got nothing instead) What I want is as the following c++ code do: class Test { public: Test() :arg1(1) {/*Do nothing*/} int first() const { return arg1; } protected: int arg1; }; void main(void) { Test t1; std::cout << t1.first; }

Re: How can I understan the "for" here?

2008-12-11 Thread Kermit Mei
D'Arcy J.M. Cain wrote: On Thu, 11 Dec 2008 22:44:20 +0800 Kermit Mei <[EMAIL PROTECTED]> wrote: >>> ["%s=%s" % (k, v) for k, v in params.items()] ['pwd=secret', 'database=master', 'uid=sa', 'server=mpilgrim'] I can&#x

How can I understan the "for" here?

2008-12-11 Thread Kermit Mei
Hello all, look at the following sentence: >>>params = {"server":"mpilgrim", "database":"master", "uid":"sa", "pwd":"secret"} >>> ["%s=%s" % (k, v) for k, v in params.items()] ['pwd=secret', 'database=master', 'uid=sa', 'server=mpilgrim'] I can't understand the second sentence because of the "

Re: A question about reference in Python.

2008-12-07 Thread Kermit Mei
Chris Rebert wrote: On Sun, Dec 7, 2008 at 9:26 PM, Group <[EMAIL PROTECTED]> wrote: Hello, I'm studying algorithom. For concentrating on the question itself, I intend to use Python to implement the algorithoms. Now, I want to write a Red-Black Tree, and a List structure. In C/C++, I can use

True Division in Python

2006-12-06 Thread kermit
division. Kermit < [EMAIL PROTECTED] > -- http://mail.python.org/mailman/listinfo/python-list

Re: 2-dimensional data structures

2006-02-18 Thread Kermit Rose
ant a massive list of IF conditionals if I can avoid it.     Kermit says:   There is a MUCH more efficient way to do this!   If you are doing a  9 by 9  soduku,   Each row and column has exactly the digits 1 through 9   Think of your data as being in a list 81 cells long that is accessed 3 different

arrays in python

2006-02-10 Thread Kermit Rose
From: Kermit Rose Date: 02/10/06 17:36:34 To: [EMAIL PROTECTED] Subject: Arrays Hello. I want to write a program in python using integer arrays. I wish to calculate formulas using 200 digit integers. I could not find any documentation in python manual about declaring arrays. I