Re: [Tutor] Some questions about my yen-USD.py

2006-09-07 Thread Pawel Kraszewski
;0.1")+ Decimal("0.1")+ Decimal("0.1")-Decimal("0.3") Decimal("0.0") >>> For more see: http://docs.python.org/lib/module-decimal.html -- Pawel Kraszewski http://www.kraszewscy.net ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] [tutor] how to cast to stucture

2006-09-05 Thread Pawel Kraszewski
the intended conversion to/from Python values. This can be used in handling binary data stored in files or from network connections, among other sources. - see http://docs.python.org/lib/module-struct.html -- Pawel Kraszewski http://www.kr

Re: [Tutor] beginner: using optional agument in __init__ breaks my code

2006-06-26 Thread Pawel Kraszewski
] >>> a = Queue(u) >>> b = Queue(u) >>> a.insert(12) >>> print b gives [1, 2, 3, 12] which is still wrong. However assigning self.queue a COPY of parameter (empty or not) gives the desired result: def __init__(self

Re: [Tutor] Test If File System is mounted in Linux

2006-03-18 Thread Pawel Kraszewski
Dnia piątek, 17 marca 2006 19:22, Bill Campbell napisał: > If you're sure it's a Linux system, fine. Like /etc/mtab, this isn't > portable. Looking at some of the systems we have here: Fortezza mentioned it the way I assumed he has Linux: >> If there a semi-standard way to test if a file syste

Re: [Tutor] Test If File System is mounted in Linux

2006-03-17 Thread Pawel Kraszewski
ms. Or always-up-to-date & user readable '/proc/mounts' ? -- Pawel Kraszewski ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Cannot Understand

2006-03-10 Thread Pawel Kraszewski
ve non-zero result of the whole brace. due to law L2, we don't need to evaluate R3 and calculated result RES is the return value of lambda function. -- Pawel Kraszewski P.S. This might be pythonized and de-recursived this way: ff = lambda n: reduce(lambda x, y: x*y, xrange(1,n+1)) ---

Re: [Tutor] Repeating a routine

2006-02-22 Thread Pawel Kraszewski
Dnia środa, 22 lutego 2006 12:43, John Connors napisał: > I know goto and gosub are evil, bad habits but I'm starting to miss them. You SHOULD miss them. GOSUB is called a function call in Python (you call a function by its name, rather than by its starting line number) Someone misinformed you

Re: [Tutor] Exception repeated in a loop

2005-12-06 Thread Pawel Kraszewski
to 2. begin loop 3. abort attempt if it fails, showing the error 4. take next loop II) 1. begin loop 2. attempt to execute parser.feed 3. abort attempt if it fails, showing the error AND breaking the loop 4. take next loop Hope this helps, -- Pawel Kraszewski ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python DB

2005-09-22 Thread Pawel Kraszewski
TE]--- If you don't need pure-Python,take a look at gadfly (http://gadfly.sourceforge.net) If the data isn't too big, you may even try XML storage with DOM access (PyXML http://pyxml.sourceforge.net/) HTH, -- Pawel Kraszewski ___ Tutor maill

Re: [Tutor] Iterating over sorted dictionary keys in one line

2005-09-18 Thread Pawel Kraszewski
ains unchanged [4, 3, 2, 1] >>> print a.sort() # "sort" METHOD returns nothing None >>> a # instead it changes (sorts) its argument [1, 2, 3, 4] >>> Best regards -- Pawel Kraszewski ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] fourier transform

2005-07-30 Thread Pawel Kraszewski
usually you take only half of it. I don't remember the exact difference between the halves, but you may find it in any article on FFT. Best regards, Pawel Kraszewski ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Polish translation of my tutor

2004-12-17 Thread Pawel Kraszewski
="text/html; charset=ISO-6682" Ehm... Never heard of ISO-6682... Already contacted the author. The page looks OK, when you force Windows CP 1250. -- Pawel KraszewskiFreeBSD/Linux E-Mail/Jabber Phone ICQ GG [EMAIL PROTECT