On Sat, 10 Feb 2007 22:10:52 +1000
Jonathan McManus [EMAIL PROTECTED] wrote:
It's pretty easy to make this work, actually. The issue is in the
doSomething method.
class Foo(object):
def method(self, arg):
print arg
def doSomething(object, func):
object.func(test)
On Sat, 10 Feb 2007 07:55:54 -0500
Kent Johnson [EMAIL PROTECTED] wrote:
thomas coopman wrote:
Hi,
I want to do something like this, don't know how to properly
explain it, so I just give you some example code
class Foo(object):
def method(self, arg):
print arg
On Sat, 10 Feb 2007 09:04:15 -0500
Kent Johnson [EMAIL PROTECTED] wrote:
thomas coopman wrote:
also,
Is it better to use super in FooList? and how should I use it then?
Actually I would say that FooList is not pulling its weight.
SortedList already allows specialization by the compare
Hi,
I need a function that groups almost equal strings. It seems most easy
to me, to do this with a hash function.
So I would write a hash function like this:
string = string.replace( , ).lower()[0:6]
and then hash the string chars, but it should detect minor typo's, so
words with one
Hi,
On Thu, 08 Feb
2007 13:07:41 +0100
Christopher Arndt [EMAIL PROTECTED] wrote:
thomas coopman schrieb:
I need a function that groups almost equal strings. It seems most
easy to me, to do this with a hash function.
What do you mean be almost equal? By which criterium? Spelling
On 1/26/07, OkaMthembo [EMAIL PROTECTED] wrote:
how useable is vim on Windows?
Very! I've used Vim on Windows since the 5.3 version, it only gets
better. Like Alan said there is a learning curve, but once you've got
it there is no going back.
i wish i could learn Unix. which distro do you
On Tue, 16 Jan 2007 10:06:37 -
Alan Gauld [EMAIL PROTECTED] wrote:
Thomas Coopman [EMAIL PROTECTED] wrote
.
I wondered if it was possible to do something like this:
src/
-a_module/
-sub_module/
test/
-a_module/
-sub_module/
I don;t see any reason
On 1/17/07, Kent Johnson [EMAIL PROTECTED] wrote:
thomas coopman wrote:
On Tue, 16 Jan 2007 10:06:37 -
Alan Gauld [EMAIL PROTECTED] wrote:
Thomas Coopman [EMAIL PROTECTED] wrote
.
I wondered if it was possible to do something like this:
src/
-a_module/
-sub_module/
test
On 1/17/07, Kent Johnson [EMAIL PROTECTED] wrote:
Thomas Coopman wrote:
Well I don't really
need the circular imports but I would like to know how to do the imports
correct.
Suppose that in the example that I showed only One needs Two.
So then we have this:
M/
__init__.py
A/
__init__
On 1/17/07, Kent Johnson [EMAIL PROTECTED] wrote:
Thomas Coopman wrote:
When I run One.py from in the directory A, doesn't look python in it's
parent directory when it can't find the module?
And if that's not the case where and what should I add to the sys.path
variable?
No, Python won't
the code and the test
dir is a complete copy
of the src dir but with unittest instead of code.
I have something like this but I don't know how to organize the imports in
the tests and I don't know
if this is a good idea. What do you think?
Thanks
--
Thomas Coopman
[EMAIL PROTECTED
On Tue, 16 Jan 2007 10:06:37 -
Alan Gauld [EMAIL PROTECTED] wrote:
Thomas Coopman [EMAIL PROTECTED] wrote
.
I wondered if it was possible to do something like this:
src/
-a_module/
-sub_module/
test/
-a_module/
-sub_module/
I don;t see any reason
.
I hope this is what you mean.
Thomas
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
of userid to field value. That way I'm dealing with 10 to
50 files instead of 15500.
Also, I am inexperienced with using classes but eager to learn and
wonder if they would be any help in this case.
Any advise much appreciated and thanks in advance,
Thomas
when the
input strings get too long?
Thanks in advance,
Thomas
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi,
I sometimes find it useful to read the source code of a module and for
example I can type string.__file__ to find the location of the string
module.
However the .__file__ method is not available for the module builtin. Is it
possible to read the source code for built in functions and if so
Earlier today I typed the following into my pythonwin interactive
interpreter in windows xp:
int('7' * 10 ** 6)
I expected either an error message or it to get stuck and require me to
stop the process manually.
I read that unlike long integers in C, longs in python are only limited by
the
Hi,
I was wondering some things about property.
suppose I have a class like this:
class A(object):
def __init__(self, x, y):
self.__x = x
def x():
def get(self):
return self.__x
def set(self, x):
self.__x = x
#and some other code
from
my parapgraphs.
What am I doing wrong? Or is the entire approach flawed? What
alternative
method would you suggest?
Thanks for any help on this
Thomas
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Oct 11, 2006, at 2:48 PM, Kent Johnson wrote:
Thomas A. Schmitz wrote:
On Oct 11, 2006, at 12:06 PM, Kent Johnson wrote:
I would take out the join in this, at least, and return a list of
lines. You don't really have a paragraph, you have structured data.
There is not need to throw away
.
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi,
I would like to make a combobox with a list of strings, but I have many
problems with it. I know how to make the combobox and how to add
strings, but is it possible to get a list of strings from the combobox
and also is it possible to update the combobox with a list of strings?
(something
On 7/6/05, Michael Huster [EMAIL PROTECTED] wrote:
In python under windows, how can I create and access a file on the Desktop?
The following do NOT work:
How about...
userp = os.getenv('USERPROFILE') + '\\Desktop\\MyFile.txt'
fo = file(userp, 'w')
--
_
( ) Mark Thomas ASCII ribbon
SbayACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
obj_xor = XOR.new(string)
print obj_xor.decrypt(xored)
Kent
Excellent !!
Many thanks Kent.
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org
but no cigar!! *grin*
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Greetings,
I am attempting to update an Oracle table
using python. When I execute the code, the python script appears to hang,
in that nothing else happens.
As always, any assistance you can provide
will be appreciated.
Code:
connection = cx_Oracle.connect(db/[EMAIL PROTECTED])
Here is the code I am using to invoke SAS:
import os
import sys
shell = os.environ.get('COMSPEC')
if shell is None: shell = os.environ.get('SHELL')
if shell is None: shell = 'an unknown command processor'
print 'Running under', shell
Greetings,
I am
trying to use python to run a SAS program by passing the needed
parameters. I am able to start SAS, but unable to start the correct SAS
program with its parameters.
Any
assistance you could provide will be appreciated.
Tom Williams
DSHS - Research and Data Analysis
,
Tom
-Original Message-
From: Alan Gauld [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 1:57 PM
To: Williams, Thomas; tutor@python.org
Subject: Re: [Tutor] executing SAS and passing parameters
I am trying to use python to run a SAS program by passing the needed
parameters
I wasnt able to get the IDLE started in windows XP. I
had it working then I upgraded to 2.4, then it didnt work so I switched
back to 2.3, still didnt work so Im back to 2.4. I did some
looking around and I was able to get the IDLE started by setting the shortcut
on my desktop to:
101 - 131 of 131 matches
Mail list logo