Re: Determining the metaclass

2009-09-01 Thread casebash
Thanks, I am silly I cannot determine if a class is an instance of a particular metaclass. Here is my best attempt class tmp(type): ...     pass ... def c(metaclass=tmp): ...     pass ... isinstance(c, tmp) False isinstance(c.__class__, tmp) False Can anyone explain

Why does this group have so much spam?

2009-08-30 Thread casebash
So much of it could be removed even by simple keyword filtering. -- http://mail.python.org/mailman/listinfo/python-list

Re: Nice copy in interactive terminal

2009-08-30 Thread casebash
I managed to get some more answers here: http://stackoverflow.com/questions/1352886/nice-copying-from-python-interpreter On Aug 14, 5:05 pm, casebash walkr...@gmail.com wrote: I mainly develop on Linux these days, but if I ever end up doing anything on windows I'll make sure to look

Determining the metaclass

2009-08-29 Thread casebash
Hi all, I cannot determine if a class is an instance of a particular metaclass. Here is my best attempt class tmp(type): ... pass ... def c(metaclass=tmp): ... pass ... isinstance(c, tmp) False isinstance(c.__class__, tmp) False Can anyone explain why this fails? Thanks very much,

Re: Nice copy in interactive terminal

2009-08-14 Thread casebash
I mainly develop on Linux these days, but if I ever end up doing anything on windows I'll make sure to look at that. On Aug 13, 6:56 pm, Elias Fotinis \(eliasf\) efoti...@y...@h00.com wrote: casebash wrote: I've been wondering for a while if there exists an interactive terminal which has

Nice copy in interactive terminal

2009-08-12 Thread casebash
Hello fellow Python Users, I've been wondering for a while if there exists an interactive terminal which has nice copy feature (ie. I can copy code without getting the in front of every line). Thanks, Chris PS. apologies if I am posting this in the wrong group. I am unsure of the exact scope

Re: Mutable Strings - Any libraries that offer this?

2009-07-22 Thread casebash
Thanks all for your advice. I'm not actually going to use the mutable string right at the moment, but I thought I might in the future and I was just curious if it existed. I suppose a list of characters is close enough for most purposes. On Jul 22, 10:28 am, greg g...@cosc.canterbury.ac.nz wrote:

Mutable Strings - Any libraries that offer this?

2009-07-20 Thread casebash
Hi, I have searched this list and found out that Python doesn't have a mutable string class (it had an inefficient one, but this was removed in 3.0). Are there any libraries outside the core that offer this? Thanks, Chris -- http://mail.python.org/mailman/listinfo/python-list

Convert integer to fixed length binary string

2009-06-11 Thread casebash
Hi, I know the bin function converts an int into a binary string. Unfortunately, I need to know the length of the binary string when it is being read in and len(bin(x)) depends on x. Is there any way to limit it to 4 bytes? Thanks for your assistance, Chris --

Re: Convert integer to fixed length binary string

2009-06-11 Thread casebash
Sorry, I didn't quite make it clear. The issue isn't about limiting the length (as I won't be using integers bigger than this). The problem is that sometimes the output is shorter. -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert integer to fixed length binary string

2009-06-11 Thread casebash
Thanks, this is what I needed On Jun 11, 9:40 pm, Ulrich Eckhardt eckha...@satorlaser.com wrote: casebash wrote: I know the bin function converts an int into a binary string. Binary string sounds ambiguous. Firstly, everything is binary. Secondly, strings are byte strings or Unicode strings