Re: It looks like one function not tested by pytest

2016-01-12 Thread Robert
On Tuesday, January 12, 2016 at 3:36:13 PM UTC-5, Robert wrote: > Hi, > > I modify a test suite, and simplified to the below content. > I am interested in function: > test_bad_covariance_type() > > I think that it tests for wrong type input, i.e. > 'badcovarianc

Question about function parameter copy

2016-01-18 Thread Robert
Hi, I see the following line in a cython file (.pyx): cdef inline dtype_t _logsumexp(dtype_t[:] X) nogil: . fwdlattice[t, j] = _logsumexp(work_buffer) + framelogprob[t, j] I find that [:] is about object copy, but I am not sure about its usage here in a function parameter. Whet

Is this an attribute?

2016-01-19 Thread Robert
Hi, When I read a code snippet below, I find I don't know what 'self.framelogprob' is on the child class. // parent class class _BaseHMM(BaseEstimator): def __init__(self, n_components=1, startprob_prior=1.0, transmat_prior=1.0, algorithm="viterbi", ran

Re: Is this an attribute?

2016-01-19 Thread Robert
On Tuesday, January 19, 2016 at 3:52:12 PM UTC-5, Peter Otten wrote: > Robert wrote: > > > Hi, > > > > When I read a code snippet below, I find I don't know what > > 'self.framelogprob' is on the child class. > > > > > > > &g

Re: Is this an attribute?

2016-01-19 Thread Robert
On Tuesday, January 19, 2016 at 3:52:12 PM UTC-5, Peter Otten wrote: > Robert wrote: > > > Hi, > > > > When I read a code snippet below, I find I don't know what > > 'self.framelogprob' is on the child class. > > > > > > > &g

How to use the docstring in this property example

2016-01-20 Thread Robert
Hi, I read below code snippet on link: https://docs.python.org/2/library/functions.html#property -- class C(object): def __init__(self): self._x = None def getx(self): return self._x def setx(self, value): self._x = value def delx(self):

Re: Asymmetry in globals __getitem__/__setitem__

2014-06-13 Thread robert
On Friday, June 13, 2014 8:07:45 AM UTC+2, Marko Rauhamaa wrote: > > The documentation is a bit vague about it: > >If only globals is provided, it must be a dictionary, which will be >used for both the global and the local variables. If globals and >locals are given, they are used for

Re: ANN: ActivePython 3.2.2.3 is now available

2013-05-01 Thread Robert
Will this be the last one? It has been two years. -- http://mail.python.org/mailman/listinfo/python-list

Unicode & Pythonwin / win32 / console?

2006-01-09 Thread Robert
icode strings should be displayed as nice as possible at the console with normal print-s to stdout (on varying platforms, different windows/countries and linux, ...; I py2exe/cxfreeze apps) ... Any hints how to do this and make it as complete and automated as possible? Robert -- http://mail.pytho

Re: Unicode & Pythonwin / win32 / console?

2006-01-10 Thread Robert
Martin v. Löwis schrieb: > Robert wrote: > > I'm using Pythonwin and py2.3 (py2.4). I did not come clear with this: > > I want to use win32-fuctions like win32ui.MessageBox, > > listctrl.InsertItem . to get unicode strings on the screen - best > > results ac

(Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
tf-8 or backslashreplace if non-existing. Also: Is wide unicode output possible somehow with PythonWin - at least in certain cases? by WM_SETTEXT ,...SETITEM ... tricks? On Linux there is some improvement after setting site.py/encoding='utf-8'. Still the locale sensitive encoding on

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
gregarican wrote: > Robert wrote: > > > (windows or linux console) > > > > >>> print u'\u034a' > > > > Traceback (most recent call last): > > File "", line 1, in ? > > File "C:\PYTHON23\lib\encodings\cp850.py&q

Re: Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
t: def write(self,s): _stdout.write(s.encode(_stdoutenc,'backslashreplace')) sys.stdout=StdOut() fragile tricks... and pain on each project and python installation. Shouldn't something like that (or 'replace') (or a prominent switch-function for such behaviour) be the default for python - output the maximum, not minimum ? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode & Pythonwin / win32 / console?

2006-01-11 Thread Robert
Martin v. Löwis schrieb: > Robert wrote: > >>>>win32ui.MessageBox(s) > > > > Traceback (most recent call last): > > File "", line 1, in ? > > UnicodeEncodeError: 'ascii' codec can't encode characters in position > &g

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-11 Thread Robert
Neil Hodgson schrieb: > Robert: > PythonWin did have some Unicode support but I think Mark Hammond was > discouraged by bugs. In pythonwin/__init__.py there is a setting > is_platform_unicode = 0 with a commented out real test for Unicode on > the next line. Change this to 1

Unicode style in win32/PythonWin

2006-01-12 Thread Robert
Neil Hodgson wrote: > Robert: > > > After "is_platform_unicode = ", scintilla displays some unicode > > as you showed. but the win32-functions (e.g. MessageBox) still do not > > pass through wide unicode. > > Win32 issues are better discussed on the p

Re: Unicode & Pythonwin / win32 / console?

2006-01-12 Thread Robert
Martin v. Löwis schrieb: > Robert wrote: > > is in a PythonWin Interactive session - ok results for cyrillic chars > > (tolerant mbcs/utf-8 encoding!). > > But if I do this on Win console (as you probably mean), I get also > > encoding Errors - no matter if chcp1251, b

Re: Unicode style in win32/PythonWin

2006-01-13 Thread Robert
Thomas Heller schrieb: > "Robert" <[EMAIL PROTECTED]> writes: > > > Neil Hodgson wrote: > >> Robert: > >> > >> > After "is_platform_unicode = ", scintilla displays some unicode > >> > as you showed. but the

Python cannot print - Re: Unicode style in win32/PythonWin

2006-01-15 Thread Robert
gs\cp850.py", line 18, in encode return codecs.charmap_encode(input,errors,encoding_map) UnicodeEncodeError: 'charmap' codec can't encode characters in position 146-150: character maps to >>> => "What is this cp850.py and has to do with my (undefined?) files? A very cice language, which cannot print by default... go to Java ... Bye" My recommendation is to use 'backslashreplace as default mode. Nobody is angry when alien chars are printed in this style. Robert -- http://mail.python.org/mailman/listinfo/python-list

Guessing _charset for MIMEText ?

2006-01-18 Thread Robert
7; is not recognized commonly by email-readers, but 'ISO-8859-1' or 'Windows-1252' are usually used for that area. Robert PS: side-question: why is there a latin_1.py and a iso8859_1.py in lib/encodings ? Shouldn't they be the same? -- http://mail.python.org/mailman/listinfo/python-list

httplib/DAV: How to respond to "WWW-Authenticate: NTLM" ?

2006-10-12 Thread robert
uth? * Is there a Python function out there to do real NTLM authentication?.. and is this recommended to dig into Microsofty HTTP protocols ? -robert -- http://mail.python.org/mailman/listinfo/python-list

wxPython installation interferes with win32ui/win32gui

2006-10-13 Thread robert
hon23\Scripts" are written/changed. nothing in site-packages/pythonwin and site-packages/win32* is changed by the wx installer. Or does the wx installer change something in the DLL's in \windows or worse...? -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython installation interferes with win32ui/win32gui

2006-10-13 Thread robert
robert wrote: > > c:\Python23\pythonw.exe.manifest > c:\Python23python.exe.manifest > I found out that in fact when I move away these 2 files to a backup location after a wx installation, things go well again. What at all do this .manifest files do ? And why do win32ui apps fre

Re: wxPython installation interferes with win32ui/win32gui

2006-10-14 Thread robert
Gabriel Genellina wrote: > At Friday 13/10/2006 19:33, robert wrote: > >> > c:\Python23\pythonw.exe.manifest >> > c:\Python23python.exe.manifest >> > >> >> I found out that in fact when I move away these 2 files to a backup >> location after a w

Re: IDE that uses an external editor?

2006-10-14 Thread robert
zation capabs. (But I think there are no decent python IDE's on *nix :-( ) -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Best IDE?

2006-10-14 Thread robert
hon (as one is accustomed to in compiler langs) -robert -- http://mail.python.org/mailman/listinfo/python-list

Logging with Logger hierarchies

2006-10-20 Thread Robert
do people generally think? Is it as simple as I haven't set something up right, or do I have to declare the intermediate loggers, or does having multiple layers just suck!!! Useful comment welcome! Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Logging with Logger hierarchies

2006-10-20 Thread Robert
Hi again I have seen my error! I was mistakenly occasionally creating the logger using logger = logging.Logger("a.b.c") instead of logger = logging.getLogger("a.b.c") Doh. I miss my private constructors to save me from such embarrasment ;^) Cheers Robert -- http://mai

Speed comparison of Numeric, numarray, numpy

2006-10-21 Thread robert
7970242603 >>> timeit.Timer('x=a[30:40].max()','import >>> numpy;a=numpy.ones(300,numpy.float)').timeit(1) 0.21344193186450866 >>> timeit.Timer('a*=0.99','import >>> Numeric;a=Numeric.ones(300,Numeric.Float)').timeit(1) 0.293094513410324 >>> timeit.Timer('a*=0.99','import >>> numarray;a=numarray.ones(300,numarray.Float)').timeit(1) 0.061937480881169904 >>> timeit.Timer('a*=0.99','import >>> numpy;a=numpy.ones(300,numpy.float)').timeit(1) 0.16990958347923879 strange differences in all directions ... robert -- http://mail.python.org/mailman/listinfo/python-list

Converting Pascal syntax to Python

2006-10-25 Thread robert
syntax translation would help. Is there a tool or script around which can help at least to save most of typing work? -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: ZODB for inverted index?

2006-10-25 Thread robert
dex lists anyway...) ( To maybe reduce number of files/inodes bulk many items into one pickle/shleve/anddbm.. file by using sub hash keys. Example: 1 million words => 1 files x ~100 sub-entries x 1 refs. ) * a fast relational/dictionary database (mysql) * Advanced memory mapped file techniques / C-OODBMS ( ObjectStore/PSE ); 64bit OS if > 3GB ( thats the technique telecoms often run their tables fast - but this is maybe too advanced ... ) -robert -- http://mail.python.org/mailman/listinfo/python-list

