the codes as follow:
class Base:
def fun(self):
print "base_fun"
def fun2(self):
print "base_fun2"
class Foo:
def __init__(self, base):
self.__base = base
def fun3(self):
print "foo_fun3"
b = Base()
foo = Foo(b)
my aim is:when "foo.fun3()" be called,it run as usu
I want to join some surfaces to a new big surface with alpha cannel, I want
the new surface has same pixels(inclue r,g,b and alpha value) as the pixels
on the source surfaces.
my code as follow:
surf = pygame.Surface((200,200))
surf.blit(surf1, (0,0))
surf.blit(surf2, (0,100))
.
but these co
I want to startup the default web browser(ie...) to open a url, "execl"
can open a process, but when the process exit, the other process will
exit too, has any why to deal this problem?
--
http://mail.python.org/mailman/listinfo/python-list
>>> a = {1: ("a")}
>>> a[1]
'a'
why not ('a')? when
>>> a = {1: ((("a")))}
>>> a[1]
'a'
the result is 'a' too,not ((("a"))).but when use["a"] or ("a","b"),the
tuple is longer than 1, it's no problem.
--
[http://www.flyaflya.com/]
--
http://mail.python.org/mailman/listinfo/python-li
flyaflya wrote:
> I use pdb.set_trace() to debug code.the Debugger Commands "enable" and
> "disable" need argumet -- "breakpoint number",but I can't find any
> information about it,so how to can i get the breakpoint number? I think
> "disabl
I use pdb.set_trace() to debug code.the Debugger Commands "enable" and
"disable" need argumet -- "breakpoint number",but I can't find any
information about it,so how to can i get the breakpoint number? I think
"disable","enable" are very useful commands...
--
http://mail.python.org/mailman/lis
a = "(1,2,3)"
I want convert a to tuple:(1,2,3),but tuple(a) return ('(', '1', ',',
'2', ',', '3', ')') not (1,2,3)
--
http://mail.python.org/mailman/listinfo/python-list
I know using ActivePython can make a COM easily,but I wander how to
distribute the COM,normal COM can be installed by "regsvr32", but how
to install this COM? and can the code be compiled by py2exe?
--
http://mail.python.org/mailman/listinfo/python-list
I want make a 2-D array from a list,all elements is references of
list's,like this:
a = [1,2,3,4]
b = [ [1,2], [3,4] ]
when change any elements of a, the elements of b will change too, so I
can use some function for list to change b.
c/c++ can work in this way,I think let b[0] = a[0:2], b[1] = a
flyaflya wrote:
> Robert Kern wrote:
>
>> flyaflya wrote:
>>
>>> from random import *
>>>
>>> col = [0 for i in range(10)]
>>> a = [col for i in range(10)]
>>
>>
>>
>> This is the problem. The list "a&quo
Robert Kern wrote:
> flyaflya wrote:
>
>> from random import *
>>
>> col = [0 for i in range(10)]
>> a = [col for i in range(10)]
>
>
> This is the problem. The list "a" now has ten references to the same
> object "col". They are
from random import *
col = [0 for i in range(10)]
a = [col for i in range(10)]
seed()
for i in range(10):
for j in range(10):
a[i][j] = randint(0, 100)
print a
the result is:
[[78, 65, 35, 5, 68, 60, 1, 51, 81, 70],
[78, 65, 35, 5, 68, 60, 1, 51, 81, 70],
[78, 65, 35, 5, 68, 60,
I want make a desktop game suports LAN connect, but pygame has nothing
about network.How to let pygame suport LAN connect? have you some
examples or articles about LAN connect?
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo