Hi,
is there any way in Python to have iostream like __str__ operator?
--
alf
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
>>it's spelled "Windows installers"
> I want to second this. It was me who created the installer, and I don't
> like to see my name abbreviated as M$ (if you think you should write
> out the name of the MSI creator, please say "Martin's installer" :-).
ok, let me clarify, b
alf wrote:
> Martin v. Löwis wrote:
>
>>>it's spelled "Windows installers"
>>
>>I want to second this. It was me who created the installer, and I don't
>>like to see my name abbreviated as M$ (if you think you should write
>>out the name of the MSI creator, please say "Martin's installer" :-).
>
Chaos wrote:
> I am looking for ways to have a Desktop Alert, like the one most IM
> Messengers have (MSN, AIM) at the lower right above the taskbar. Can
> anyone point me to the right resources to use?
I am not sure exactly what you are looking for but
I assume you are using windows, so I would
Ok, maybe now I can make some more sense of this, with an example of
real code (sorry if it's a bit dense):
This is the basic function...
def equate(parts,new_eq):
oL = int(parts[0])
iL = int(parts[1])
iR = int(parts[2])
oR = int(parts[3])
oLoL = int(str(o
Ray wrote:
> Paul Boddie wrote:
>
>>>But at least in most developers' perception, it is (not necessarily in
>>>the absolute sense, but perhaps relative to Django or Turbogears).
>>>Mind, it doesn't even need to be true, we're talking of perception
>>>here.
>>
>>So actual maturity isn't important w
At Tuesday 29/8/2006 00:04, alf wrote:
is there any way in Python to have iostream like __str__ operator?
Define a method writeTo(f) if you want, and instead of:
f.write('%s' % obj)
use:
obj.writeTo(f)
Gabriel Genellina
Softlab SRL
_
fegge wrote:
> what module should i import?
>
You probably want urllib. If you have the Tools directory in your Python
distro you can take a look at the webchecker.py application for an
example of how it might be done.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Hol
Claudio Grondi wrote:
> Sorin Schwimmer wrote:
[...]
> It doesn't.
>
> Claudio
Sometimes silence is preferable to a concrete response. It takes less
time and occupies less bandwidth.
regards
Steve
who should perhaps have followed his own advice
--
Steve Holden +44 150 684 7255 +1 8
On 2006-08-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> There seem to be enough problems that work with ints but not with
>> floats. In such a case enforcing that the number you work with
>> is indeed an int seems fully appropiate.
>
> I've _never_ seen a case where en
On Mon, 2006-08-28 at 21:13 -0700, rdrink wrote:
>
> (BTW, as a footnote: For each of the above 'equations' the function
> equate() was called 500 times... in some cases with the list 'parts'
> equaling things like ['0',2','3','0'], so I have no reason to believe
> that the problem is with the wa
At Tuesday 29/8/2006 01:13, rdrink wrote:
File "the_farmer2.py", line 112, in equate
iL = int(parts[1])
ValueError: invalid literal for int(): -
So parts[1] is '-'.
Try adding a few print statements; I'd add a try/except around those
lines, printing parts, I bet it's not what you expect
rdrink wrote:
> Hey Simon, Thanks for the reply.
>
> Simon Forman wrote:
> > You must be doing something weird, that equation works for me:
> > Try posting the minimal code example that causes the error and the
> > full, exact traceback that you get.
>
> I appreciate the offer... but at this point
At Tuesday 29/8/2006 01:28, Antoon Pardon wrote:
> Antoon Pardon wrote:
>> There seem to be enough problems that work with ints but not with
>> floats. In such a case enforcing that the number you work with
>> is indeed an int seems fully appropiate.
>
> I've _never_ seen a case where enforcing
rdrink wrote:
> Ok, maybe now I can make some more sense of this, with an example of
> real code (sorry if it's a bit dense):
> This is the basic function...
>
> def equate(parts,new_eq):
>
> oL = int(parts[0])
> iL = int(parts[1])
> iR = int(parts[2])
> oR = int(parts[3])
>
Antoon Pardon wrote:
> On 2006-08-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Antoon Pardon wrote:
> >> There seem to be enough problems that work with ints but not with
> >> floats. In such a case enforcing that the number you work with
> >> is indeed an int seems fully appropiate.
> >
>
On 2006-08-29, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Tuesday 29/8/2006 01:28, Antoon Pardon wrote:
>
>> > Antoon Pardon wrote:
>> >> There seem to be enough problems that work with ints but not with
>> >> floats. In such a case enforcing that the number you work with
>> >> is indeed an
Thanks a lot Fredrik and Tim for your help.
Cheers,
Mohit
--
http://mail.python.org/mailman/listinfo/python-list
At Tuesday 29/8/2006 02:45, Antoon Pardon wrote:
>>That may be true. But one may wonder if this is a failing of the
>>programmer or a failing of the language that doesn't support
>>such things.
>
> In any case, I don't see how this supports the original claim that
> strict type checking input pa
> [OP] What is the proper way to test (using unit test) a method that print
> information?
> [...]
Fredrik Lundh <[EMAIL PROTECTED]> writes:
>
> Scott David Daniels wrote:
>
>> For silly module myprog.py:
>> def A(s):
>> print '---'+s+'---'
>> in test_myprog.py:
>> import unitte
Hi, Travis
I can pack my scripts into an executable with py2exe, but errors occur
once it runs:
No scipy-style subpackage 'random' found in D:\test\dist\numpy.
Ignoring: No module named info
import core -> failed: No module named _internal
import lib -> failed: 'module' object has no attribute '_
On 2006-08-29, Simon Forman <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> On 2006-08-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> > Antoon Pardon wrote:
>> >> There seem to be enough problems that work with ints but not with
>> >> floats. In such a case enforcing that the number you w
On 2006-08-29, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Tuesday 29/8/2006 02:45, Antoon Pardon wrote:
>
>> >>That may be true. But one may wonder if this is a failing of the
>> >>programmer or a failing of the language that doesn't support
>> >>such things.
>> >
>> > In any case, I don't s
201 - 223 of 223 matches
Mail list logo