Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-18 Thread Chris Angelico
On Sat, Oct 19, 2013 at 4:26 PM, rusi wrote: > 3 examples were given (1) python's C implementation (2) OS/2 (3) Linux kernel > About 2 I dont know anything though I believe gdk and gobject are more > contemporary examples. Good point, I believe you're right there. I haven't worked with GTK/GDK i

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-18 Thread rusi
On Saturday, October 19, 2013 2:02:24 AM UTC+5:30, Peter Cacioppi wrote: > > I still say that object-based is a distinct and meaningful subset of > object-oriented programming. Yes that is what is asserted by http://www-public.int-evry.fr/~gibson/Teaching/CSC7322/ReadingMaterial/Wegner87.pdf --

Re: Inter-process locking

2013-10-18 Thread Jason Friedman
> There is one caveat, however. If a process that has the lock crashes without > releasing the lock, the lock file will stay around and prevent other > processes to acquire it. Then you will have to manually remove it. I > generally prefer a solution where the pid of the locking process is writt

Re: Python package statistics

2013-10-18 Thread Yaşar Arabacı
Hi Terry, Thanks for pointing it out.matplotlib's hist function wasn't broken after all :) I published non-parametric statistics here: http://ysar.net/python/python-package-statistics-additions.html 2013/10/18 Terry Reedy : > On 10/18/2013 8:41 AM, Yaşar Arabacı wrote: >> >> Hi people, >> >> I co

Re: finding data from two different files.

2013-10-18 Thread Jim Gibson
In article , <"torque.in...@gmail.com"> wrote: > Hi all, > > I am new to python, just was looking for logic to understand to write code in > the below scenario. > > I am having a file (filea) with multiple columns, and another file(fileb) > with again multiple columns, but say i want to use colu

xtopdf, a Python toolkit for PDF creation from other file formats

2013-10-18 Thread vasudevram
Hi list, xtopdf is not new. I first created it some years ago. And have been updating it with new features and capabilities now and then. But I realized that there was no central place where its features and uses were described. So I created an online presentation about xtopdf, using http://s

Re: Looking for UNICODE to ASCII Conversioni Example Code

