Re: Chaco for real-time plot of PySerial data

2011-11-03 Thread Robert Kern
ates it with new data: https://github.com/enthought/chaco/tree/master/examples/demo/updating_plot I can't help much with the PySerial part, I'm afraid. Integrating that with the GUI event loop is probably going to be the trickiest bit. -- Robert Kern "I have come to believe that th

Re: else in try/except

2011-11-15 Thread Robert Kern
isError or ThatError # exceptions that should not be caught by the above except: blocks. # Other code that runs regardless if a caught-and-continued exception # was raised or not -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terr

Re: cmd.Cmd asking questions?

2011-11-28 Thread Robert Kern
ly *less* uniform to have some questions requiring an enter and some not. It can be unpleasantly surprising to the user, too. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though i

Re: cmd.Cmd asking questions?

2011-11-30 Thread Robert Kern
On 11/30/11 3:30 AM, Cameron Simpson wrote: On 29Nov2011 13:37, Tim Chase wrote: | On 11/28/11 06:27, Robert Kern wrote: [...] |>I actually have a preference for needing to press enter for |>Y/N answers, too. It's distinctly *less* uniform to have some |>questions requiring an

Re: why is bytearray treated so inefficiently by pickle?

2011-12-06 Thread Robert Kern
pickling protocol let numpy use raw binary data in the pickle. However, for backwards compatibility, the default protocol is the one Python started out with. If you explicitly use the most recent protocol, then you will get the efficiency benefits. -- Robert Kern "I have come to believe

Re: Misleading error message of the day

2011-12-08 Thread Robert Kern
e to want to unpack a string. Maybe the message should changed to "too {many, few} values to unpack (are you sure you wanted to unpack a string?)" if the RHS is a basestring? Would including the respective numbers help your thought processes? ValueError: too many values to unpack (expected

Sybase module 0.40pre2 released

2011-12-08 Thread Robert Boehne
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. Please downolad, test and report any problems with the pre-release. ** This version is a pre-release not intended for p

Re: Misleading error message of the day

2011-12-08 Thread Robert Kern
at the end of the process. unpack_iterable() has the original object available to it, not just the iterator. It could opportunistically check for __len__() and fall back to the less informative message when it is absent. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: Numpy ndarray to C array

2011-12-08 Thread Robert Kern
like to avoid using boost, swig, etc. You will find it better to ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists In this case, you are looking for the PyArray_AsCArray() function: http://docs.scipy.org/doc/numpy/reference/c-api.array.html#PyArray_AsCArray

Re: I love the decorator in Python!!!

2011-12-09 Thread Robert Kern
ttp://docs.python.org/library/functools#functools.update_wrapper -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://

Re: I love the decorator in Python!!!

2011-12-12 Thread Robert Kern
On 12/12/11 3:36 AM, alex23 wrote: On Dec 9, 8:08 pm, Robert Kern wrote: On 12/9/11 5:02 AM, alex23 wrote: The 3rd party 'decorator' module takes care of issues like docstrings &function signatures. I'd really like to see some of that functionality in the stdlib thou

Re: What happened to module.__file__?

2011-12-12 Thread Robert Kern
ilds typically have math and several other stdlib "extension" modules built into the PythonXY.dll . Unix builds typically, but apparently not always, leave mathmodule.so and others as separate extension modules. -- Robert Kern "I have come to believe that the whole world is an enigm

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Robert Kern
but not quite, the same thing. They aren't saying that you couldn't *define* such an operator; they would just prefer that we didn't abuse the name. But really, it's their fault for using notation that looks like an operator. -- Robert Kern "I have come to believe that th

Re: Grammar for classes

2011-12-20 Thread Robert Kern
So what is this clause for? I suspect that it's harder to make a grammar rule that allows every kind of expression except for generator expressions than it is just to reuse the "testlist" rule and let the runtime reject the generator object when it goes to construct the class.

Re: Grammar for classes

2011-12-20 Thread Robert Kern
On 12/20/11 5:05 PM, Joshua Landau wrote: On 20 December 2011 10:55, Robert Kern mailto:robert.k...@gmail.com>> wrote: On 12/20/11 1:34 AM, Joshua Landau wrote: In reading thorough the syntax defined in the reference <http://docs.python.org/py3k/__

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-21 Thread Robert Kern
pe. In order to handle old-style classes, it checks for the type using .__class__ first. ElementProxy's __getattribute__() gets in the way here by returning a generator instead of the ElementProxy class. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-22 Thread Robert Kern
able experience. You can point out the flaws of Elementwise's implementation and compare it to the virtues of PEP 225 without being so demanding. He doesn't "need to tell" you a damn thing. -- Robert Kern "I have come to believe that the whole world is an enigma,

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-22 Thread Robert Kern
On 12/21/11 5:07 PM, Paul Dubois wrote: You're reinventing Numeric Python. Actually, he's not. The numerical operators certainly overlap, but Elementwise supports quite a bit more generic operations than we ever bothered to implement with object arrays. -- Robert Kern "

Re: Why does this launch an infinite loop of new processes?

2011-12-22 Thread Robert Kern
erate stub scripts that do not use a __main__ guard, so installing a multiprocessing-using application with setuptools can cause this problem. I believe newer versions of distribute has this problem fixed, but I'm not sure. -- Robert Kern "I have come to believe that the whole world is a

Re: Why does this launch an infinite loop of new processes?

2011-12-22 Thread Robert Kern
On 12/22/11 11:24 AM, Robert Kern wrote: Just as a further note on these lines, when older versions of setuptools and distribute install scripts, they generate stub scripts that do not use a __main__ guard, so installing a multiprocessing-using application with setuptools can cause this problem

Re: what does 'a=b=c=[]' do

2011-12-23 Thread Robert Kern
ated with extra care. "Bug" means, roughly, "something that should be fixed" not just any "thing that has some unwanted consequences". So yes, by calling it a bug you are asking and implying just that. If you don't mean that, don't use the word "bug"

Re: what does 'a=b=c=[]' do

2011-12-23 Thread Robert Kern
On 12/23/11 1:23 PM, rusi wrote: On Dec 23, 6:10 pm, Robert Kern wrote: On 12/23/11 10:22 AM, rusi wrote: On Dec 23, 2:39 pm, Steven D'Apranowrote: Some people might argue that it is a mistake, a minor feature which allegedly causes more difficulties than benefits. I do not hold

Re: Slices when extending python with C++

2011-12-28 Thread Robert Kern
e object in addition to integer indices. http://docs.python.org/c-api/slice.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umber

Re: Slices when extending python with C++

2011-12-28 Thread Robert Kern
On 12/28/11 1:01 PM, roze...@volny.cz wrote: Dear Robert, thank you very much for your answer. I understand what you mean and I have looked at slice object and C-api methods it provides. It should be easy to implement it. The only question is how exactly yo implement the general getter, since

Re: Help in rotate 13 program

2011-12-29 Thread Robert Kern
On 12/29/11 11:48 AM, Sayantan Datta wrote: cat sample.html | python rot13.py rot13.html cat sample.html | python rot13.py > rot13.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpr

Re: pickling instances of metaclass generated classes

2011-12-29 Thread Robert Kern
just explicitly register a reduction function for each type using copy_reg.pickle(): http://docs.python.org/library/copy_reg -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: .format vs. %

2011-12-31 Thread Robert Kern
on of this concept? I don't think the (%r)epr-formatting exist anymore, so if you want to do that you'll need to call repr manually. Yes, it does. formatter = '{!r} {!r} {!r} {!r}' print formatter.format(1,2,3,4) -- Robert Kern "I have come to believe that the w

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Robert Kern
tell him that you don't appreciate his abuse of PyPI here if you like: http://feilong.me/2012/01/python-import-girlfriend -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though i

Re: Spamming PyPI with stupid packages

2012-01-02 Thread Robert Kern
, nor is it the logical conclusion of anything that anyone has expressed here. Please don't invent strawmen. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it

Re: [Tutor] Parse multi line with re module.

2012-01-03 Thread Robert Sjoblom
uld know. -- best regards, Robert S. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get id(function) for each function in stack?

2012-01-07 Thread Robert Kern
ly if you're only wrapping when debugging). His problem is that he wants to find out when someone is using the builtin sum() on his objects (which apparently don't react well to it) and give an informative warning. __builtin__.sum() is not under his control, fortunately. -- Rober

Re: python philosophical question - strong vs duck typing

2012-01-09 Thread Robert Kern
rmail/python-list/2011-February/1265760.html [2] http://mail.python.org/pipermail/python-list/2011-April/1269056.html -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underl

Re: contextlib.contextmanager and try/finally

2012-01-11 Thread Robert Kern
osing code will be called if __exit__() gets called. That will exhaust your generator, so the .close() method will not really do anything helpful or hurtful in such a case. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terr

Re: why i can get nothing?

2012-01-15 Thread Robert Helmer
On Sat, Jan 14, 2012 at 7:54 PM, contro opinion wrote: > here is my code : > import urllib > import lxml.html > down='http://download.v.163.com/dl/open/00DL0QDR0QDS0QHH.html' > file=urllib.urlopen(down). > read() > root=lxml.html.document_fromstring(file) > tnodes = root.xpath("//a/@href[contains(

Re: NaN, Null, and Sorting

2012-01-16 Thread Robert Kern
them. Sounds like the quicksort algorithm. Not at all. The "split it into two lists" steps are entirely different in what Eelco suggested and quicksort. It's misleading to attempt to describe both using the same words. -- Robert Kern "I have come to believe that the wh

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-22 Thread Robert Kern
object as an iterator: [line.strip('\n') for line in f] -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

Jinja2 installation help

2013-02-08 Thread Robert Iulian
Hello, I recently started learning Python. Just finished learning the basis of it, and now I think I'm ready to start working on a simple website but I am having some difficulties installing Jinja2. Can anyone post a dummy guide on how to install it, and what to do step by step? I am using the l

Re: Jinja2 installation help

2013-02-09 Thread Robert Iulian
Here is the fucked up thing that I learned from all the hours of reading from different websites and documentation. To install Pip I need to install Easy_Install--> To install Easy_install I need to install Setup Tools whitch is NOT compatible with Python 3.XX ... If PIP is a replacement for Ea

Re: Jinja2 installation help

2013-02-09 Thread Robert Iulian
Ah...Must have slipped that. It worked! Thank you all for the support ! Be well ! Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a graphical GUI builder?

2013-02-21 Thread Robert Kern
evelopment without needing to allow end users to relink the application against user-supplied versions of Qt. The free license is the LGPL, which really is Free under all common understandings of that term. You can use the LGPL license for commercial and otherwise-proprietary applications. You

Re: Is there a graphical GUI builder?

2013-02-21 Thread Robert Kern
. Or the previous iteration under late-period TrollTech, for that matter. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Reversing bits in a byte

2013-03-12 Thread Robert Flintham
Hi, I have a 'bytes' object which contains a simple bitmap image (i.e. 1 bit per pixel). I can't work out how I would go about displaying this image. Does anyone have any thoughts? All the best, Rob Robert Flintham Trainee Clinical Scientist - MRI Tel: +44 (0)121

RE: Reversing bits in a byte

2013-03-12 Thread Robert Flintham
Ideally, I'd like to be able to access the pixel data in the form of a numpy array so that I can perform image-processing tasks on the data. So now that I've explained myself slightly more fully, does anyone have any thoughts on how to do this? All the best, Rob Robert Flintham Trai

RE: Reversing bits in a byte

2013-03-12 Thread Robert Flintham
images where an 'overlay' image is stored as a bitmap in the header information. So the bitmap data is one DICOM tag (6000,3000) and the height and width of the overlay are in two other tags (6000,0010) and (6000,0011). All the best, Rob Robert Flintham Trainee Clinical Scientist - MRI

"module could not be found" error

2013-03-19 Thread Robert Flintham
, in from . import _lbfgsb ImportError: DLL load failed: The specified module could not be found. I've checked the path, and the file lbfgsb.py is definitely at that location (as are optimize.py and _minimize.py). Does anyone know why I'm getting the error? All the best, Rob Rober

RE: "module could not be found" error

2013-03-19 Thread Robert Flintham
ject: Re: "module could not be found" error On 03/19/2013 11:10 AM, Robert Flintham wrote: > Hi, > > I'm trying to run the following, with representing an array of > floating point numbers: > > > i

Re: JIT compilers for Python, what is the latest news?

2013-04-06 Thread Robert Kern
rts of the code that Psyco was optimizing to get you the 20% performance increase and port those to Cython. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: classes and sub classes?

2013-04-09 Thread Robert Kern
I will even have to make some sort of sub-concepts, but lets postpone that game until I really have really seen the need! You probably want to use an off-the-shelf ORM (Object Relational Mapper) instead of writing your own ad hoc ORM. http://www.sqlalchemy.org/ -- Robert Kern "I have

Re: performance of script to write very long lines of random chars

2013-04-11 Thread Robert Kern
ptable. Just one important thing: os.urandom() does not block to wait for more entropy. Only os.random() does. http://en.wikipedia.org/wiki//dev/random -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad atte

Re: performance of script to write very long lines of random chars

2013-04-11 Thread Robert Kern
considers to be random bytes that it slowly builds up from noise that is made accessible to the OS from the hardware? Yes. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: Python pdb bug, followed by bug in bugs.python.org

2013-04-11 Thread Robert Kern
-> pdb.set_trace() (Pdb) c second call --Return-- > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) where /Users/rkern/scratch/pdbbug.py(5)() -> foo('first call') > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) -- Ro

