From: Andre W. <Andre.Wobst@Physik.Uni-Augsburg.DE> - 2002-02-26 17:12:05
|
Hi, On 26.02.02, Joerg Lehmann wrote: > > It might be natural (I feel quite sure), that we then do have a globa= l > > unit variable. For the moment, we don't have it and therefore run int= o > > the troubles you talked about. We may know just decide, what to do. I > > would say, that it is ok. Even so, there is a way out by doing: >=20 > I also think, that we should do it like that and drop our present > scheme. It's really too complicated and the user gains not very much > from it. Yes. And it is just not necessary. However see note below. > > import pyx as pyx1 > > import pyx as pyx2 > >=20 > > Whenever you use now pyx1, you should be able to access the pyx1 > > global defaultunit, whereas you do the same within pyx2. I haven't > > tried it (have never done something like that), but hopefully this is > > possible. The key for doing so, is that the lineto for example doesn'= t > > just look for pyx.unit.defaultunit, but for self.???.unit.defaultunit. > > The question is, if all that is available in the modules namespace > > somehow. But I guess so. We should try it. It would be a nice startin= g > > point for writing a arg.tex like proposal on units ... >=20 > I'm not quite sure, whether something like this would work, but > however, this is IMHO not that important. Usually you just want one sca= ling > of the units at any time.=20 That's right, of course. And I would even think about locking the defaultunit after it's first use --- on the other side this might make problems, but I don't guess so. And it might create some overhead (what would be bad). However, I would like to see a locking. But what I really wanted to say is that I will try out that crap I wrote above. (BTW: it might be, that it is not even necessary to write something complicated like self.???.unit.defaultunit ... it might just work by default. I'll find that out.) The main point is, that we then would be able to *have* different units (what happens when mixing these things??? ... I also guess that that's might work without any problems) ... and at the same time have a default unit in each subsystem. I would like that quite a lot. > Ok, to conclude this thread from my side, I would suggest that we drop > unit in canvas pretty soon. Any objections? No. And we should not be worried if that "import as" doesn't work. It's not crucial. So just proceed ... Andr=E9 --=20 by _ _ _ Andre.Wobst@Physik.Uni-Augsburg.DE / \ \ / ) http://www.physik.uni-augsburg.de/~wobsta/ / _ \ \/\/ / watch a movie and learn about the mystery tippe top: (_/ \_)_/\_/ http://www.physik.uni-augsburg.de/~wobsta/tippetop/ |