Subject: problem activating python

2022-12-17 Thread Anne
I tried several times to install and use python for youtube views with Tor using Youtube tutorials but I keep getting error after error. Please help me. regards Dimpho         -- https://mail.python.org/mailman/listinfo/python-list

logging problem

2006-04-26 Thread Shine Anne
y", line 712, in emit    self.stream.write(fs % msg)ValueError: I/O operation on closed file   Can anyone help me..i am new to python so plz help-- Regards,Shine Anne -- http://mail.python.org/mailman/listinfo/python-list

Unexpected __metaclass__ method behavior

2007-12-30 Thread anne . nospam01
Dear fellow Pythonians, I just stumbled upon the following unexpected behavior: class TestType(type): def Foo(self): return 'TestType Foo' class Test(object): __metaclass__ = TestType def Foo(self): return 'Test Foo' t = Test() print t.Foo() print Test.Foo() This will produce: Test F

Re: Unexpected __metaclass__ method behavior

2007-12-31 Thread anne . nospam01
Well, you see, I have some database functions that deal with "things" which are either classes or instances thereof. I though polymorphism would be a nice way to handle them identically, like: def do(thing): thing.Foo() do(t) do(Test) But never mind, I now understand that Test.__dict__ can contai

What is the encoding of __file__?

2008-01-07 Thread anne . nospam01
Dear all, can someone quickly tell me what the encoding of __file__ is? I can't find it in the documentation. BTW, I'm using Python 2.5.1 on WIndows XP and Vista. Kind regards, Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the encoding of __file__?

2008-01-07 Thread anne . nospam01
On 7 Jan., 23:06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > can someone quickly tell me what the encoding of __file__ is? I can't > > find it in the documentation. > > > BTW, I'm using Python 2.5.1 on WIndows XP and Vista. > > It's platform-specific - the same encoding that is used for file

Inconsistency of special class method lookup?

2006-03-11 Thread anne . nospam01
Folks, I'm running into the following issue. A staticmethod of a class seems not to be accepted as a special class method of the class object itself. For example: class Foo(object): def __len__(): return 2 __len__ = staticmethod(__len__) print len(Foo) >>> Traceback (most recent c

Re: Inconsistency of special class method lookup?

2006-03-11 Thread anne . nospam01
Thanks. -- http://mail.python.org/mailman/listinfo/python-list

lists and for loops

2011-08-17 Thread Emily Anne Moravec
I want to add 5 to each element of a list by using a for loop. Why doesn't this work? numbers = [1, 2, 3, 4, 5] for n in numbers: n = n + 5 print numbers -- http://mail.python.org/mailman/listinfo/python-list

Re: BeautifulSoup bug when ">>>" found in attribute value

2006-12-28 Thread Anne van Kesteren
ed param tag. The param element doesn't have a closing tag. http://www.w3.org/TR/html401/struct/objects.html#h-13.3.2 > Mind you, the sentence before that says 'should' for quoting < characters > which is just plain silly. For quoted attribute values it isn&#

Writing a function to calculate scores

2015-05-19 Thread Grace Anne St Clair-Bates
Hello! I am trying to write a funtion that calculates scores of three random dots on a "bean-bag" board that land on different holes. Each hole holds a certain amount of point. I need to take where the computer has randomly places three points in my turtle graphic and calculate the total score.