Re: [Tutor] Do I have to initialize TKInter before I can use it?

2005-11-14 Thread Alex Hunsley
Nathan Pinno wrote: > Hey all, > > Do I have to initialize TKInter before I can use it, and if so, how > would I go about doing that? > > Thanks, > Nathan Pinno Btw, your question would be a little more user-friendly if you don't post HTML, and don't post embedded images as well! (Not ever

Re: [Tutor] triangulation

2005-11-10 Thread Alex Hunsley
Alan Gauld wrote: >>As in Pythagoras? >> >> > > > >>Or as in triangulation on a 2D surface, navigation etc.? >> >> > > > >>Or, do you mean radio triangulation by directional signal propagation >> >> > > > >>Or, do you mean drawing a triangle in Tkinter? >> >> > >Or even trian

Re: [Tutor] python watchfolder as daemon

2005-11-10 Thread Alex Hunsley
Frank Hoffsümmer wrote: >Hello all, >I found this gem of a python recipe that allows me to monitor a hierarchy of >folders on my filesystem for additions / changes / removals of files: >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215418 > >I would like to monitor a folder hierarchy us

Re: [Tutor] image

2005-11-09 Thread Alex Hunsley
Shi Mu wrote: >any python module to calculate sin, cos, arctan? > > STFW. Have you heard of this site called "Google"? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] draw lines

2005-11-09 Thread Alex Hunsley
Danny Yoo wrote: >On Sun, 6 Nov 2005, Shi Mu wrote: > > > >>I have a list of random points: [[x0,y0],[x1,y1],...,[xn,yn]] how can I >>use Tkinter to draw lines to connect them one by one based on the order >>in the list? >> >> > >Do you know how to draw a single line in Tkinter? Have you lo

Re: [Tutor] triangulation

2005-11-09 Thread Alex Hunsley
Shi Mu wrote: >is there any sample code of triangulation? many thanks! > > Yes, probably. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] testing: doctest and unittest

2005-11-08 Thread Alex Hunsley
Colin J. Williams wrote: > Alex Hunsley wrote: > >> Regards testing, I've been playing with both the unittest >> (http://pyunit.sourceforge.net/pyunit.html) and doctest >> (http://docs.python.org/lib/module-doctest.html). I was wondering >> what peoples tho

Re: [Tutor] overloading binary operator for mixed types: a no-no?

2005-11-08 Thread Alex Hunsley
[EMAIL PROTECTED] wrote: >Alex, > >I assume you've looked at NumPy? > > Yup, I'm aware of it and it would do the job just fine (and faster too, probably). However, I'm happy writing my own code (+tests) for the moment - I'm getting more experience of writing stuff in Python. I may switch to N

Re: [Tutor] Raw image display in a GUI window

2005-11-08 Thread Alex Hunsley
Alex Hunsley wrote: > Marcin Komorowski wrote: > >> Hello, >> >> I want to use Python to do some experimentation with graphic >> processing/manipulation, and I am looking for a way to be able to >> manipulate individual pixels of the image, as well as d

Re: [Tutor] Raw image display in a GUI window

2005-11-08 Thread Alex Hunsley
Kent Johnson wrote: >Marcin Komorowski wrote: > > >>Thanks Kent, this looks promising. >>Are you very familiar with the Python Imaging Library? >> >> > >No, I have just used it for a few small things. I know it mostly by reputation. > > > >>Can I pick your >>brains if I have questions?

Re: [Tutor] Raw image display in a GUI window

2005-11-08 Thread Alex Hunsley
Marcin Komorowski wrote: >Hello, > >I want to use Python to do some experimentation with graphic >processing/manipulation, and I am looking for a way to be able to manipulate >individual pixels of the image, as well as display it in a GUI. Ideal image >representation would be something of the

Re: [Tutor] interfaces and abstract classes in python

2005-11-08 Thread Alex Hunsley
Kent Johnson wrote: >Alex Hunsley wrote: > > >>Oh yes, I'd always reply to the list in the very least; I was really >>just wondering what the etiquette was concerning emails also going back >>to the person you're reply to directly (as well as to the list)

[Tutor] testing: doctest and unittest

2005-11-08 Thread Alex Hunsley
Regards testing, I've been playing with both the unittest (http://pyunit.sourceforge.net/pyunit.html) and doctest (http://docs.python.org/lib/module-doctest.html). I was wondering what peoples thoughts were on the effectiveness and convenience of one versus the other. It seems to me that doctes

Re: [Tutor] interfaces and abstract classes in python

2005-11-08 Thread Alex Hunsley
Kent Johnson wrote: >Alex Hunsley wrote: > > >>Alan Gauld wrote: >> >> >> >> >>>>Interfaces and abstract classes - I know they don't exist per se in >>>>Python. >>>> >>>> >>>Fi

Re: [Tutor] any code to draw parabola or curve?

2005-11-08 Thread Alex Hunsley
Shi Mu wrote: >any code to draw parabola or curve? > > That question is so general and vague it's either unanswerable, or very easy to answer. I'll try the 'very easy' answer: yes, there is probably code somewhere to draw a parabola or curve. Have you tried making a start on this yourself? Di

[Tutor] overloading binary operator for mixed types: a no-no?

2005-11-08 Thread Alex Hunsley
I'm writing a Vector class (think Vector as in the mathematical vector)... A critical snippet is as follows: class Vector(lister.Lister): def __init__(self, *elems): # ensure that we create a list, not a tuple self.elems = list(elems) def __add__(self, other): retu

Re: [Tutor] interfaces and abstract classes in python

2005-11-08 Thread Alex Hunsley
Kent Johnson wrote: >Alex Hunsley wrote: > > >>Interfaces and abstract classes - I know they don't exist per se in >>Python. But what are the closest analogues? I've found a few examples, >>e.g. for an abstract class the following page has a f

Re: [Tutor] interfaces and abstract classes in python

2005-11-08 Thread Alex Hunsley
Alan Gauld wrote: >> Interfaces and abstract classes - I know they don't exist per se in >> Python. > > > First you need to define what you mean by the terms. > Every class has an interface - it is the set of messages to which it > responds. Yup, I was thinking more in terms of the Java idea,

[Tutor] interfaces and abstract classes in python

2005-11-06 Thread Alex Hunsley
Interfaces and abstract classes - I know they don't exist per se in Python. But what are the closest analogues? I've found a few examples, e.g. for an abstract class the following page has a fairly common suggestion: http://www.norvig.com/python-iaq.html thanks! alex _