Re: Wrapping paper, anyone ?

2009-12-16 Thread simon
On Dec 17, 2:18 am, Peter Otten <__pete...@web.de> wrote: > simon wrote: > > On Dec 16, 9:00 pm, Peter Otten <__pete...@web.de> wrote: > >> simon wrote: > > >> Nice :) > > >> --- stars.py    2009-12-16 10:52:49.553505036 +0100 > >> +++ stars_fixed.py      2009-12-16 10:53:32.545786454 +0100 > >> @@

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
bartc wrote: > > "simon" wrote in message > news:a50b1c21-287b-498d-a8c3-51a3a2f94...@k9g2000vbl.googlegroups.com... >> #!/usr/bin/env python >> >> from math import * >> >> from random import * >> >> import cairo >> from cairo import Context > > What's cairo? > > A vector graphics library.

Re: Wrapping paper, anyone ?

2009-12-16 Thread bartc
"simon" wrote in message news:a50b1c21-287b-498d-a8c3-51a3a2f94...@k9g2000vbl.googlegroups.com... #!/usr/bin/env python from math import * from random import * import cairo from cairo import Context What's cairo? -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
simon wrote: > On Dec 17, 12:36 am, r0g wrote: >> Peter Otten wrote: >>> simon wrote: >>> Nice :) >>> --- stars.py2009-12-16 10:52:49.553505036 +0100 >>> +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 >>> @@ -48,7 +48,9 @@ >>> def __init__(self): >>> self.calls = []

Re: Wrapping paper, anyone ?

2009-12-16 Thread Peter Otten
simon wrote: > On Dec 16, 9:00 pm, Peter Otten <__pete...@web.de> wrote: >> simon wrote: >> >> Nice :) >> >> --- stars.py2009-12-16 10:52:49.553505036 +0100 >> +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 >> @@ -48,7 +48,9 @@ >> def __init__(self): >> self.calls = [] >> >> -

Re: Wrapping paper, anyone ?

2009-12-16 Thread simon
On Dec 17, 12:36 am, r0g wrote: > Peter Otten wrote: > > simon wrote: > > > Nice :) > > > --- stars.py    2009-12-16 10:52:49.553505036 +0100 > > +++ stars_fixed.py      2009-12-16 10:53:32.545786454 +0100 > > @@ -48,7 +48,9 @@ > >      def __init__(self): > >          self.calls = [] > > > -    _

Re: Wrapping paper, anyone ?

2009-12-16 Thread simon
On Dec 16, 9:00 pm, Peter Otten <__pete...@web.de> wrote: > simon wrote: > > Nice :) > > --- stars.py    2009-12-16 10:52:49.553505036 +0100 > +++ stars_fixed.py      2009-12-16 10:53:32.545786454 +0100 > @@ -48,7 +48,9 @@ >      def __init__(self): >          self.calls = [] > > -    __getattr__ =

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
Peter Otten wrote: > simon wrote: > > Nice :) > > --- stars.py2009-12-16 10:52:49.553505036 +0100 > +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 > @@ -48,7 +48,9 @@ > def __init__(self): > self.calls = [] > > -__getattr__ = ScribeCall > +def __getattr__(s

Re: Wrapping paper, anyone ?

2009-12-16 Thread Peter Otten
simon wrote: Nice :) --- stars.py2009-12-16 10:52:49.553505036 +0100 +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 @@ -48,7 +48,9 @@ def __init__(self): self.calls = [] -__getattr__ = ScribeCall +def __getattr__(self, name): +return ScribeCall(self

Wrapping paper, anyone ?

2009-12-15 Thread simon
#!/usr/bin/env python from math import * from random import * import cairo from cairo import Context Black = (0, 0, 0) White = (1, 1, 1) def rand(): return random()*2 - 1 def rotate(theta, x, y): x, y = x*cos(theta)-y*sin(theta), x*sin(theta)+y*cos(theta) return x, y def star(ctx