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.
> SortedL
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
> >
> >&
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)
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
>>>def doSomething(object, func):
>>> object.func("test")
>>>object = Foo()
>>>doSomething(object,
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 "a
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 diffe
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 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 t
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 ha
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
>> .
>>>
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/
> >
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/
> >
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
can't use return in the loop
you could save them in a list or something, and after the loop return
the list.
def loop():
x = []
for i in range(10):
x.append(i)
return x
print loop()
this will print a list with all the numbers.
I hope this is what you mean.
Thomas
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
onaries 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
s this function designed to give up when the
input strings get too long?
Thanks in advance,
Thomas
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On 18/11/06, Chris Hengge <[EMAIL PROTECTED]> wrote:
> Not that it changes your reply, but just for my own sanity:
> int('7' * 10 ** 6) <- does this not just type-cast a char into an int?
>
> Meaning that rather then consuming 1024k as you stated, it would consume
> 2048k at the peak of the calcul
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 amo
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 h
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 that
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
this, in a
proper
format, to a bibtex file. If a paragraph does not provide a value for a
particular key, I could then, in a second pass over the bibtex file,
delete
these lines. But that means I first have to match and extract the
values from
my parapgraphs.
What am I doing wrong? Or
ormation for us newbies.
--
_
( ) 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 lik
\" \' ()*&^%$# << '
>>> [x.strip('\' \" () * & ^ % $ # < ') for x in str.split()]
['this', 'has', 'special', 'characters', '', '', '', '']
--
_
( ) Mark Thomas ASCII ribbon campaign
X www.theswamp.org - against HTML email
/ \
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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 =
GAAATTGCAAATTAACTGTG
ScerACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
SparACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
SmikACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
SbayACCACGTCCAATCTACCGATATTGCTGCTATGCATTATAA
--
_
( ) Mark Thomas ASCII ribb
Does anyone know how to prevent this error
from occurring: IOError: [Errno socket error] (10060, 'Operation timed out').
I have searched for solutions without any
success.
Tom Williams
___
Tutor maillist - Tutor@python.org
h
ncrypt
>
> xored = obj_xor.encrypt(str_encrypt)
> print xored
>
> 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
/ \
___
t;bhxupds&oo`g'uou`z`" <== *confused by this output*
Close 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
Does anyone have some examples on the use of A.M. Kuchling's Python
Cryptography Toolkit? I've tried his examples but get "AttributeError"
and "TypeError". What I'm trying to do is encrypt/decrypt a file. I'm
using Python 2.3 on xp pro.
Thanks
--
_
( )
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
os.exe
again,
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 th
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 Analy
I wasn’t able to get the IDLE started in windows XP. I
had it working then I upgraded to 2.4, then it didn’t work so I switched
back to 2.3, still didn’t work so I’m 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:
Hello I can’t seem to get the IDLE to start up in my
windows XP by clicking on the desktop icon. To start it I have to drop a .py
file on the icon. Any ideas?
Also I can’t seem to get xp to recognize .py files
belonging to python. Right now the icons for .py is a windows default and not
On Wednesday December 22 2004 11:58 am, Alan Gauld wrote:
>
> Hows about a dictionary of lists. A key per column. The
> users pick which columns and you retrieve the lists. And
> of course shelve will treat a file like a dictionary...
>
Ahhh that's better..
I guess I should clarify: it's not
Hi,
I'm trying to implement a reasonably efficient table data structure, but ith a
few quirks...
The application I'm building is a CGI program which allows users to view a
large table of data. In addition, users can restrict the data shown. Some
sample data might look like this: (note you'll
101 - 139 of 139 matches
Mail list logo