learning new things from c.l.py
As a long time usenet user I find it easy to ignore the occasional
flame wars. Posters with the wrong sort of attitude are brought
gently into line by the majority.
If usenet groups had ratings I'd give c.l.py 5 stars.
--
Nick Craig-Wood n...@craig-wood.com
and address is the address of the socket sending the data.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
the corner
cases (unmatched brackets, empty brackets, etc) and be sure it works
exactly as specified. doctest is cool for this kind of stuff.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Jean-Paul Calderone exar...@divmod.com wrote:
On Sun, 22 Mar 2009 12:30:04 -0500, Nick Craig-Wood n...@craig-wood.com
wrote:
I wrote a serial port to TCP proxy (with logging) with twisted. The
problem I had was that twisted serial ports didn't seem to have any
back pressure. By that I
Jean-Paul Calderone exar...@divmod.com wrote:
On Mon, 23 Mar 2009 05:30:04 -0500, Nick Craig-Wood n...@craig-wood.com
wrote:
Jean-Paul Calderone exar...@divmod.com wrote:
[snip]
In the case of a TCP to serial forwarder, you don't actually have to
implement either a producer
it is more
awkward for writing code close to Python 3 syntax.
I tend to target whatever is in Debian stable, which starting from
this month is 2.5 (recently upgraded from 2.4).
2.6 or 3.x is nowhere to be seen in Debian stable, testing or unstable
:-(
--
Nick Craig-Wood n...@craig-wood.com
()
print done
if __name__ == __main__: main()
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
.
You would need to make a dictionary interface to sqlite, eg
http://code.activestate.com/recipes/576638/
Or do something a bit simpler yourself.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
in functions is much quicker than fork()-ing an external
command too.
So much to learn, so little time (but so much fun!)
;-)
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
buffer was full and to only take the data at 9600
baud.
I never did solve that problem :-(
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
the standard
Python library, or is that yet another adventure ?
If you use the debian compiled version then you get the lot.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
/pleac_python/index.html
Which is a sort of Rosetta stone for perl and python ;-)
(The perl cookbook translated into python.)
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
obvious. It gives you the
opportunity for a docstring also.
Yes it is a bit more typing, but who wants to play code golf all
day?
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
\\
'a\\'
Which isn't terribly elegant, but it doesn't happen very often.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
++ only when necessary.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
C parser written in
python?
GCCXML is usually used to create ctypes-structures from headers.
Look at
http://pypi.python.org/pypi/ctypeslib/
And the h2xml and xml2py scripts that are part of it.
You'll need gccxml too as Diez pointed out.
A definite time saver!
--
Nick Craig-Wood n
/signal.html
Won't work on windows and there is only one sigalarm timer, so you
can't nest them :-(
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
duration:
print i
i += 1
sleep(1)
print finished
long_function()
Which prints
starting
0
1
2
3
4
finished
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
/linecache.html
Which may be useful...
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Ben bnsili...@gmail.com wrote:
On Feb 24, 11:31?am, Nick Craig-Wood n...@craig-wood.com wrote:
So do you want to embed python into your code?
I'm still not clear what you are trying to achieve with python, though
I have a better idea what SLAG is now!
Actually no, I want to EXTEND
='Charlie', a='17', b='18', day='Tuesday', time='1:00 PM'
And leaves newfile.csv with the contents
1,2,3,Monday,1:00 PM
7,8,9,Tuesday,1:00 PM
4,5,6,Monday,2:00 PM
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
handling menu and screen control.
So do you want to embed python into your code?
I'm still not clear what you are trying to achieve with python, though
I have a better idea what SLAG is now!
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman
Calculation error
print iterative, f_iterative
print non iterative, f_noniterative
print difference, f_iterative-f_noniterative
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
a python extension in C then you do need
to worry about reference counting - a lot!
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
print self.B
a = Stuff()
a.main()
Getting A
None
None
Setting A
Getting A
aValue
aValue
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
this GUI toolkit
fits the same niche.
Presumably since it uses SDL then all the GUI will appear in one
window? So windows within windows in the MDI style?
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
= _float_pattern.search(value)
if match:
return float(match.group(1))
return 0.0
atof(15.5 Sausages)
15.5
atof( 17.2)
17.199
atof(0x12)
0.0
atof(8.3.2)
8.3007
atof(potato)
0.0
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http
to Cython.
What sort of problems have you had?
I find as long as I use the same types as the C code actually uses it
all works fine. If on a 64 bit platform long is 64 bits then it will
be under ctypes too.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http
'import array' -s 'a = array.array(c)' 'a.extend(x)'
10 loops, best of 3: 2.01 usec per loop
There are many other possibilities though like the mmap module.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
means it is an md5 hash, the next
$3nvOlOaw$ is the salt and the final $vRWaitT8Ne4sMjf9NOrVZ. is
the md5 hash in some encoded format or other! Some googling should
reveal the correct algorithm!
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org
Jean-Paul Calderone exar...@divmod.com wrote:
On Wed, 11 Feb 2009 09:31:56 -0600, Nick Craig-Wood n...@craig-wood.com
wrote:
r0g aioe@technicalbloke.com wrote:
I'm writing a linux remastering script in python where I need to chroot
into a folder, run some system commands
packages for it if you
look!
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
flagg ianand0...@gmail.com wrote:
On Feb 3, 7:32?am, Nick Craig-Wood n...@craig-wood.com wrote:
flagg ianand0...@gmail.com wrote:
?This xmlrpc server is designed to parse dns zone files and then
?perform various actions on said files. \
?It uses dnspython, and xmlrpclib
? I'd like
commitment from the python maintainers.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
kurt.forrester@googlemail.com kurt.forrester@googlemail.com wrote:
Any ideas on how to suppress the warning output:
__main__:1: Warning: No data - zero rows fetched, selected, or
processed
You can use the warnings module to suppress these I would have
thought.
--
Nick Craig-Wood n
for examples)
Don't catch all exceptions - find out which exceptions are thrown.
Consider just letting it propagate - hopefully the find_rdataset error
is descriptive enough.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
New submission from Nick Craig-Wood n...@craig-wood.com:
I noticed this the other day when debugging a program that neither set()
nor defaultdict() pprint() properly
Same under 3.1 and 2.5 (Not tried 2.6/2.7 but I assume it is the same)
pprint(set(range(100)))
set([0, 1, 2, 3, 4, 5, 6, 7, 8
()
for t in threads:
t.join()
if print_result:
try:
while True: print queue.get(block=False)
except Empty:
pass
if __name__ == __main__:
#test_lock(processes=5, process=True)
test_lock(processes=5)
--
Nick Craig-Wood n...@craig-wood.com
to me. I'd love to
be proved wrong though!
If you were thinking of passing time.time() /
clock_gettime(CLOCK_MONOTONIC) along in the Queue too, then you'll
want to know that it can differ by significant amounts on different
processors :-(
Good luck!
--
Nick Craig-Wood n...@craig-wood.com -- http
) ]
myclib.myfunction.restype = c_int # or whatever
If you do that then you should be able to pass in myiface directly or
byref(myiface).
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
'__main__.ThingTwo'
class '__main__.ThingThree'
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
or
for i in infinite_loop(10):
print iteration, i
but I agree with Tim that a for ... else loop for the limit is
clearer.
Probably yes
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Heller thel...@python.net wrote:
Nick Craig-Wood schrieb:
Thomas Heller thel...@python.net wrote:
Nick Craig-Wood schrieb:
Interesting - I didn't know about h2xml and xml2py before and I've
done lots of ctypes wrapping! Something to help with the initial
drudge work
of zip
files is it? As reading zip files does lots of disk IO I would guess
it is disk limited rather than anything else, which explains why doing
many at once is actually slower (the disk has to do more seeks).
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http
ValueError(Not a list)
super(ListField, self).__init__(s)
self.s = s.split(',')
class StringField(Field):
pass
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Heller thel...@python.net wrote:
Nick Craig-Wood schrieb:
Interesting - I didn't know about h2xml and xml2py before and I've
done lots of ctypes wrapping! Something to help with the initial
drudge work of converting the structures would be very helpful.
( http
it sequentially.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
saver.
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
9000 working ==
== Thread 1 working ==
Total time: 834.81882
--
Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
David Cournapeau courn...@gmail.com wrote:
On Thu, Dec 11, 2008 at 10:30 PM, Nick Craig-Wood n...@craig-wood.com
wrote:
David Cournapeau courn...@gmail.com wrote:
On Wed, Dec 10, 2008 at 12:04 PM, Chris Rebert c...@rebertia.com wrote:
On Tue, Dec 9, 2008 at 6:49 PM, excor...@gmail.com
that easy_install doesn't have
a) a list what you installed with easy_install
b) uninstall
in an otherwise excellent program.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Roy Smith [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
Nick Craig-Wood [EMAIL PROTECTED] wrote:
My favourite mistake when I made the transition was calling methods
without parentheses. In perl it is common to call methods without
parentheses - in python this does
- in python this does absolutely nothing! pychecker does
warn about it though.
perl - $object-method
python - object.method()
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
__call__(self):
x = self.x
self.x += 1
return x
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
and kwargs
yield result
def make_closure(*args, **kwargs):
return closure(*args, **kwargs).next
I still prefer doing it explicitly with a class though ;-)
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
. Then, *if it doesn't work fast enough*,
make it work faster.
You are 100% right of course Steve. I was just trying to answer the
specific question which is faster question which probably isn't
helpful for new Python programmers to focus on.
PS I enjoyed your book :-)
--
Nick Craig-Wood [EMAIL
fine!
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Slaunger [EMAIL PROTECTED] wrote:
On 3 Dec., 11:30, Nick Craig-Wood [EMAIL PROTECTED] wrote:
? ? ? ? ?cls = self.__class__
? ? ? ? ?if attr_name in cls.data_attr_names:
self.data_attr_names should do instead of cls.data_attr_names unless
you are overriding it in the instance (which
import foo.bar.yourclass
and use myclass.MyClass and foo.bar.yourclass.YourClass
Ultimately it is a matter of taste I think!
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Slaunger [EMAIL PROTECTED] wrote:
On 2 Dec., 11:30, Nick Craig-Wood [EMAIL PROTECTED] wrote:
For 4 attributes I'd probably go with the __getattr__.
OK, I'll do that!
Or you could easily write your own decorator to cache the result...
Eg http://code.activestate.com/recipes
Slaunger [EMAIL PROTECTED] wrote:
On 1 Dec., 16:30, Nick Craig-Wood [EMAIL PROTECTED] wrote:
I wouldn't use __getattr__ unless you've got lots of attributes to
overload. ?__getattr__ is a recipe for getting yourself into trouble
in my experience ;-)
Just do it like this...
class
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Tue, 02 Dec 2008 11:12:31 +, Nick Craig-Wood wrote:
I prefer the from module import function. That means that if module
doesn't supply function it raises an exception at compile time, not
run time when you try to run module.function
result is because stdin and stdout refer to the same
file (eg /dev/tty0 or /dev/pts/25).
No idea whether this is correct behaviour or not though!
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
(0)'
100 loops, best of 3: 1.48 usec per loop
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
these features, don't
know about Eclipse.
In fact if I had to pick one feature that a programmer's editor must
have it would be keyboard macros.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
= self.really_read_the_data()
return self._data
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
at 0xb7d13cd4
dir_fd = 3
closed (rc 0)
I don't know why os doesn't wrap - opendir, closedir, dirfd, readdir
etc - I guess because except if you are doing something esoteric, then
os.list and os.walk do everything you could possibly want.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig
that dont have access to /tmp/pdfscratch{id}
Unlikely - it takes root to change user and I wouldn't have thought
any of the files would be setuid.
Try chdir to /tmp/pdfscratch{id} first would be my suggestion.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http
...
;-)
I think that is called using // instead of / which works without any
from __future__ import from python 2.2 onwards.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
greg [EMAIL PROTECTED] wrote:
Nick Craig-Wood wrote:
(Note that basic pickle protocol is likely to be more compressible
than the binary version!)
Although the binary version may be more compact to
start with. It would be interesting to compare the
two and see which one wins
efficient. Eg
import bz2
import pickle
L = range(100)
f = bz2.BZ2File(z.dat, wb)
pickle.dump(L, f)
f.close()
f = bz2.BZ2File(z.dat, rb)
M = pickle.load(f)
f.close()
M == L
True
(Note that basic pickle protocol is likely to be more compressible
than the binary version!)
--
Nick Craig-Wood
Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
it with the
swig wrapper before you make the .so
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
if the above code worries you, then MyParseError isn't a
ValueError and you shouldn't inherit from ValueError.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
len(pickle.dumps([1,2,3], 0))
18
Or even
L = range(100)
a = pickle.dumps(L)
len(a)
496
b = a.encode(bz2)
len(b)
141
c = b.decode(bz2)
M = pickle.loads(c)
M == L
True
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman
easier. You just write C .so/.dll
and use ctypes to access them. You can do callbacks and embedding
python like this too.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
do it!
There are arguments against doing this, which I'm sure you'll hear
shortly ;-)
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
'
a[9]
'\x00'
a[9]='q'
a[9]
'q'
del a
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
examples.
Eg http://bugs.python.org/issue1515829
I'd attack this problem using beatifulsoup probably rather than
regexps!
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
(ai, bi):
return ai * bi
ci.addCallback(f)
def f(i, s):
return field(i + 1), s
map(f, enumerate(si))
PEP-3113 needs updating as it is certainly confusing here! 2to3 is
doing the wrong thing also by the look of it.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig
minutes
probably! It will take you a couple of hours the first time though.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
] on linux2
Linux 2.6.26-1-686
Intel(R) Core(TM)2 CPU T7200
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
be really helpful!
Suggestions on build/rollout tools (like zc.buildout, Paver, etc) would
also be appreciated.
Use setup.py to build into .debs is what we do.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
the exact conversions in for floats to Decimal and
Fraction by default and add a new section to the FAQ!
In that way people will see floats for what they really are - a crude
approximation to a rational number ;-)
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http
*/
if (my_result == 0)
{
PyErr_Print();
printf(Couldn't read result from MyModule.SubModule.my_function);
goto out;
}
my_result = strdup(my_result); /* keep in our own memory */
out:;
Py_XDECREF(result);
Py_XDECREF(module);
return my_result;
}
--
Nick Craig
-simplefile-crashes-on-windows-but-not-on-unix-why.htm
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Thu, 11 Sep 2008 03:36:35 -0500, Nick Craig-Wood wrote:
As an ex-perl programmer and having used python for some years now, I'd
type the explicit
v1,v2,v3 = mydict['one'], mydict['two'], mydict['two'] # 54 chars
Or maybe even
,v3 = [ mydict[k] for k in 'one two two'.split()] # 54 chars
Unlike perl, it will also blow up if mydict doesn't contain 'one'
which may or may not be what you want.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
-select.html
Actually if I really had to do this I'd use twisted. Right tool for
the job!
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
;-)
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
is supposed to achieve
rather than :
if arg == 'height':
a.height = new_value
elif arg == 'width';
a.width = new_value
Can I do this with python ? How ?
setattr(a, arg, new_value)
See: http://docs.python.org/lib/built-in-funcs.html
--
Nick Craig-Wood [EMAIL PROTECTED] -- http
*
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
for some more info on dcop :-
http://www.ibm.com/developerworks/linux/library/l-dcop/
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
to somewhere else.
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Test(object):
def __init__(self):
self.foo = []
def goo(self):
self.foo.append(2)
def moo(self):
print self.foo
test = Test()
from test2 import test
test.foo
[]
test.goo()
test.foo
[2]
test.moo()
[2]
--
Nick Craig-Wood [EMAIL PROTECTED
'
Which I think is probably acceptable...
Some to/from binary methods would be nice, or failing that an explicit
section in the docs!
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
the code into two or three processes
though. Perhaps use http://pypi.python.org/pypi/processing to
communicate between them. That should get you out of DLL Hell!
(Don't load any of the DLLs before you start the worker processes
off.)
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com
telling us how it is implemented? I'm guessing python/django by
the url and the fact that you have python stuff on your home pages but
I could be wrong!
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
Rich Harkins [EMAIL PROTECTED] wrote:
Nick Craig-Wood wrote:
[snip]
By definition any function in a functional language will
always produce the same result if given the same arguments, so you can
memoize any function.
Ah, so that's why time.time() seems to be stuck
the recursive algorithm run
fast...
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52201
--
Nick Craig-Wood [EMAIL PROTECTED] -- http://www.craig-wood.com/nick
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 644 matches
Mail list logo