Re: IDE for GUI Designer

2013-04-13 Thread Robert Kern
. You don't have to use pyuic. You can load the .ui file directly from your program. Clumsy, tedious, static. Cocoa's Interface Builder shows how to do it even though Objective-C is a *compiled* language, unlike Python. The workflow is about the same, really. -- Robert Kern "

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Robert Harper
In short, there is no such thing as a "paradigm". I agree fully. This term is a holdover from the days when people spent time and space trying to build taxonomies based on ill-defined superficialities. See Steve Gould's essay "What, If Anything, Is A Zebra?". You'll enjoy learning that there

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-18 Thread Robert Harper
The term "declarative" never meant a damn thing, but was often used, absurdly, to somehow lump together functional programming with logic programming, and separate it from imperative programming. It never made a lick of sense; it's just a marketing term. Bob Harper On Apr 18, 2013, at 2:48 PM

Re: Encoding NaN in JSON

2013-04-18 Thread Robert Kern
*string* 'N/A' for every NaN. You understand that this will result in a chunk of text that is not JSON? Other JSON readers won't be able to read it. I think he means something like this: >>> json.dumps([float('nan')]) '["N/A"]' Not '

suggestion for a small addition to the Python 3 list class

2013-04-21 Thread Robert Yacobellis
split() vs. join() it would be sufficient to just add a join() method to the list class). Please let me know your ideas, reactions, and comments on this suggestion. Thanks and regards, Dr. Robert (Bob) Yacobellis join.py Description: Binary data jointest.py Description: Binary data -- http://mail.python.org/mailman/listinfo/python-list

Re: Using SciPy in application

2013-04-24 Thread Robert Kern
annot use the function from scipy if scipy is not installed. There are three ways round this problem: 1) Rewrite the interpolation function you need in your own code. Variant: 1.a) Copy the interpolation code from scipy into your own code. -- Robert Kern "I have come to believe that the whol

Re: Using SciPy in application

2013-04-24 Thread Robert Kern
s without numpy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list

Re: Shear image (numpy.ndarray)

2013-04-27 Thread Robert Kern
py mailing lists here: http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mai

Drag and drop in Windows

2013-04-29 Thread Robert Flintham
Hello all, Sorry to post such a generic question, but after searching the interwebs I'm not really any wiser about how to start with this. I'm currently on: Windows XP Python 2.7 I'm trying to create a small window in Python 2.7, that when you drop a file onto it from Windows explorer returns

Re: How do I encode and decode this data to write to a file?

2013-04-29 Thread Robert Kern
th it? :-) I'm using a dedicated newsreader (tin) as I posted via the gmane/usenet interface. The posting looks perfectly OK to me when I read it back from usenet. FWIW, I see the same problem Dave sees. I'm using gmane via Thunderbird. -- Robert Kern "I have come to believe that t

RE: Drag and drop in Windows

2013-04-30 Thread Robert Flintham
python-list-bounces+robert.flintham=uhb.nhs...@python.org] On Behalf Of Christian Gollwitzer Sent: 29 April 2013 21:38 To: python-list@python.org Subject: Re: Drag and drop in Windows Hi Robert, Am 29.04.13 12:25, schrieb Robert Flintham: > I've found this (TkDND): > > http://wiki.tcl.t

Re: python process accounting

2013-04-30 Thread Robert Kern
ll time.sleep ? I think that was just a placeholder example, not the program he actually wants to measure. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underl

Re: python process accounting

2013-04-30 Thread Robert Kern
md) while p.poll() is None: check_stats(p.pid) # There are more accurate ways to do this, but this probably # suffices for you. time.sleep(PERIOD) if __name__ == '__main__': main() -- Robert Kern "I have come to believe that the whole world

