Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 01:05 AM, Paul Rubin wrote: someonenewsbo...@gmail.com writes: Actually I know some... I just didn't think so much about, before writing the question this as I should, I know theres also something like singular value decomposition that I think can help solve otherwise illposed

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 01:38 AM, Russ P. wrote: On May 1, 4:05 pm, Paul Rubinno.em...@nospam.invalid wrote: someonenewsbo...@gmail.com writes: Actually I know some... I just didn't think so much about, before writing the question this as I should, I know theres also something like singular value

linux

2012-05-02 Thread Debashish Saha
can anyone say me how to subscribe linux mailing list like 'python mailing list'. Actually i want to post question there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble splitting strings with consecutive delimiters

2012-05-02 Thread rusi
On May 1, 9:50 am, deuteros deute...@xrs.net wrote: I'm using regular expressions to split a string using multiple delimiters. But if two or more of my delimiters occur next to each other in the string, it puts an empty string in the resulting list. For example:         re.split(':|;|px',

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Russ P.
On May 1, 11:03 pm, someone newsbo...@gmail.com wrote: On 05/02/2012 01:38 AM, Russ P. wrote: On May 1, 4:05 pm, Paul Rubinno.em...@nospam.invalid  wrote: someonenewsbo...@gmail.com  writes: Actually I know some... I just didn't think so much about, before writing the question

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Jussi Piitulainen
someone writes: except it would be nice to learn some things for future use (for instance understanding SVD more - perhaps someone geometrically can explain SVD, that'll be really nice, I hope)... The Wikipedia article looks promising to me:

Re: linux

2012-05-02 Thread Chris Angelico
On Wed, May 2, 2012 at 4:25 PM, Debashish Saha silid...@gmail.com wrote: can anyone say me how to subscribe linux mailing list like 'python mailing list'. Actually i want to post question there. Search the web, you'll find something. ChrisA --

Re: linux

2012-05-02 Thread Temia Eszteri
can anyone say me how to subscribe linux mailing list like 'python mailing list'. Actually i want to post question there. It'd probably be best to visit the mailing list (if any) for the distribution that you're using in particular. Odds are any such mailing list would be available on the

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Paul Rubin
Russ P. russ.paie...@gmail.com writes: The SVD can be thought of as factoring any linear transformation into a rotation, then a scaling, followed by another rotation. Ah yes, my description was backwards, sorry. -- http://mail.python.org/mailman/listinfo/python-list

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Paul Rubin
someone newsbo...@gmail.com writes: You will probably get better advice if you are able to describe what problem (ill-posed or otherwise) you are actually trying to solve. SVD I don't understand what else I should write. I gave the singular matrix and that's it. Nothing more is to say about

How would I go about building an API converter?

2012-05-02 Thread Alec Taylor
I have multiple different APIs with different schemas serialised in XML or JSON which I need to output as a standardised schema. Main features needed: - *Serialisation to XML and JSON* - *Authentication* - I.e.: can't get/set data unless you have the correct user+pass -

The amazing disappearing stderr

2012-05-02 Thread Peter Faulks
G'day All, Following on from my earlier query on overloading print() I've come up with this: /* stdcallbk.pyd */ /*---stdcallbk.h-*/ #ifndef STDCALLBK_MODULE_H #include Python.h #define STDCALLBK_MODULE_H // Type definition for the callback function.

reading data file into a list

2012-05-02 Thread ArifulHossain tuhin
I have this data file which contains raw data in newline terminated for like below: 10.6626 11.2683 11.9244 12.5758 14.1402 15.1636 Now i want to read that file and import this data into a numpy array. how should i go about it? -- http://mail.python.org/mailman/listinfo/python-list

Re: reading data file into a list

2012-05-02 Thread Peter Otten
ArifulHossain tuhin wrote: I have this data file which contains raw data in newline terminated for like below: 10.6626 11.2683 11.9244 12.5758 14.1402 15.1636 Now i want to read that file and import this data into a numpy array. how should i go about it? myarray =

Re: syntax for code blocks

2012-05-02 Thread Kiuhnm
On 5/2/2012 4:43, alex23 wrote: [Apologies in advance if this comes through twice] On May 2, 12:18 am, Kiuhnmkiuhnm03.4t.yahoo.it wrote: Most Pythonic doesn't mean better, unfortunately. Nor does it mean Kiuhnm prefers it. That goes without saying. For instance, assume that you want to

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Miguel Guedes
On 27/04/12 03:11, Xah Lee wrote: John Carmack glorifying functional programing in 3k words http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ where was he ten years ago? O, and btw, i heard that Common Lispers don't do functional programing, is that right? Fuck Common

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Kiuhnm
On 5/2/2012 8:00, someone wrote: Still, I dont think I completely understand SVD. SVD (at least in Matlab) returns 3 matrices, one is a diagonal matrix I think. I think I would better understand it with geometric examples, if one would be so kind to maybe write something about that... I can plot

How can I read streaming output of a subprocess

2012-05-02 Thread Damjan Georgievski
I want to read the stream of an external process that I start with Python. From what I've seen that's not possible with the subprocess module? I want to read the output of ip monitor neigh which will show changes in the ARP table on my Linux computer. Each change is a new line printed by ip

Re: reading data file into a list

2012-05-02 Thread Kiuhnm
On 5/2/2012 11:59, ArifulHossain tuhin wrote: I have this data file which contains raw data in newline terminated for like below: 10.6626 11.2683 11.9244 12.5758 14.1402 15.1636 Now i want to read that file and import this data into a numpy array. how should i go about it?

Re: syntax for code blocks

2012-05-02 Thread Mark Lawrence
On 02/05/2012 11:52, Kiuhnm wrote: I remember a post on this ng when one would create a list of commands and then use that list as a switch table. My module let you do that very easily. Kiuhnm I'll believe that when I see a reference to your code repository and the working example that

Re: How can I read streaming output of a subprocess

2012-05-02 Thread Kushal Kumaran
On Wed, May 2, 2012 at 4:38 PM, Damjan Georgievski gdam...@gmail.com wrote: I want to read the stream of an external process that I start with Python. From what I've seen that's not possible with the subprocess module? I want to read the output of ip monitor neigh which will show changes in

Re: reading data file into a list

2012-05-02 Thread Steven D'Aprano
On Wed, 02 May 2012 02:59:55 -0700, ArifulHossain tuhin wrote: I have this data file which contains raw data in newline terminated for like below: 10.6626 11.2683 11.9244 12.5758 14.1402 15.1636 Now i want to read that file and import this data into a numpy array. how should i go

Re: How can I read streaming output of a subprocess

2012-05-02 Thread Kiuhnm
On 5/2/2012 13:08, Damjan Georgievski wrote: I want to read the stream of an external process that I start with Python. From what I've seen that's not possible with the subprocess module? Try with cmd = 'your command here' stdout = Popen(cmd, shell = True, stdout = PIPE, stderr =

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Steven D'Aprano
On Wed, 02 May 2012 08:00:44 +0200, someone wrote: On 05/02/2012 01:05 AM, Paul Rubin wrote: someonenewsbo...@gmail.com writes: Actually I know some... I just didn't think so much about, before writing the question this as I should, I know theres also something like singular value

Code help for understand

2012-05-02 Thread viral shah
Hi in every .py file I found this same code line on the below side *def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=True) run_wsgi_app(application) if __name__ == '__main__': main() * can anyone explain me what's

Re: Code help for understand

2012-05-02 Thread J. Mwebaze
if you are referring to the line * * *if __name__ == '__main__':* * * Find a good explanation here * * http://stackoverflow.com/questions/419163/what-does-if-name-main-do On Wed, May 2, 2012 at 2:30 PM, viral shah shahviral...@gmail.com wrote: Hi in every .py file I found this same code

Re: How can I read streaming output of a subprocess

2012-05-02 Thread Adam Skutt
On May 2, 7:46 am, Kiuhnm kiuhnm03.4t.yahoo.it wrote: On 5/2/2012 13:08, Damjan Georgievski wrote: I want to read the stream of an external process that I start with Python. From what I've seen that's not possible with the subprocess module? Try with     cmd = 'your command here'    

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread jaialai . technology
I'm not a 'Common Lisper' or a 'Pythoner' so I'm not directly or personally affected by your retarded and offensive comment. However, who the fuck do you think you are to post stuff of this nature? (I believe) I'll understand if you've got some sort of psychological issue affecting your

DateTime objectFormatting

2012-05-02 Thread Nikhil Verma
Hi I am using a DateTimeField in my class and want to do some tweaking with its object. class ClinicVisitDateSettings(models.Model): name = models.CharField(max_length=80,blank=True,null=True) date_created = models.DateTimeField(blank=True,null=True) def __unicode__(self):

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Steven_Lord
Russ P. russ.paie...@gmail.com wrote in message news:2275231f-405f-4ee3-966a-40c821b7c...@2g2000yqp.googlegroups.com... On May 1, 11:52 am, someone newsbo...@gmail.com wrote: On 04/30/2012 03:35 AM, Nasser M. Abbasi wrote: On 04/29/2012 07:59 PM, someone wrote: I do not use python much

Re: DateTime objectFormatting

2012-05-02 Thread Jerry Hill
On Wed, May 2, 2012 at 10:49 AM, Nikhil Verma varma.nikhi...@gmail.com wrote: What i am able to achieve with this class object to return is :- Gen GI Monday  May 7 I want that the this class should return object like this :- Gen GI Monday AM, May 7 Pancreas Tuesday PM, May 8 Check the

Re: DateTime objectFormatting

2012-05-02 Thread Chris Rebert
On Wed, May 2, 2012 at 7:49 AM, Nikhil Verma varma.nikhi...@gmail.com wrote: snip     def __unicode__(self):     return %s %s % (self.name, self.date_created.strftime(%A %B %d)) The user fills Gen GI in name and date along with time. What i am able to achieve with this class object to

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Tim Bradshaw
On 2012-05-02 14:44:36 +, jaialai.technol...@gmail.com said: He may be nuts But he's right: programmers are pretty much fuckwits[*]: if you think that's not true you are not old enough. [*] including me, especially. -- http://mail.python.org/mailman/listinfo/python-list

Re: DateTime objectFormatting

2012-05-02 Thread Nikhil Verma
Thanks On Wed, May 2, 2012 at 8:27 PM, Chris Rebert c...@rebertia.com wrote: On Wed, May 2, 2012 at 7:49 AM, Nikhil Verma varma.nikhi...@gmail.com wrote: snip def __unicode__(self): return %s %s % (self.name, self.date_created.strftime(%A %B %d)) The user fills Gen GI

Python SOAP library

2012-05-02 Thread Alec Taylor
What's the best SOAP library for Python? I am creating an API converter which will be serialising to/from a variety of sources, including REST and SOAP. Relevant parsing is XML [incl. SOAP] and JSON. Would you recommend: http://code.google.com/p/soapbox/ Or suggest another? Thanks for all

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Tomasz Rola
On Wed, 2 May 2012, jaialai.technol...@gmail.com wrote: I'm not a 'Common Lisper' or a 'Pythoner' so I'm not directly or personally affected by your retarded and offensive comment. However, who the fuck do you think you are to post stuff of this nature? (I believe) I'll understand if

Re: DateTime objectFormatting

2012-05-02 Thread Terry Reedy
On 5/2/2012 10:49 AM, Nikhil Verma wrote: This was posted as html (with text copy). Please send messages to the list and newsgroup as text (only). Html sometimes does strange things, especially if you post code. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Tim Wintle
On Wed, 2012-05-02 at 17:31 +0200, Tomasz Rola wrote: positive aura drives more people and more permamently towards you. Perhaps he should develop an alter ego that could stand side by side with Dalai Lama and see which one gets more attention. Really?

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Chris Angelico
On Thu, May 3, 2012 at 1:31 AM, Tomasz Rola rto...@ceti.pl wrote: He may be smart but obviously hasn't figured out this yet: positive aura drives more people and more permamently towards you. You catch more flies with honey than with vinegar, but who wants to catch flies? I don't see much

Re: How can I read streaming output of a subprocess

2012-05-02 Thread Damjan Georgievski
I want to read the stream of an external process that I start with Python. From what I've seen that's not possible with the subprocess module? I want to read the output of ip monitor neigh which will show changes in the ARP table on my Linux computer. Each change is a new line printed by ip and

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-02 Thread Chris Angelico
On Wed, May 2, 2012 at 10:33 PM, Chrishelring christianhelr...@gmail.com wrote: Hi, I´ve got some tables with column names in lowercase. Before updatering these tables I want to add a trigger that can convert these lowercase to uppercase, and when the tables are updates convert them back to

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-02 Thread Chris Angelico
On Thu, May 3, 2012 at 2:29 AM, Chris Angelico ros...@gmail.com wrote: On Wed, May 2, 2012 at 10:33 PM, Chrishelring christianhelr...@gmail.com wrote: Hi, I´ve got some tables with column names in lowercase. Before updatering these tables I want to add a trigger that can convert these

RE: syntax for code blocks

2012-05-02 Thread Prasad, Ramit
Steven D'Aprano wrote: Have you actually tried to use these code blocks of yours? I asked you for a *working* example earlier, and you replied with examples that failed with multiple NameErrors and no hint as to how to fix them. And now you give an example that fails with SyntaxError.

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Temia Eszteri
On 27/04/12 03:11, Xah Lee wrote: John Carmack glorifying functional programing in 3k words http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ where was he ten years ago? O, and btw, i heard that Common Lispers don't do functional programing, is that right? Fuck Common

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Tomasz Rola
On Thu, 3 May 2012, Chris Angelico wrote: On Thu, May 3, 2012 at 1:31 AM, Tomasz Rola rto...@ceti.pl wrote: He may be smart but obviously hasn't figured out this yet: positive aura drives more people and more permamently towards you. You catch more flies with honey than with vinegar, but

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Tomasz Rola
On Wed, 2 May 2012, Tim Wintle wrote: On Wed, 2012-05-02 at 17:31 +0200, Tomasz Rola wrote: positive aura drives more people and more permamently towards you. Perhaps he should develop an alter ego that could stand side by side with Dalai Lama and see which one gets more attention.

mmap and bit wise twiddling - Raspberry Pi

2012-05-02 Thread Petr Jakes
Hi, I am trying to work with HW peripherals on Raspberry Pi To achieve this, it is necessary read/write some values from/to the memory directly. I am looking for some wise way how to organize the bit twiddling. To set some specific bit, for example, it is necessary: - read 4 bytes string

Re: Some posts do not show up in Google Groups

2012-05-02 Thread Michael Torrie
On 05/01/2012 12:12 AM, Frank Millman wrote: I have had a look at this before, but there is one thing that Google Groups does that no other reader seems to do, and that is that messages are sorted according to thread-activity, not original posting date. This makes it easy to see what has

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-02 Thread Laurent Pointal
ksals wrote: On May 1, 5:29 pm, John Gordon gor...@panix.com wrote: In 3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com ksals kbsals5...@gmail.com writes: The original choice looks like this when I print it: print(choice) ('ksals', '', 'alsdkfj', '3', '') I need to

try/except in a loop

2012-05-02 Thread J. Mwebaze
I have multiple objects, where any of them can serve my purpose.. However some objects might not have some dependencies. I can not tell before hand if the all the dependencies exsit. What i want to is begin processing from the 1st object, if no exception is raised, i am done.. if an exception is

Re: try/except in a loop

2012-05-02 Thread Chris Kaynor
On Wed, May 2, 2012 at 12:51 PM, J. Mwebaze jmweb...@gmail.com wrote: I have multiple objects, where any of them can serve my purpose.. However some objects might not have some dependencies. I can not tell before hand if the all the dependencies exsit. What i want to is begin processing from

Re: try/except in a loop

2012-05-02 Thread Andrew Berg
Why wouldn't a for loop work? If something works, you can break out, otherwise continue. working_obj = None for obj in iterable: try: obj.do_something() working_obj = obj break except: continue -- CPython 3.3.0a3 |

Re: mmap and bit wise twiddling - Raspberry Pi

2012-05-02 Thread Thomas Heller
Am 02.05.2012 19:40, schrieb Petr Jakes: Hi, I am trying to work with HW peripherals on Raspberry Pi To achieve this, it is necessary read/write some values from/to the memory directly. I am looking for some wise way how to organize the bit twiddling. To set some specific bit, for example, it

Re: mmap and bit wise twiddling - Raspberry Pi

2012-05-02 Thread Thomas Heller
Am 02.05.2012 22:05, schrieb Thomas Heller: class GPIO(BitVector): def __init__(self, address, value=0xFF, nbits=8): self.address = address super(GPIO, self).__init__(value, nbits) def _get_value(self): read an 8-bit value from the hardware as 8-bit integer

Re: try/except in a loop

2012-05-02 Thread Andrew Berg
Forgot to add that all this is covered in the tutorial in the official docs: http://docs.python.org/tutorial/controlflow.html#for-statements -- CPython 3.3.0a3 | Windows NT 6.1.7601.17790 -- http://mail.python.org/mailman/listinfo/python-list

RE: try/except in a loop

2012-05-02 Thread Prasad, Ramit
I have multiple objects, where any of them can serve my purpose.. However some objects might not have some dependencies. I can not tell before hand if the all the dependencies exsit. What i want to is begin processing from the 1st object, if no exception is raised, i am done.. if an

Re: try/except in a loop

2012-05-02 Thread Chris Kaynor
On Wed, May 2, 2012 at 1:12 PM, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: I have multiple objects, where any of them can serve my purpose.. However some objects might not have some dependencies. I can not tell before hand if the all the dependencies exsit. What i want to is begin

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 01:03 PM, Kiuhnm wrote: On 5/2/2012 8:00, someone wrote: Still, I dont think I completely understand SVD. SVD (at least in Matlab) returns 3 matrices, one is a diagonal matrix I think. I think I would better understand it with geometric examples, if one would be so kind to maybe

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 08:36 AM, Russ P. wrote: On May 1, 11:03 pm, someonenewsbo...@gmail.com wrote: On 05/02/2012 01:38 AM, Russ P. wrote: .. On May 1, 4:05 pm, Paul Rubinno.em...@nospam.invalidwrote: It would really appreciate if anyone could maybe post a simple SVD example and tell what the

RE: Overlayong PDF Files

2012-05-02 Thread Sells, Fred
Assuming your form has actual PDF data entry fields. I export the form to a .fdf file, run a little script to replace fieldnames with %(fieldname)s and save this as a staic template. At run time I'll merge the template with a python dictionary using the % operator and shell down to pdftk to

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 01:52 PM, Steven D'Aprano wrote: On Wed, 02 May 2012 08:00:44 +0200, someone wrote: On 05/02/2012 01:05 AM, Paul Rubin wrote: someonenewsbo...@gmail.com writes: Actually I know some... I just didn't think so much about, before writing the question this as I should, I know

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 04:47 PM, Steven_Lord wrote: Russ, you and the OP (and others) may be interested in one of the books that Cleve Moler has written and made freely available on the MathWorks website: http://www.mathworks.com/moler/ The chapter Linear Equations in Numerical Computing with MATLAB

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-02 Thread ksals
On May 2, 1:57 pm, Laurent Pointal laurent.poin...@free.fr wrote: ksals wrote: On May 1, 5:29 pm, John Gordon gor...@panix.com wrote: In 3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com ksals kbsals5...@gmail.com writes: The original choice looks like this when I print

RE: try/except in a loop

2012-05-02 Thread Prasad, Ramit
for obj in objs: try: obj.make() except Exception: continue else: break else: raise RuntimeError('No object worked') I think you misunderstand the else clauses. for obj in [ 1,2,3,4 ]: ... try: ... print obj ...

Re: Python SOAP library

2012-05-02 Thread John Nagle
On 5/2/2012 8:35 AM, Alec Taylor wrote: What's the best SOAP library for Python? I am creating an API converter which will be serialising to/from a variety of sources, including REST and SOAP. Relevant parsing is XML [incl. SOAP] and JSON. Would you recommend: http://code.google.com/p/soapbox/

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Michael Torrie
On 05/02/2012 09:31 AM, Tomasz Rola wrote: On Wed, 2 May 2012, jaialai.technol...@gmail.com wrote: OP lives out of his car and his main source of income seems to be ad revenue from his website. I'm always curious about this sort of thing. Do you know this for a fact, jaialai.technology? He

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread Russ P.
On May 2, 1:29 pm, someone newsbo...@gmail.com wrote: If your data starts off with only 1 or 2 digits of accuracy, as in your example, then the result is meaningless -- the accuracy will be 2-2 digits, or 0 -- *no* digits in the answer can be trusted to be accurate. I just solved a FEM

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Tomasz Rola
On Wed, 2 May 2012, Michael Torrie wrote: On 05/02/2012 09:31 AM, Tomasz Rola wrote: On Wed, 2 May 2012, jaialai.technol...@gmail.com wrote: OP lives out of his car and his main source of income seems to be ad revenue from his website. I'm always curious about this sort of thing. Do

Re: syntax for code blocks

2012-05-02 Thread alex23
On May 2, 8:52 pm, Kiuhnm kiuhnm03.4t.yahoo.it wrote: func(some_args, locals()) I think that's very bad. It wouldn't be safe either. What about name clashing locals() is a dict. It's not injecting anything into func's scope other than a dict so there's not going to be any name clashes.

Why variable used in list comprehension available outside?

2012-05-02 Thread Peng Yu
Hi, The following example demonstrates the variable 'v' used in the list comprehension is accessible out site the list comprehension. I think that 'v' should be strictly local. Does anybody know where this behavior is documented and why it is designed this way?

Re: Why variable used in list comprehension available outside?

2012-05-02 Thread Tim Chase
On 05/02/12 19:52, Peng Yu wrote: The following example demonstrates the variable 'v' used in the list comprehension is accessible out site the list comprehension. It did in Python 2.x but has been fixed in 3.x: tim@bigbox:~$ python3 Python 3.1.3 (r313:86834, Nov 28 2010, 10:01:07) [GCC

key/value store optimized for disk storage

2012-05-02 Thread Steve Howell
This is slightly off topic, but I'm hoping folks can point me in the right direction. I'm looking for a fairly lightweight key/value store that works for this type of problem: ideally plays nice with the Python ecosystem the data set is static, and written infrequently enough that I

Re: key/value store optimized for disk storage

2012-05-02 Thread Paul Rubin
Steve Howell showel...@yahoo.com writes: keys are file paths directories are 2 levels deep (30 dirs w/100k files each) values are file contents The current solution isn't horrible, Yes it is ;-) As I mention up top, I'm mostly hoping folks can point me toward sources they trust,

Re: key/value store optimized for disk storage

2012-05-02 Thread Terry Reedy
On 5/2/2012 10:14 PM, Steve Howell wrote: This is slightly off topic, but I'm hoping folks can point me in the right direction. I'm looking for a fairly lightweight key/value store that works for this type of problem: ideally plays nice with the Python ecosystem the data set is static,

Re: key/value store optimized for disk storage

2012-05-02 Thread Tim Chase
On 05/02/12 21:14, Steve Howell wrote: I'm looking for a fairly lightweight key/value store that works for this type of problem: ideally plays nice with the Python ecosystem the data set is static, and written infrequently enough that I definitely want *read* performance to trump all

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Chris Angelico
On Thu, May 3, 2012 at 3:22 AM, Tomasz Rola rto...@ceti.pl wrote: I think you can catch more girls with honey and I'm not sure if I'd like to catch those who prefer vinegar. I think we can make it into some kind of law, say Angelico-Rola Law (of girlscatching), ok? One cannot catch a girl on

Re: key/value store optimized for disk storage

2012-05-02 Thread Steve Howell
On May 2, 7:46 pm, Paul Rubin no.em...@nospam.invalid wrote: Steve Howell showel...@yahoo.com writes:   keys are file paths   directories are 2 levels deep (30 dirs w/100k files each)   values are file contents The current solution isn't horrible, Yes it is ;-) As I mention up top,

Re: key/value store optimized for disk storage

2012-05-02 Thread Paul Rubin
Steve Howell showel...@yahoo.com writes: Thanks. That's definitely in the spirit of what I'm looking for, although the non-64 bit version is obviously geared toward a slightly smaller data set. My reading of cdb is that it has essentially 64k hash buckets, so for 3 million keys, you're still

Re: John Carmack glorifying functional programing in 3k words

2012-05-02 Thread Chris Angelico
On Thu, May 3, 2012 at 8:04 AM, Michael Torrie torr...@gmail.com wrote: Others who have crossed this list appear to have aspergers or autism too, such as Ranting Rick.  He pops up occasionally, posts quite normally and even helpfully, and then lapses back into periods of ranting about how he

Re: key/value store optimized for disk storage

2012-05-02 Thread William R. Wing (Bill Wing)
On May 2, 2012, at 10:14 PM, Steve Howell wrote: This is slightly off topic, but I'm hoping folks can point me in the right direction. I'm looking for a fairly lightweight key/value store that works for this type of problem: ideally plays nice with the Python ecosystem the data set is

Re: key/value store optimized for disk storage

2012-05-02 Thread Steve Howell
On May 2, 8:29 pm, Paul Rubin no.em...@nospam.invalid wrote: Steve Howell showel...@yahoo.com writes: Thanks.  That's definitely in the spirit of what I'm looking for, although the non-64 bit version is obviously geared toward a slightly smaller data set.  My reading of cdb is that it has

Re: Python SOAP library

2012-05-02 Thread Alec Taylor
Client and server (unfortunately) I need to support serialisation between formats On Thu, May 3, 2012 at 7:24 AM, John Nagle na...@animats.com wrote: On 5/2/2012 8:35 AM, Alec Taylor wrote: What's the best SOAP library for Python? I am creating an API converter which will be serialising

Re: syntax for code blocks

2012-05-02 Thread Michael Torrie
On 05/02/2012 04:52 AM, Kiuhnm wrote: The problem is always the same. Those functions are defined at the module level so name clashing and many other problems are possible. Only functions defined at the module level are in fact in the module's namespace. For example, this works fine, and the

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-02 Thread Chris Angelico
On Thu, May 3, 2012 at 3:57 AM, Laurent Pointal laurent.poin...@free.fr wrote: If you have it as a string, you can use eval() (not safe!) on the string to retrieve the tuple, then list() on the tuple to get a list. Are you saying that eval is not safe (which it isn't), or that it has to be

Re: syntax for code blocks

2012-05-02 Thread Michael Torrie
On 05/02/2012 10:26 PM, Michael Torrie wrote: If you are experiencing name clashes you need to start dividing your code up logically instead of keeping everything in the global namespace of your module. I shouldn't have used the word global here as it's not actually global. --

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: For Windows versions that support it, we could use GetNameInfoW, available on XPSP2+, W2k3+ and Vista+. The questions then are: what to do about gethostbyaddr, and what to do about the general case? Since the problem appears to be

[issue9123] insecure os.urandom on VMS

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'm closing this as won't fix. Unless somebody is able to report that they actually tested the proposed change successfully, there is no point in adding it. Most likely, Python won't even build on VMS, in which case this is not a security

[issue14530] distutils's build_wininst command fails to correctly interpret the data_files argument

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Mario: would you like to work on a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14530 ___

[issue14529] distutils's build_msi command ignores the data_files argument

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Mario: would you like to work on a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14529 ___

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Sorry, I missed the patch. I still fail to see the problem that this solves: what compiler produces control reaches end of non-void function without return for the current code? ISTM that your patch has the potential of *introducing* such

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-02 Thread Larry Hastings
New submission from Larry Hastings la...@hastings.org: Currently functions that parse their arguments with the PyArg_ParseTuple family which want to take a boolean-ish parameter face two choices: * take an int, then test whether or not the int is 0, or * take an object, then call

[issue13210] Support Visual Studio 2010

2012-05-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Posted some comments. Also, I see you didn't remove the old SxS functionality, no longer used by VS2010 (see my sxs.patch) -- ___ Python tracker rep...@bugs.python.org

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-02 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Yes, I too have encountered this in the process of working on issue 14626. For this purpose it is appropriate to use a special converter (with 'O'). I suppose it must be a strict сonverter; there is no point in specifying followlinks=[1,

[issue14706] Inconsistent os.access os.X_OK on Solaris and AIX when running as root

2012-05-02 Thread Adi Roiban
New submission from Adi Roiban a...@roiban.ro: The return value of os.access(FILE, os.X_OK) is not consistent across operating system when executed as root I have tested with Python 2.5 on Linux and Solaris, but there is a bug in python-nose reporting the same behavior with Python 2.6 on

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-02 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: For this purpose it is appropriate to use a special converter (with 'O'). The converter works--but, then, a similar converter would also work for double, and float, and long long and many others. If long long is special enough to merit

[issue14656] Add a macro for unreachable code

2012-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: I think you misuse __builtin_unreachable(): the code *is* reachable, it is just very unlikely. I really prefer to return something looking valid and continue the execution of the program, instead of calling the evil Py_FatalError() in

[issue14706] Inconsistent os.access os.X_OK on Solaris and AIX when running as root

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This is not a Python bug. os.access() is just a wrapper around the POSIX access() function: http://pubs.opengroup.org/onlinepubs/9699919799/functions/faccessat.html “If any access permissions are checked, each shall be checked individually, as

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I really prefer to return something looking valid and continue the execution of the program How would that be better? Should Python become more like PHP? -- nosy: +pitrou ___ Python tracker

[issue14656] Add a macro for unreachable code

2012-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Oh, I read again the patch. There are two different cases: * The code is really unreachable. Ex: the loop of lookdict() does never stop, return is used in the loop. Py_UNREACHABLE can be used in this case *to avoid a compiler

[issue14706] Inconsistent os.access os.X_OK on Solaris and AIX when running as root

2012-05-02 Thread Adi Roiban
Adi Roiban a...@roiban.ro added the comment: Many thanks for your comment! Cheers, Adi -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14706 ___

  1   2   >