[Tutor] MS ODBC

2005-12-05 Thread Gregorius Gede Wiranarada
hello, how can i connect python to read data from ms access or ms foxpro? regards, Gregor ___ Dibuka pendaftaran Program Magister dan Double Degree Pascasarjana UAJY (MM - MTF atau sebaliknya; M.Hum - MTF; M.Hum - MM; MTS. - MM

Re: [Tutor] terminology

2005-12-05 Thread Danny Yoo
> > suppose you have a list of words and you want to unambiguously identify > > each word in the list with the shortest number of characters. > > for instance a list like : kill, kiss, take > > i would want to get take just by typing t. > > but you would have to type kil or kis to get kill or kiss

Re: [Tutor] terminology

2005-12-05 Thread John Fouhy
On 06/12/05, david <[EMAIL PROTECTED]> wrote: > suppose you have a list of words and you want to unambiguously identify > each word in the list with the shortest number of characters. > for instance a list like : kill, kiss, take > i would want to get take just by typing t. > but you would have to

[Tutor] terminology

2005-12-05 Thread david
suppose you have a list of words and you want to unambiguously identify each word in the list with the shortest number of characters. for instance a list like : kill, kiss, take i would want to get take just by typing t. but you would have to type kil or kis to get kill or kiss. where shoul

Re: [Tutor] How to Pass lists by value

2005-12-05 Thread Kent Johnson
Hans Dushanthakumar wrote: > Thanks guys > > Yes either of the foll solves the problem: > > b = junk(copy.copy(a)) > OR > > b = junk(a[:]) These work because they make a copy of a and pass (a reference to) the copy to the function. > Why is there a difference between the way the two line

Re: [Tutor] How to Pass lists by value

2005-12-05 Thread John Fouhy
On 06/12/05, Hans Dushanthakumar <[EMAIL PROTECTED]> wrote: > > Thanks guys > > Yes either of the foll solves the problem: > > b = junk(copy.copy(a)) > > OR > > b = junk(a[:]) One thing you should be aware of --- these will both do a "shallow copy". Example: >>> lists = [[], [], [], []] >>> lis

Re: [Tutor] How to Pass lists by value

2005-12-05 Thread Hans Dushanthakumar
Thanks guys   Yes either of the foll solves the problem:   b = junk(copy.copy(a))  OR b = junk(a[:])     Why is there a difference between the way the two lines (x.append("20")  and x = "30") are handled within a function?   From: Adam [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 December 2

[Tutor] How to Pass lists by value

2005-12-05 Thread Hans Dushanthakumar
Hi folks, How do I pass a list by value to a function. The foll: snippet of code produces the output as shown: Code: - def junk(x): x.append("20") return x a = ["10"] b = junk(a) print b print a Output: --- >>> b = ['10', '20'] a = ['10', '20'] This indicates that the

Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread John Fouhy
On 06/12/05, Josh Yagy <[EMAIL PROTECTED]> wrote: > Wow, that code is much more compact, thanks for the help! But as far as the > original > question goes, I think I worded my problem wrong. The output you got with > your binary string > is almost what I Want, but not quite. I need each subset of

Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread Ismael Garrido
Josh Yagy wrote: >Wow, that code is much more compact, thanks for the help! But as far as the >original question goes, I think I worded my problem wrong. The output you got >with your binary string is almost what I Want, but not quite. I need each >subset of binary strings to be n bits long (in

Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread Josh Yagy
Wow, that code is much more compact, thanks for the help! But as far as the original question goes, I think I worded my problem wrong. The output you got with your binary string is almost what I Want, but not quite. I need each subset of binary strings to be n bits long (in the dummy problem you

Re: [Tutor] script run problem

2005-12-05 Thread Alan Gauld
Hi Kishra, In the words of the old joke(*) why not just 'get out and get back in' and see if that fixes it? In other words I'd try a reinstall of Python, it looks like something has gone missing or got corrupted... Alan G. (*)Three guys are in a car that breaks down. The first says "I'm an Elect

Re: [Tutor] (no subject)

2005-12-05 Thread Alan Gauld
> i guess i need to pass wield an object somehow instead of a string. > can anyone point in the right direction? AS ever converting strings to objects is a job for a doictionary. And remember that classe3s are objects too. So simply register each class you define in a dictionary of classes again

Re: [Tutor] RPG wielding

2005-12-05 Thread Danny Yoo
> hello everyone, and thanks for your help and guidance so far. amazingly > enough, something i thought would be simple has turned out to be not > simple. i have a sword that i want to wield. as i have it here, i think > i am wielding whatever string i type as argument to wield. so i guess i > ne

Re: [Tutor] Problems padding a string with 0's while deconcatonating

2005-12-05 Thread Kent Johnson
Josh Yagy wrote: >I have the following code: > >def binaryString(b, n): > s=[] > j=0 > while j < len(b): > temp = b[j:j+n] > s = s + [ temp ] > j = j + n > return s > >which works for all intents and purposes, but I can't figure out

Re: [Tutor] (no subject)

2005-12-05 Thread Kent Johnson
Roberts, Alice wrote: > Good morning, > > Does anyone know of something that will copy a directory tree, but > only for files with a specific extension? I found > > *copytree*( > > > > /src, dst/[/, symlinks/]) > > , but I wasn’t sure how to assign the src to the string, ie) > \\server\sh

[Tutor] (no subject)

2005-12-05 Thread Roberts, Alice
Good morning,   Does anyone know of something that will copy a directory tree, but only for files with a specific extension?  I found copytree( src, dst[, symlinks]) , but I wasn’t sure how to assign the src to the string, ie) \\server\share\*.xls.   Thanks,

[Tutor] distutils python 2.4.2 winxp, microsoft visual studio 2005 problem

2005-12-05 Thread Pujo Aji
Hello,I try to call setup build and found this problem:running buildrunning build_ext*** Failed: error: The .NET Framework SDK needs to be installed before building extensions for Python.I have .NET Framework SDK already. Is there anyone experiance this problem ?I also found some information about

Re: [Tutor] files - strings - lists (continued)

2005-12-05 Thread Andrzej Kolinski
  I used Kent's hints and suggestions but now I'm facing a problem of how to calculate final results from the retrieved data. My script, at this stage, opens _all_ game results files, gets an individual player's name, calculates his score and keeps the number of boards played. It does it per _each

[Tutor] (no subject)

2005-12-05 Thread david
hello everyone, and thanks for your help and guidance so far. amazingly enough, something i thought would be simple has turned out to be not simple. i have a sword that i want to wield. as i have it here, i think i am wielding whatever string i type as argument to wield. so i guess i need to