RE: Drag and drop in Windows

2013-05-01 Thread Robert Flintham
Thanks Kevin, that looks great. It's having trouble finding TkDND though - is there a certain place in the "Python27" directory that it's most likely to look? It's currently under Lib/site-packages, but I'm suspicious that Tk/Tkinter has its own library somewhere. Christian - you were right.

Re: help..

2013-05-02 Thread Robert Kern
inner-P5YtY/1 http://help.codecademy.com/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/

Re: Proposal: Inline Import

2005-12-10 Thread Robert Kern
rwise > I don't know of any significant downsides to importing at various > points of need in the code. The actual import is only done the first time, > so it's effectively just a lookup in sys.modules from there on. > Am I missing something? Packages. -- Robert Kern [EMAIL PROTECT

Re: How does Scons compare to distutils?

2005-12-12 Thread Robert Kern
John J. Lee wrote: > I imagine scons has some support for > distutils. Not really, no. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Test the system is despised.

2005-12-14 Thread Robert Kern
know the result... I use GMane to read python-list via its newsgroup gmane.comp.python.general . It's *slightly* different from the real comp.lang.python, but mostly just by the Mailman-generated block at the bottom of each message. I started using GMane so I could read c.l.py on campus an

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread Robert Kern
ecause you want to do the project in Ruby makes sense. Picking Ruby because it only has one web framework is as silly as picking one Python web framework at random. Just because RoR is the only Ruby web framework around doesn't mean it's suitable for every project. -- Robert Kern [EMAIL PROTE

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread Robert Kern
Alex Martelli wrote: > Robert Kern <[EMAIL PROTECTED]> wrote: >... > >>Picking RoR because you want to do the project in Ruby makes sense. >>Picking Ruby because it only has one web framework is as silly as picking >>one Python web framework at random. Just

Re: Next floating point number

2005-12-16 Thread Robert Kern
Steven D'Aprano wrote: > Unless I have missed something, Python doesn't appear to give an interface > to the C library's next float function. I assume that most C floating > point libraries will have such a function. http://www.mkssoftware.com/docs/man3/nextafter.3.asp

Re: unsubscrib

2005-12-17 Thread Robert Kern
YongYong Li wrote: > I would like to unsubsrib python list, how do I do it? http://mail.python.org/mailman/listinfo/python-list Scroll to the bottom to see where you can unsubscribe. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves o

Re: What random number generator is used for Numeric and SciPy?

2005-12-18 Thread Robert Kern
edu/HELP/ranlib-docs/ranlib-docs.html scipy_core (Numeric's and numarray's replacement) and, by extension, scipy 0.4 use the Mersenne Twister. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die.&

Re: debian and python--any potential pitfalls?

2005-12-18 Thread Robert Kern
probably also want to install python2.4-dev so you can build and install packages with distutils. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing the availability of a module

2005-12-19 Thread Robert Kern
t of work to reimplement half the Python import > machinery just for checking for all kinds of files. If you're serious > about it, you also need to cope with modules loadable from ZIP files, > and with .pth files, etc. *Unless*, someone else has already done all of it for you: h

Re: numarray :: multiplying all the elements in 1d array

2005-12-20 Thread Robert Kern
a: > r = r*i > > Is there any faster, efficient way of doing this. r = multiply.reduce(a) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Robert Kern
e anything. Thus the whole debate is > pretty much moot if I am not much mistaken. Did you read anything Kent wrote? Specifically: "project that might possibly be distributed to business partners or become a porduct some day." -- Robert Kern [EMAIL PROTECTED] "In the fiel

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Robert Kern
ly BSD-licensed since BSD is compatible with the GPL. Dual licensing would only be necessary if the alternative licenses were incompatible, e.g. Artistic/GPL like Perl or MPL/GPL like Mozilla. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: The Varieties of Pythonic Experience (was: Guido at Google)

2005-12-22 Thread Robert Hicks
You mean Jython is still going? ; ) Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Robert Kern
hon"? I'm pretty sure he means "working on Python." No one hires Guido and expects him not to work *with* Python most of the time. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Robert Kern
nefits directly. http://www.cepr.net/publications/windows_2005_10.pdf -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-22 Thread Robert Kern
er ruled on the issue, and some people, like Larry Rosen, think it's likely that a judge would not choose the FSF's interpretation. I think Rosen is probably correct. However, I always assume that the author intends the FSF's interpretation unless they make an explicit exception, and I r

Re: Which Python web framework is most like Ruby on Rails?

2005-12-22 Thread Robert Kern
e as Emacs. This is > the closest thing I can think of to the Karrigell situation. RMS has said precisely the opposite, in fact. http://lists.debian.org/debian-legal/2002/11/msg00217.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves

Re: Indentation/whitespace

2005-12-25 Thread Robert Hicks
I disagree...I don't think the whitespace rule will ever be "optional". Why would it be so? If someone doesn't like it...choose another language. It is that simple really. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-26 Thread Robert Hicks
No, it is that simple. You don't want it to be is all. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Hypergeometric distribution

2005-12-26 Thread Robert Kern
ial.gammaln(n-k+1) return lgn1 - (lgnk1 + lgk1) def gauss_hypergeom(x, r, b, n): return exp(logchoose(r, x) + logchoose(b, n-x) - logchoose(r+b, n)) Or you could use gmpy if you need exact rational arithmetic rather than floating point. -- Robert Kern [

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-27 Thread Robert Hicks
Guido has never been, is not, and will not in the future be, a threat to Python. End of story. Unless of course aliens come into play. You never know. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Robert Kern
e that a selfhosting programming language > is something on the same level as a nano assembler or an artificial > intelligence. ??? What the hell are you smoking? We already have self-hosting programming languages. > Anton > > 'make my day, prove me wrong' Prove yourself

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Robert Kern
Anton Vredegoor wrote: > Robert Kern wrote: > >>I have a friend who works at Google. He has no backstabbing history at all. >>Stop >>insulting my friends. > > Your friends work for people who would never hire me. This is not a crime. > My resume sucks, > bu

Re: multidimensional array of objects in scipy core

2006-01-02 Thread Robert Kern
Stormslayer wrote: > Folks: How do you create a multidimesional array of objects w/ the size > of the array entered at runtime? So basically, for an arbitrary class, > create an array and then *.resize it to be of size NXM, and then > populate the elements of the objects. First, asking on the sci

Re: Numeric RandomArray seed problem

2006-01-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hello, > > I tried calling RandomArray.seed() > by calling RandomArray.get_seed() I get the seed number (x,y). > My problem is that x is always 113611 any advice? Well, RandomArray.seed() gets its seed from the computer's time. def seed(x=0,y=0): """seed(x, y), set

Re: why import, reload, import again?

2006-01-03 Thread Robert Kern
nows. You should ask on the scipy list as this is almost certainly a holdover from the older version of scipy. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling GPL code from a Python application

2006-01-03 Thread Robert Kern
for is whether doing > an "os.system('GPLapp')" violates GPL if I ship > my Python code that does the os.system call and the GPLapp program ? No, using the OS to run a GPLed program in another process and possibly communicating with it through pipes or sockets does not trig

Re: Python 2.4 - Help does not work in Windows

2006-01-04 Thread Robert Hicks
It must be. I just tried it with a single install of 2.4.2 on XP and got the help info with "help(time)". >>> import time >>> time.ctime() 'Wed Jan 04 08:17:29 2006' >>> help(time) Help on built-in module time: NAME time - This module pro

Re: Hypergeometric distribution

2006-01-05 Thread Robert Kern
e could even suggest an alternate algorithmic approach to your > actual end result. Does it matter? Implementing Stirling's approximation is pointless when scipy.special.gammaln() or scipy.special.gamma() does it for him. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wher

Re: [OT] How can I change Debian's default Python version?

2006-01-05 Thread Robert Kern
ed against it asking for a Python 2.4 version. Perhaps the maintainer has explained why there is no such version yet. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Translate this to python?

2006-01-06 Thread Robert Kern
rge, which > would of course mean obfuscation at other places... I believe range() will always return an iterator in Python 3000. See the first item in the section "Built-In Changes" on http://wiki.python.org/moin/Python3.0. xrange() will be going away because it will be utterly obsolet

Re: error rising while connecting oracle 9i

2006-01-07 Thread Robert Hicks
handle > Do you have the Oracle client installed? Might be something wrong with your ORA_HOME. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Translate this to python?

2006-01-07 Thread Robert Kern
to return a list. Except that we're talking about Python 3.0, which will break things anyways. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

<    12   13   14   15   16   17   18   19   20   21   >