2013-10-18 Thread Zero Piraeus
: On Fri, Oct 18, 2013 at 01:45:53PM -0700, caldwelli...@gmail.com wrote: > I am looking for an example of a UNICODE to ASCII conversion example > that will remove diacritics from characters (and leave the characters, > i.e., Klüft to Kluft) as well as handle the conversion of other > characters,

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-18 Thread Peter Cacioppi
> give me practicality beats purity any day of the week :) Without some notion of theory you will end up with php instead of python (see how I looped the thread back around on track ... you're welcome). If you think php is no worse than python for building reliable, readable code bases than go

Looking for UNICODE to ASCII Conversioni Example Code

2013-10-18 Thread caldwellinva
Hi! I am looking for an example of a UNICODE to ASCII conversion example that will remove diacritics from characters (and leave the characters, i.e., Klüft to Kluft) as well as handle the conversion of other characters, like große to grosse. There used to be a program called any2ascii.py (htt

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-18 Thread Mark Lawrence
On 18/10/2013 21:32, Peter Cacioppi wrote: I think the author goes a little too far to claim that "strong" "weak" are meaningless terms when it comes to type systems I can live with that, actually. The important language classifications are more along the lines of static vs. dynamic typing, p

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-18 Thread Peter Cacioppi
> I think the author goes a little too far to claim that "strong" > "weak" are meaningless terms when it comes to type systems I can live with that, actually. The important language classifications are more along the lines of static vs. dynamic typing, procedural vs. functional, no objects vs. o

Re: Changing the terminal title bar with Python

2013-10-18 Thread dickey
On Friday, October 18, 2013 12:46:19 PM UTC-4, Steven D'Aprano wrote: > xterms used to have a feature where they would write the title back to > standard input. Unfortunately, it has been disabled for security reasons, > so I haven't been able to get this to work (not that I tried very > hard..

Re: ANN: matplotlib 1.3.1

2013-10-18 Thread Nelle Varoquaux
I've mentioned on the matplotlib mailing list that 1.3.1 is missing from pypi. For installation problems, you'll have more luck on the matplotlib mailing list than here: it seems you may have some dependencies problem, but I'm really not competent enough to help you with that. Cheers, On 18 Octob

Re: Multiprocessing: killing children when parent dies

2013-10-18 Thread Terry Reedy
On 10/18/2013 8:52 AM, Марк Коренберг wrote: import prctl This is not a stdlib module. prct.set_pdeathsig(.) if os.getppid() == 1: raise AlreadyDead() What is your point? Your signature said >Segmentation fault If you meant that the above code segfaults, then there is a bug in prct

Re: Multiprocessing: killing children when parent dies

2013-10-18 Thread Ricardo Aráoz
El 18/10/13 13:18, John Ladasky escribió: What a lovely thread title! And just in time for Halloween! :^) LOL Couldn't that be construed as "sexism"? Next we'll have a new long moronic thread about sexism and discrimination in mail subjects. Which will, as usual, leave a lot of satisfied eg

Re: Python package statistics

2013-10-18 Thread Terry Reedy
On 10/18/2013 8:41 AM, Yaşar Arabacı wrote: Hi people, I collected some data on PyPI and published some statistics about packages on PyPI. I think you might find it an interesting read: http://ysar.net/python/python-package-statistics.html "b2gpopulate (36MB) ... Total sizes on packages in Py

Re: Weird problem with UDP and gevent

2013-10-18 Thread Roy Smith
On Friday, October 18, 2013 1:04:38 PM UTC-4, James Harris wrote: > Those are two different things. You would normally use connect() on a > SOCK_STREAM socket. It requires that the remote endpoint, in this case > localhost:9700, has an open socket listening for connections. sendto() is > the rig

Re: Receiving 'NAMEERROR:name' when I try and execute my code in DEBUG mode

2013-10-18 Thread Dave Angel
On 18/10/2013 13:02, telconsta...@gmail.com wrote: > Hey John, > > Thanks for the response. I really don't know why I didn't think about that. I > decided to add the following statement: > > print root > > When I RUN, this is what I get: > C:\My Documents\Netbeans\Mytests > > When I debug, this i

Re: Receiving 'NAMEERROR:name' when I try and execute my code in DEBUG mode

2013-10-18 Thread Steven D'Aprano
On Fri, 18 Oct 2013 10:02:59 -0700, telconstar99 wrote: > Any > thoughts on how to detect the runtime CWD? import os os.getcwd() -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: matplotlib 1.3.1

2013-10-18 Thread Ned Deily
In article , Piet van Oostrum wrote: > I tried to install it from source, on Mac OS X 10.6.8, with Python > 3.3.2, and Tck/Tk 8.5 installed as Frameworks, but I get an error during > compilation. It seems it doesn't find the Tcl/TK framework. > > > building 'matplotlib.backends._tkagg' extensio

Re: Weird problem with UDP and gevent

2013-10-18 Thread James Harris
"Roy Smith" wrote in message news:l3riea$82$1...@panix2.panix.com... > I'm running: > > Ubuntu Precise > Python 2.7.3 > django 1.4.5 > gunicorn 0.17.4 > gevent 1.0dev (rc3) > > I haven't been able to pin this down exactly, but it looks like if I > do (inside of a custom logging.Handler subclass):

Re: Receiving 'NAMEERROR:name' when I try and execute my code in DEBUG mode

2013-10-18 Thread telconstar99
Hey John, Thanks for the response. I really don't know why I didn't think about that. I decided to add the following statement: print root When I RUN, this is what I get: C:\My Documents\Netbeans\Mytests When I debug, this is what I get: C:\Program Files Having these two directories as differ

Changing the terminal title bar with Python

2013-10-18 Thread Steven D'Aprano
You might find this useful, or just for fun, but on POSIX systems (Linux, Unix, Apple Mac, but not Windows) you can change the title of the terminal window from Python. Not all terminals support this feature, but those which emulate an xterm do. import os GOOD_TERMINALS = ["xterm"] def set_ti

Re: Multiprocessing: killing children when parent dies

2013-10-18 Thread John Ladasky
What a lovely thread title! And just in time for Halloween! :^) -- https://mail.python.org/mailman/listinfo/python-list

Re: strange array size problem

2013-10-18 Thread chip9munk
On Friday, October 18, 2013 5:37:14 PM UTC+2, Robert Kern wrote: > The numpy-discussion mailing list is probably the best place to ask. I > recommend > > posting a complete working example (with data) that demonstrates the problem. > > Use pastebin.com or a similar service if necessary. > >

Re: strange array size problem

2013-10-18 Thread Oscar Benjamin
On 18 October 2013 16:52, wrote: > Interesting! > rank of the whole minus last row > numpy.linalg.matrix_rank(users_elements_matrix[:,0:42]) is 42 > > but also rank of whole is > numpy.linalg.matrix_rank(users_elements_matrix[:,0:43]) is 42 > > but what does that mean?! It means that the additio

Re: Receiving 'NAMEERROR:name' when I try and execute my code in DEBUG mode

2013-10-18 Thread John Gordon
In <311c58bc-a826-468f-8c37-cb53600d4...@googlegroups.com> telconsta...@gmail.com writes: > Hello, > I'm writing a testing framework in Jython. My code executes successfully > when I RUN my project, however, when I DEBUG my project I receive the > following error > SOURCE:NAMEERROR:name 'Load_C

Re: strange array size problem

2013-10-18 Thread chip9munk
On 18.10.2013 18:05, Oscar Benjamin wrote: It means that the additional column is a linear combination of the existing columns. This means that your system of equations can contain a contradiction. Essentially you're trying to get the least squares solution to something like: 3*x + y = 1 1*x +

Re: ANN: matplotlib 1.3.1

2013-10-18 Thread Piet van Oostrum
Michael Droettboom writes: > I'm pleased to announce the release of matplotlib version 1.3.1. This is a > bugfix release. > > It may be downloaded from here, or installed through the package manager of > your choice (when available): > > http://matplotlib.org/downloads > It is not available t

Re: strange array size problem

2013-10-18 Thread chip9munk
Interesting! rank of the whole minus last row numpy.linalg.matrix_rank(users_elements_matrix[:,0:42]) is 42 but also rank of whole is numpy.linalg.matrix_rank(users_elements_matrix[:,0:43]) is 42 but what does that mean?! could you explain briefly what now? thank you! On Friday, October 18, 20

Re: strange array size problem

2013-10-18 Thread Oscar Benjamin
On 18 October 2013 16:36, wrote: > one more thing. > > the problem is not in the last column, if I use it in regression (only that > column, or with a few others) I will get the results. But if I use all 43 > columns python breaks! Have you tried testing the rank with numpy.linalg.matrix_rank?

Re: strange array size problem

2013-10-18 Thread chip9munk
one more thing. the problem is not in the last column, if I use it in regression (only that column, or with a few others) I will get the results. But if I use all 43 columns python breaks! whhh?!?!?! thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: strange array size problem

2013-10-18 Thread Robert Kern
On 2013-10-18 16:25, chip9m...@gmail.com wrote: Hello everybody! One strange problem, please help! I have the following 2D array: users_elements_matrix numpy.shape(users_elements_matrix) is (100,43) and array merged_binary_ratings numpy.shape(merged_binary_ratings) is (100,) Now,when I run: n

Receiving 'NAMEERROR:name' when I try and execute my code in DEBUG mode

2013-10-18 Thread telconstar99
Hello, I'm writing a testing framework in Jython. My code executes successfully when I RUN my project, however, when I DEBUG my project I receive the following error SOURCE:NAMEERROR:name 'Load_Configurations' is not defined["NameError: name 'Load_Configurations' is not defined I'm new to pyth

strange array size problem

2013-10-18 Thread chip9munk
Hello everybody! One strange problem, please help! I have the following 2D array: users_elements_matrix numpy.shape(users_elements_matrix) is (100,43) and array merged_binary_ratings numpy.shape(merged_binary_ratings) is (100,) Now,when I run: numpy.linalg.lstsq(users_elements_matrix, merged_bi

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread ishish
Am 18.10.2013 15:09, schrieb Robert Kern: On 2013-10-18 05:03, Chris Angelico wrote: On Fri, Oct 18, 2013 at 2:14 PM, Steven D'Aprano wrote: On Thu, 17 Oct 2013 10:16:24 -0700, Roy Smith wrote: On Thursday, October 17, 2013 11:07:48 AM UTC-4, Chris Angelico wrote: Module names should be de

Re: Passing C pionters to Python for use with cffi

2013-10-18 Thread Eric Frederich
Dieter, Thanks for the reply. I actually have a fully working set of bindings using Cython. I'm looking to move away from Cython and use cffi. My reasoning is that with cffi my binding package would be pure python. Also, I want my all my code to be Python, not Cython. I don't care about performan

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Nelle Varoquaux
(I forgot to reply to all, so I'm adding python-list in cc back). >> Strangely I have never seen sexism on python nor on ruby and the > >> stangest thing is that this subject seems to make more speach than how > >> think algorithm in python -_-' > >> > > > > If you have any doubt sexisms exists in

Weird problem with UDP and gevent

2013-10-18 Thread Roy Smith
I'm running: Ubuntu Precise Python 2.7.3 django 1.4.5 gunicorn 0.17.4 gevent 1.0dev (rc3) I haven't been able to pin this down exactly, but it looks like if I do (inside of a custom logging.Handler subclass): # Paraphrased from the actual code remote_addr = ("localhost", 9700)

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Robert Kern
On 2013-10-18 05:03, Chris Angelico wrote: On Fri, Oct 18, 2013 at 2:14 PM, Steven D'Aprano wrote: On Thu, 17 Oct 2013 10:16:24 -0700, Roy Smith wrote: On Thursday, October 17, 2013 11:07:48 AM UTC-4, Chris Angelico wrote: Module names should be descriptive, not fancy. Interesting comment

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Robert Kern
On 2013-10-18 04:14, Steven D'Aprano wrote: On Thu, 17 Oct 2013 10:16:24 -0700, Roy Smith wrote: On Thursday, October 17, 2013 11:07:48 AM UTC-4, Chris Angelico wrote: Module names should be descriptive, not fancy. Interesting comment, on a mailing list for a language named after a snake, e

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Aurélien DESBRIÈRES
Strangely I have never seen sexism on python nor on ruby and the stangest thing is that this subject seems to make more speach than how think algorithm in python -_-' Regards Bob Hartwig writes: > I think we should follow the lead of the radio and TV industry, and let the > FCC decide what's

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Bob Hartwig
I think we should follow the lead of the radio and TV industry, and let the FCC decide what's acceptable. On second thought, that won't work - they would let "therapist" through, and as we all know, that has a double meaning. On Fri, Oct 18, 2013 at 4:57 AM, ishish wrote: > Am 17.10.2013 18:

Multiprocessing: killing children when parent dies

2013-10-18 Thread Марк Коренберг
import prctl prct.set_pdeathsig(.) if os.getppid() == 1: raise AlreadyDead() -- Segmentation fault -- https://mail.python.org/mailman/listinfo/python-list

Python package statistics

2013-10-18 Thread Yaşar Arabacı
Hi people, I collected some data on PyPI and published some statistics about packages on PyPI. I think you might find it an interesting read: http://ysar.net/python/python-package-statistics.html -- http://ysar.net/ -- https://mail.python.org/mailman/listinfo/python-list

Re: finding data from two different files.

2013-10-18 Thread Roy Smith
In article , "torque.in...@gmail.com" wrote: > Hi all, > > I am new to python, just was looking for logic to understand to write code in > the below scenario. > > I am having a file (filea) with multiple columns, and another file(fileb) > with again multiple columns, but say i want to use co

Re: urllib2 timeout issue

2013-10-18 Thread Jérôme
Thu, 17 Oct 2013 15:55:06 +0200 Ervin Hegedüs a écrit: > Has your router/modem any HTTP proxy feature? If yes, maybe the > proxy gives the late answer. I don't think so. I didn't find anything like this in the config. > Anyway, if you don't have proxy, and the DNS error cames from > local syste

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread ishish
Am 17.10.2013 18:16, schrieb Roy Smith: On Thursday, October 17, 2013 11:07:48 AM UTC-4, Chris Angelico wrote: Module names should be descriptive, not fancy. Interesting comment, on a mailing list for a language named after a snake, especially by a guy who claims to prefer an language named a

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Mark Lawrence
On 18/10/2013 04:14, Steven D'Aprano wrote: On Thu, 17 Oct 2013 10:16:24 -0700, Roy Smith wrote: On Thursday, October 17, 2013 11:07:48 AM UTC-4, Chris Angelico wrote: Module names should be descriptive, not fancy. Interesting comment, on a mailing list for a language named after a snake, e

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-18 Thread Mark Lawrence
On 18/10/2013 08:44, Chris Angelico wrote: On Fri, Oct 18, 2013 at 6:40 PM, Mark Lawrence wrote: On 18/10/2013 00:53, Peter Cacioppi wrote: You know, I'd heard somewhere that Goto was considered harmful trying to remember exactly where Yep, but it's used throughout the CPython code

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-18 Thread Mark Lawrence
On 18/10/2013 02:49, Steven D'Aprano wrote: Because it was tedious, repetitive work, and because most of the men were over in Europe getting shot at, nearly all of the computers at Bletchly Park were women. The actual mechanical computing devices were called "bombes", I kid you not. What compl

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-18 Thread Mark Lawrence
On 18/10/2013 01:43, Peter Cacioppi wrote: Cmon, Skip, assuming everyone gets the "considered harmful" reference falls under the "we're all adults here" rubric. Context, context everywhere trying to remember exactly where -- Roses are red, Violets are blue, Most poems rhyme, But this

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-18 Thread Chris Angelico
On Fri, Oct 18, 2013 at 6:40 PM, Mark Lawrence wrote: > On 18/10/2013 00:53, Peter Cacioppi wrote: >> >> You know, I'd heard somewhere that Goto was considered harmful trying >> to remember exactly where >> > > Yep, but it's used throughout the CPython code for error handling, nothing > wr

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-18 Thread Mark Lawrence
On 18/10/2013 00:53, Peter Cacioppi wrote: You know, I'd heard somewhere that Goto was considered harmful trying to remember exactly where Yep, but it's used throughout the CPython code for error handling, nothing wrong with that as it's crystal clear that you're going to one place