On Sep 15, 1:59 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> So you are looking for the `struct` module in the standard library instead
> of doing this yourself. :-)
>
> If you insist on doing it yourself take a look at the built-in `ord()`
> function.
>
Thanks Marc,
both things are
+= int(byte) * factor
factor *= 2**8
Could you please tell me how to achieve what I want in Python? (it
would be straightforward in C)
Thanks for any suggestions,
Boris Dušek
--
http://mail.python.org/mailman/listinfo/python-list
some base class to "file"-like (or "stream"-like) objects in
Python? And if not, is it at least planned for Python 3.0?
Thanks for any suggestions,
Boris Dušek
P.S.: The code should finally look in esence something like this:
if isinstance(f, file):
pass
elif isinstance(f, string):
f = urllib.urlopen(f)
else:
raise "..."
process_stream(f)
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 19, 10:36 pm, subscriber123 <[EMAIL PROTECTED]> wrote:
> On Apr 19, 3:58 pm, Boris Dušek <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > what is the use-case of parameter "start" in string's "endswith"
> > method?
&g
Hello,
what is the use-case of parameter "start" in string's "endswith"
method? Consider the following minimal example:
a = "testing"
suffix="ing"
a.endswith(suffix, 2)
Significance of "end" is obvious. But not so for "start".
Let's assume the "end" parameter is not used - then the function
sho