conditional computation

2006-10-26 Thread robert
-expr) Any ideas? -robert -- http://mail.python.org/mailman/listinfo/python-list

numpy numbers converted wrong

2006-10-26 Thread robert
uld one better stay away from numpy in current stage of numpy development? I remember, with numarray there were no such problems. -robert PS: in Gnuplot.utils: def float_array(m): """Return the argument as a Numeric array of type at least 'Float32'. Leave 

Re: conditional computation

2006-10-26 Thread robert
Gabriel Genellina wrote: > At Thursday 26/10/2006 16:30, robert wrote: > >> I want to use a computation cache scheme like >> >> >> o = CACHECOMPUTE complex-key-expr expensive-calc-expr >> >> >> frequently and elegantly without writing c

Re: conditional computation

2006-10-26 Thread robert
Mike Kent wrote: > robert wrote: >> I want to use a computation cache scheme like >> >> >> o = CACHECOMPUTE complex-key-expr expensive-calc-expr >> >> >> frequently and elegantly without writing complex-key-expr or >> expensive-calc-expr t

Re: ANN: wxPython 2.7.1.3

2006-10-26 Thread robert
See py2.3 is still supported for Mac. I'd like a py2.3 version for Windows still :cry-baby: -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: wxPython 2.7.1.3

2006-10-26 Thread robert
John Salerno wrote: > robert wrote: >> Robin Dunn wrote: >>> Announcing >>> -- >>> >>> The 2.7.1.3 release of wxPython is now available for download at >>> http://wxpython.org/download.php. This release is a yet another >>>

Re: which one of these is better?

2006-10-26 Thread robert
#x27;with' solution you#d need: try: f=open(path) try: script=f.read() finally: f.close() except EnvironmentError,v: wx.MessageBox(v, 'Message Title') -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: conditional computation

2006-10-27 Thread robert
Bruno Desthuilliers wrote: > robert a écrit : > (snip) >> class MemoCache(dict): # cache expensive Objects during a session >> (memory only) >>def memo(self, k, f): >>try: return self[k] >>except KeyError:#<- was erro

Re: conditional computation

2006-10-27 Thread robert
Bruno Desthuilliers wrote: > robert wrote: >> Bruno Desthuilliers wrote: >>> robert a écrit : >>> (snip) >>>> class MemoCache(dict): # cache expensive Objects during a session >>>> (memory only) >>>>def memo(self, k,

Re: conditional computation

2006-10-27 Thread robert
> Robert, that's not the point. I do have enough Python knowledge to > understand this (totally trivial) code !-) > > What I don't understand is how this code is supposed to save you from > having to actually write both complex-key-expr and > expensive-calc-express

Re: what are the most frequently used functions?

2006-10-28 Thread robert
a theory, that "bad source code" has more if/else/elif/case/switch dispatching statements per number of code words (lines..) than "good code" - independent of the language. If you can count these ratio and correlate it to maybe a sf-ranking and to languages, that would be highly interesting for me... (in case drop a pointer in this thread / repeated subject) -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-28 Thread robert
ort them .. #modx import mody def fx(): mody.doy() #mody import modx def fy(): modx.dox() Python allows everything most easy for that kind of problems of all langs I know of. Mainly the fact that a module is a real object in Python provides tremendous flexibility and self-similarity

Re: what are the most frequently used functions?

2006-10-28 Thread robert
Jürgen Exner wrote: >> Xah Lee wrote: >>> I had a idea today. > > Oh, really? You should mark your calendar and celebrate the day annually!!! > >>> I wanted to know what are the top most frequently used functions in >>> the emacs lisp language. > > And the relationship with Perl, Python, Java is

latest numpy & scipy - incompatible ?

2006-10-28 Thread robert
from basic import * File "C:\PYTHON23\Lib\site-packages\scipy\special\basic.py", line 8, in ? from _cephes import * ImportError: numpy.core.multiarray failed to import >>> import numpy.core.multiarray >>> >>> import scipy >>> scipy.__version__ '0.5.1' >>> numpy.__version__ '1.0' >>> -robert -- http://mail.python.org/mailman/listinfo/python-list

import in threads: crashes & strange exceptions on dual core machines

2006-10-30 Thread robert
s in win32ui (the only complex extension lib I use) as cause for this. All statistics point towards import problems. Any ideas? Are there problems known with the import lock (Python 2.3.5) ? (I cannot easily change from Python 2.3 and it takes weeks to get significant feedback after random impro

Re: create global variables?

2006-10-30 Thread robert
om): _global.a = 1 setattr(_global,atom+'var', 2) # all/app global import myglobals def f(atom): myglobals.a=1 setattr(myglobals) your example application seems to point towards 'odd' use of these techniques. -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: import in threads: crashes & strange exceptions on dual core machines

2006-10-31 Thread robert
e only questionable things have to do with rare change of some globals, but this has not at all to do with the severe problems here and could only affect e.g wrong url2_proxy or double/unecessary re-creation of an opener, which is uncritical in my app. I'm still

Re: import in threads: crashes & strange exceptions on dual core machines

2006-11-01 Thread robert
Steve Holden wrote: > Klaas wrote: >> robert wrote: >> >>> Klaas wrote: >>> >>>> It seems clear that the import lock does not include fully-executing >>>> the module contents. To fix this, just import cookielib before the >>

Re: Python in sci/tech applications

2006-11-02 Thread robert
l import libraries? (another option is to stay with Python2.3, which has a small memory footprint and compiles with crtl4.2 libs (VC6, ...) ) -robert -- http://mail.python.org/mailman/listinfo/python-list

Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-02 Thread robert
ts of comfort in threaded programming robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in sci/tech applications

2006-11-02 Thread robert
Fredrik Lundh wrote: > robert wrote: > >> Is it really not possible to create extension libs with > > older MSVC or Mingw, which work with regular Python binaries > > version 2.4 and 2.5 ? > > last time I tried, it took me 20 minutes from that I typed "ming

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-03 Thread robert
Jean-Paul Calderone wrote: > On Thu, 2 Nov 2006 14:15:58 -0500, Jean-Paul Calderone > <[EMAIL PROTECTED]> wrote: >> On Thu, 02 Nov 2006 19:32:54 +0100, robert >> <[EMAIL PROTECTED]> wrote: >>> I'd like to use multiple CPU cores for selected time con

Feature Request: Py_NewInterpreter to create separate GIL (branch)

2006-11-03 Thread robert
Feature Request: Py_NewInterpreter to create separate GIL (branch) Daniel Dittmar wrote: > robert wrote: >> I'd like to use multiple CPU cores for selected time consuming Python >> computations (incl. numpy/scipy) in a frictionless manner. >> >> Interprocess com

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-03 Thread robert
Filip Wasilewski wrote: > robert wrote: >> I'd like to use multiple CPU cores for selected time consuming Python >> computations (incl. numpy/scipy) in a frictionless manner. >> >> Interprocess communication is tedious and out of question, so I thought >

Re: Keyboard interrupts, Idle vs. SciTE

2006-11-03 Thread robert
ct? Use PythonWin on Windows. It is based on the same Scintilla editor, but provides real interaction and inline script execution capabs, debugging ... SciTE catches only stdout ( sometimes :-) ) etc. robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-03 Thread robert
Daniel Dittmar wrote: > robert wrote: >> Question Besides: do concurrent INC/DEC machine OP-commands >> execute atomically on Multi-Cores as they do in Single-Core threads? > > No on the level that that Python reference counting is implemented. The > CPUs have oft

Re: Python in sci/tech applications

2006-11-03 Thread robert
Robert Kern wrote: > Magnus Lycka wrote: >> robert wrote: >>> When one follows .. >>> http://docs.python.org/inst/tweak-flags.html#SECTION000622000 >>> http://www.zope.org/Members/als/tips/win32_mingw_modules >>> >>> ..this see

Re: Is there a way to define a true global across modules?

2006-11-03 Thread robert
style - if you are too lazy to create a extra global variables module (ab)use the __main__ module als "global": import __main__ __main__.mysemphore += 1 -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in sci/tech applications

2006-11-03 Thread robert
Robert Kern wrote: > This is what Martin said: > > """ > It used to be possible to link with it. See > > http://msdn2.microsoft.com/en-us/library/abx4dbyh(VS.80).aspx > > This is now a "known DLL", and meant for use by system-level components >

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-03 Thread robert
Daniel Dittmar wrote: > robert wrote: >> (IPython is only a special "python network terminal" as already said.) > > Sorry, I thought of IronPython, the .NET variant. > >> Does Jython really eliminate the GIL? What happens when different > > Yes. >

