>> def adder1(*args):
>> print 'adder1',
>> if type(args[0]) == type(0):
>> sum = 0
>> else:
>> sum = args[0][:0]
>> for arg in args:
>> sum = sum + arg
>> return sum
This function looks overly enamored with Python slicing. *grin* Unless
I'm m
On Sat, Jul 22, 2006 at 01:41:17PM -0400, Kent Johnson wrote:
> Dave Kuhlman wrote:
[snip]
> > And, also, that's why the following statements all have exactly
> > the same effect:
> >
> > total = 5
> > locals()['total'] = 5
> > exec('total = 5')
>
> You're not in the mood to believe
On Sat, Jul 22, 2006 at 06:20:12AM -0400, Kent Johnson wrote:
> We just had a discussion of recursion, you might want to look at it -
> though the code is a bit more complex than this example.
> http://mail.python.org/pipermail/tutor/2006-July/048081.html
Glad to see I'm not the only one to get t
Dave Kuhlman wrote:
> On Sat, Jul 22, 2006 at 11:37:38AM -0400, Python wrote:
>
>>
>> Well the reference documentation says:
>>
>> locals(
>> )
>> Update and return a dictionary representing the current local
>> symbol table. Warning: The contents of this dictionary should
>>
johnsonv3 schrieb:
> When one installs a program (such as Panda or Livewires) into python
> sitepackage folder is the python search path automnatically updated to
> search the newly installed folders and files?
Generally speaking, yes. The Python package (to use the proper name) either
needs to ha
johnsonv3 schrieb:
> If one does this...
>
> import sys
> sys.path.append("C:\\panda\direct")
>
> Is the change to python search path only temporary?
Yes, it only changes the search path within that program. The system-wide
default search path is not changed.
Chris
___
On Sat, Jul 22, 2006 at 09:57:01AM -0400, johnsonv3 wrote:
> Hi,
>
> If one does this...
>
> import sys
> sys.path.append("C:\\panda\direct")
>
> Is the change to python search path only temporary?
> Thanks.
As we quibblers like to say, That depends on the meaning of the
word "temporary".
Modi
On Sat, Jul 22, 2006 at 11:37:38AM -0400, Python wrote:
> On Sat, 2006-07-22 at 17:18 +0200, Karl Pflästerer wrote:
> > On 22 Jul 2006, [EMAIL PROTECTED] wrote:
> >
> > >
> > > On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
> > >> Hi,
> > >>
> > >> I am refactoring my code. I am trying to
On Sat, Jul 22, 2006 at 08:49:52PM +0800, Ivan Low wrote:
> def adder1(*args):
> print 'adder1',
> if type(args[0]) == type(0):
> sum = 0
>
> else:
> sum = args[0][:0]
> for arg in args:
> sum = sum + arg
>
> return sum
>
> Hi, I was trying to
Hi,
Using Windows XP Home & python 234
I am trying to start python programs that run Panda 3D without having to
open command prompt and type a path every time I run a program.
This pandastart.bat file works...
cd C:\Panda3D-1.2.3\mystuff
ppython bvd.py
and from python shell this works...
On Sat, 2006-07-22 at 17:18 +0200, Karl Pflästerer wrote:
> On 22 Jul 2006, [EMAIL PROTECTED] wrote:
>
> >
> > On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
> >> Hi,
> >>
> >> I am refactoring my code. I am trying to reduce the amount of lines
> >> by using more loops. I tend to use cop
On 22 Jul 2006, [EMAIL PROTECTED] wrote:
>
> On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
>> Hi,
>>
>> I am refactoring my code. I am trying to reduce the amount of lines
>> by using more loops. I tend to use copy and paste a lot instead of
>> writing a loop to do the work.
>>
>> For
Another search path question
When one installs a program (such as Panda or Livewires) into python
sitepackage folder is the python search path automnatically updated to search
the newly installed folders and files?
___
Tutor maillist - Tutor@pyth
Hi,
If one does this...
import sys
sys.path.append("C:\\panda\direct")
Is the change to python search path only temporary?
Thanks.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
> Hi,
>
> I am refactoring my code. I am trying to reduce the amount of lines
> by using more loops. I tend to use copy and paste a lot instead of
> writing a loop to do the work.
>
> For example, I have 30 textentry boxes numbered from ent
Hi,
I am refactoring my code. I am trying to reduce the amount of lines
by using more loops. I tend to use
copy and paste a lot instead of writing a loop to do the work.
For example, I have 30 textentry
boxes numbered from entry20 to entry50.
I have used the following code to ass
def adder1(*args):
print 'adder1',
if type(args[0]) == type(0):
sum = 0
else:
sum = args[0][:0]
for arg in args:
sum = sum + arg
return sum
Hi, I was trying to understand what this function is all about.
I didn't tried the adder1 function which
On Fri, 21 Jul 2006 15:01:30 -0400
Orri Ganel <[EMAIL PROTECTED]> wrote:
> As a follow up to my last email, I think the issue is more that the
> display doesn't update before the command associated with the "search"
> button has finished processing, so any attempts to get data about the
> displ
Christopher Spears wrote:
> I am working out of How To Think Like A Computer
> Scientist. Here is the code for a module called
> node.py:
>
> def printList(node):
> nodeList = []
> while node:
> nodeList.append(node.cargo)
> n
19 matches
Mail list logo