Re: numpy help

2006-11-03 Thread robert
rent routines but I think they > call the same one ). > try scipy.linalg.inv etc. (you are using outdated old NumPy modules with recent array type which sometimes creates type conflicts. robert -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe questions

2006-11-04 Thread robert
easily be reduced to 2 files by 'embedding' the libray.zip > into the exe (use the zipfile=None option), and deleting the w9xpopen.exe > if you don't need win98 support. and finally you can use Python2.3 to avoid msvcr71.dll -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-04 Thread robert
Martin v. Löwis wrote: > robert schrieb: >> in combination with some simple locking (anyway necessary) I don't see a >> problem in ref-counting. > > In the current implementation, simple locking isn't necessary. > The refcounter can be modified freely since t

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-04 Thread robert
Paul Rubin wrote: > robert <[EMAIL PROTECTED]> writes: >>> I don't want to discourage you but what about reference >>> counting/memory >>> management for shared objects? Doesn't seem fun for me. >> in combination with some simple locking (anyway

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-04 Thread robert
GHUM wrote: > robert, > >> Interprocess communication is tedious and out of questio > [...] >> I expect to be able to directly push around Python Object-Trees between the >> 2 (or more) interpreters by doing some careful locking. > > Please do yourself a fav

Trouble compiling win32all on Windows

2006-11-04 Thread robert
;C:\Programme\Microsoft Visual Studio\VC98\BIN\link.exe"' failed with exit status 1103 C:\usr\src\pywin32-210> robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble compiling win32all on Windows

2006-11-05 Thread robert
Ross Ridge wrote: > robert wrote: >> I've trouble compiling win32all. VC98 and latest SDK installed >> (otherwise with original SDK it won't even compile). >> It tells that uuid.lib(cguid_i.obj) : fatal error LNK1103: debug info >> is destroyed. > > The

socket.error.__bases__ = (EnvironmentError,) ?

2006-11-05 Thread robert
there is a common base exception class (EnvironmentError or an new super class) for these kind of exceptions (socket, httplib, ftplib, ...) -robert -- http://mail.python.org/mailman/listinfo/python-list

Erronous "unsupported locale setting" ?

2006-11-06 Thread robert
Why can the default locale not be set by its true name? but only by '' ? : PythonWin 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32. >>> import locale >>> locale.getlocale() (None, None) >>> locale.setlocale(locale.LC_ALL,"de_DE") Traceback (most recent call last):

Re: Erronous "unsupported locale setting" ?

2006-11-06 Thread robert
Leo Kislov wrote: > robert wrote: >> Why can the default locale not be set by its true name? but only by '' ? : > > Probably it is just not implemented. But since locale names are system > specific (For example windows accepts 'ch' as Chinese in Taiwan

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-08 Thread robert
ns etc don't require extra locking Maybe the separated-GIL/interpreter-method can be a bridge to that. Refcounting probably doen't necessarily block that road. Really interesting would be to make an experiment about the speed costs of LOCK INC. Guess the hot spot regarding recounting will be Py_None's cache line (on multi core CPUs with separated cache per core). Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-08 Thread robert
robert wrote: > Martin v. Löwis wrote: [..] > > Thanks for that info. That is interesting. > Thus even on x86 currently this LOCK is not used (just > (op)->ob_refcnt++) ) > > Reading this I got pinched: In win32ui there are infact Py_INC/DECREF's > out

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-08 Thread robert
Sandra-24 wrote: > On Nov 2, 1:32 pm, robert <[EMAIL PROTECTED]> wrote: >> I'd like to use multiple CPU cores for selected time consuming Python >> computations (incl. numpy/scipy) in a frictionless manner. >> >> Interprocess communication is tedious and o

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-08 Thread robert
oshmodule.sourceforge.net/posh/html/node6.html: is this true for numpy arrays?) Every object to be inserted in the hot tunnel object tree has to be copied that same style. Thus ~pickling, but somewhat easier to use. And compiling it for Windows will be quite difficult ... Robert -- http://mail

Re: Multithreaded C API Python questions

2006-11-09 Thread robert
Usually you'd do this * if you do time consuming C/system stuff * or if the code can possibly renter Python through the system (e.g. when you call a Windows function which itself can create Windows messages to be routed back into Python message handlers) -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Multithreaded C API Python questions

2006-11-09 Thread robert
Svein Seldal wrote: > robert wrote: >> PyGILState_Ensure/Release guarantees to establish the GIL - even if it >> was already held (useful if you deal with complex call >> ordering/dependencies) > > I understand this to mean that I dont need to explicitly lock the GIL

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-09 Thread robert
Paul Rubin wrote: > robert <[EMAIL PROTECTED]> writes: >> what about speed. Is it true that IronPython is almost as fast as C-Python >> meanwhile? >> >> When this all is really true, its probably a proof that putting out >> LOCK-INC-lock's (on dict

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-09 Thread robert
sturlamolden wrote: > robert wrote: > >> I'd like to use multiple CPU cores for selected time consuming Python >> computations (incl. numpy/scipy) in a frictionless manner. > > Threading is not the best way to exploit multiprocessors in this > context. Thre

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-09 Thread robert
Paul Boddie wrote: > robert wrote: >> Shane Hathaway wrote: >>> of multiple cores. I think Python only needs a nice way to share a >>> relatively small set of objects using shared memory. POSH goes in that >>> direction, but I don't t

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-09 Thread robert
robert wrote: > -- > 0040101F mov eax,3B9ACA00h > 13: for (i = 0; i < count; ++i) { > 14: __asm lock inc x; > 00401024 lock incdword ptr [_x (00408a00)] > 15: sum += x; > 0040102B mov edx,dword ptr [_x (004

Re: how is python not the same as java?

2006-11-10 Thread robert
ssume that test code has to be done for a good program anyway (and/otherwise "pychecker" will neutralize most first-glance disadvantages of Python) * Jave (typed code) ist executed faster. Yet Python is even faster when using little C, Pyrex, ... That is probably what counts. Rob

numpy/scipy: correlation

2006-11-11 Thread robert
Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: m, m-err, o, o-err, r-coef,r-coef-err ? Or a formula to to compute the 3 error ranges? -robert PS: numpy.corrcoef computes only the bare coeff: >>> numpy.corrcoef((0,1,2,3.0),(

Re: numpy/scipy: correlation

2006-11-12 Thread robert
Robert Kern wrote: > robert wrote: >> Is there a ready made function in numpy/scipy to compute the correlation >> y=mx+o of an X and Y fast: >> m, m-err, o, o-err, r-coef,r-coef-err ? > > And of course, those three parameters are not particularly meaningful > toge

Re: numpy/scipy: correlation

2006-11-12 Thread robert
robert wrote: > Robert Kern wrote: > http://links.jstor.org/sici?sici=0162-1459(192906)24%3A166%3C170%3AFFPEOC%3E2.0.CO%3B2-Y > > > tells: > probable error of r = 0.6745*(1-r**2)/sqrt(N) > > A simple function of r and N - quite what I expected above roughly for > t

Re: numpy/scipy: correlation

2006-11-12 Thread robert
ting technique, but maybe there is a (commonly used) speedy formula for r/r_err respecting that directly? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: numpy/scipy: error of correlation coefficient (clumpy data)

2006-11-15 Thread robert
sturlamolden wrote: > robert wrote: > >>> t = r * sqrt( (n-2)/(1-r**2) ) > >> yet too lazy/practical for digging these things from there. You obviously >> got it - out of that, what would be a final estimate for an error range of r >> (n big) ? >> tha

Re: numpy/scipy: error of correlation coefficient (clumpy data)

2006-11-16 Thread robert
sturlamolden wrote: > robert wrote: > >> here the bootstrap test will as well tell us, that the confidence intervall >> narrows down by a factor ~sqrt(10) - just the same as if there would be >> 10-fold more of well distributed "new" data. Thus this k

Re: Data structure for ordered sequence

2006-11-16 Thread robert
histicated tree fumbling will cost more. Or at max use a 1D-btree thing or so for x0,x1 or a fix 16x16 array .. -robert -- http://mail.python.org/mailman/listinfo/python-list

split CSV fields

2006-11-16 Thread robert
What is a most simple expression for splitting a CSV line with "-protected fields? s='"123","a,b,\"c\"",5.640' -- http://mail.python.org/mailman/listinfo/python-list

Re: Multithreaded C API Python questions

2006-11-16 Thread robert
/Py_END_ALLOW_THREADS bracket during time consuming/system/reenter-endangered message stuff. Robert > I think I've found the bug, but I need to confirm this behavior. > > My findings is that if you use PyEval_InitThreads(), it is crucial to > release the GIL with PyE

Re: numpy/scipy: error of correlation coefficient (clumpy data)

2006-11-16 Thread robert
sturlamolden wrote: > robert wrote: > >> Think of such example: A drunken (x,y) 2D walker is supposed to walk along a >> diagonal, but he makes frequent and unpredictable pauses/slow motion. You >> get x,y coordinates in 1 per second. His speed and time pattern at all

__builtins__.loglog - logging more pythonic, decent & scalable ? - Re: "No handlers could be found for logger xxx"

2006-06-03 Thread robert
r discussion. Maybe there are more Python users which like to see that imported (managed) logging issue more down-to-earth and flexible ? ... Vinay Sajip wrote: > robert wrote: > >>some packages like paramiko use the logging. I get this messages: >>"No handlers could be fo

A WAD(-like) C-level exception catcher for Windows?

2006-06-07 Thread robert
roadmap how to do something like that with Windows most easily? -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: what are you (not) using python language for?

2006-06-07 Thread robert
rivers, small memory mics and browser client software - areas which (still) lack Python support ? -robert -- http://mail.python.org/mailman/listinfo/python-list

plotting to gif ?

2006-06-15 Thread robert
gif's/png/jpg as the images are big but mostly white and going robert -- http://mail.python.org/mailman/listinfo/python-list

msvcr71.dll necessary? - Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-16 Thread robert
apps have this requirement? And GUI apps probably count more (also in line numbers) than web apps today as more and more Delphi, BCPPB, Java, C++/MFC developers switch to Python? -robert -- http://mail.python.org/mailman/listinfo/python-list

Re: msvcr71.dll necessary? - Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-17 Thread robert
Martin v. Löwis wrote: > robert wrote: > > codecs are in python24.dll, mscvr71, mfc71 and all are not. > However, they are not in core - the operating system demand-pages code, > loading into core memory only what is being used. So if you don't use > the codecs, they a

206 The filename or extension is too long / OSError: [Errno 38] Filename too long

2006-07-01 Thread robert
>>> win32api.GetFileAttributes('?\\'+fabs) Traceback (most recent call last): File "", line 1, in ? error: (206, 'GetFileAttributes', 'Der Dateiname oder die Erweiterung ist zu lang.') >>> (='206 The filename or extension is too long') What can I do? -robert -- http://mail.python.org/mailman/listinfo/python-list

Python threads and Numeric/SciPy exploit Dual Core ?

2006-10-02 Thread robert
Simple Python code obviously cannot use the dual core by Python threads. Yet, a program drawing CPU mainly for matrix computations - preferably with Numeric/SciPy - will this profit from a dual core when using 2 (or more) Python threads? robert -- http://mail.python.org/mailman/listinfo

<    1   2   3   4   5   6   7   8   9   10   >