Re: bus errors when the network interface is reset?

2012-05-02 Thread Kushal Kumaran
On Tue, May 1, 2012 at 7:31 PM, David M Chess wrote: > > We have a system running Python 2.6.6 under RHEL 6.1.  A bunch of processes > spend most of their time sitting in a BaseHTTPServer.HTTPServer waiting for > requests. > > Last night an update pushed out via xcat whimsically restarted all of t

Re: key/value store optimized for disk storage

2012-05-02 Thread Paul Rubin
Paul Rubin writes: >looking at the spec more closely, there are 256 hash tables.. ... You know, there is a much simpler way to do this, if you can afford to use a few hundred MB of memory and you don't mind some load time when the program first starts. Just dump all the data sequentially into a

Re: key/value store optimized for disk storage

2012-05-02 Thread Paul Rubin
Steve Howell writes: > Doesn't cdb do at least one disk seek as well? In the diagram on this > page, it seems you would need to do a seek based on the value of the > initial pointer (from the 256 possible values): Yes, of course it has to seek if there is too much data to fit in memory. All I'm

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. -- http://mai

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 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 eval() and not safe_eval()

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: 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 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 to/from a varie

Re: key/value store optimized for disk storage

2012-05-02 Thread Steve Howell
On May 2, 8:29 pm, Paul Rubin wrote: > Steve Howell 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

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

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 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 can fix python

Re: key/value store optimized for disk storage

2012-05-02 Thread Paul Rubin
Steve Howell 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 scanning throug

Re: key/value store optimized for disk storage

2012-05-02 Thread Steve Howell
On May 2, 7:46 pm, Paul Rubin wrote: > Steve Howell 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 poin

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 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 honey wit

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 a

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, an

Re: key/value store optimized for disk storage

2012-05-02 Thread Paul Rubin
Steve Howell 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, whether it be ot

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 definitel

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 4.4

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? ~/linux/test/python/man/library/__

Re: syntax for code blocks

2012-05-02 Thread alex23
On May 2, 8:52 pm, Kiuhnm 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. If you don't want

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 thi

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

2012-05-02 Thread Russ P.
On May 2, 1:29 pm, someone 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 eigenvalue pro

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?

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: 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 ]: > > ..

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 wrote: > ksals wrote: > > On May 1, 5:29 pm, John Gordon wrote: > >> In <3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com> > >> ksals writes: > > >> > The original choice looks like this when I print it: > >> > print(choice) > >> > ('ksals', ''

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: 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: someone 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 l

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 m

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, someone wrote: On 05/02/2012 01:38 AM, Russ P. wrote: .. On May 1, 4:05 pm, Paul Rubinwrote: It would really appreciate if anyone could maybe post a simple SVD example and tell what the vectors from the SVD represents geometrical

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 wr

Re: try/except in a loop

2012-05-02 Thread Chris Kaynor
On Wed, May 2, 2012 at 1:12 PM, Prasad, Ramit 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 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..

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: 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: 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 i

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 | W

Re: try/except in a loop

2012-05-02 Thread Chris Kaynor
On Wed, May 2, 2012 at 12:51 PM, J. Mwebaze 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 the > 1st object,

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 ra

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 wrote: >> In <3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com> >> ksals writes: >> >> > The original choice looks like this when I print it: >> > print(choice) >> > ('ksals', '', 'alsdkfj', '3', '') >> > I need to submit these as de

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 ch

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 repr

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 atte

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 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 want

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 righ

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 Synta

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-02 Thread Chris Angelico
On Thu, May 3, 2012 at 2:29 AM, Chris Angelico wrote: > On Wed, May 2, 2012 at 10:33 PM, Chrishelring > 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

Re: [GENERAL] Uppercase to lowercase trigger?

2012-05-02 Thread Chris Angelico
On Wed, May 2, 2012 at 10:33 PM, Chrishelring 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 lowercase.. Not entire

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"

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 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 value in Xah Lee'

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: 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 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

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 inf

Re: DateTime objectFormatting

2012-05-02 Thread Nikhil Verma
Thanks On Wed, May 2, 2012 at 8:27 PM, Chris Rebert wrote: > On Wed, May 2, 2012 at 7:49 AM, Nikhil Verma > wrote: > > > 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 t

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 Chris Rebert
On Wed, May 2, 2012 at 7:49 AM, Nikhil Verma wrote: >     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 return is :- > > Ge

Re: DateTime objectFormatting

2012-05-02 Thread Jerry Hill
On Wed, May 2, 2012 at 10:49 AM, Nikhil Verma 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 documentation for th

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

2012-05-02 Thread Steven_Lord
"Russ P." wrote in message news:2275231f-405f-4ee3-966a-40c821b7c...@2g2000yqp.googlegroups.com... On May 1, 11:52 am, someone 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 myself, but a quick google showed that p

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: 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 behaviour.

Re: How can I read streaming output of a subprocess

2012-05-02 Thread Adam Skutt
On May 2, 7:46 am, Kiuhnm 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' >     stdout = Popen

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 wrote: > Hi > > in every .py file I found this same code line on the below side

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: 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: >> someone 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 tha

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 = STDO

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 sho

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 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 > the ARP tabl

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 others

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? http://docs.scipy

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: 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

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 Lisp

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, Kiuhnm 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 write a function

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 = numpy.

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

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 #define STDCALLBK_MODULE_H // Type definition for the callback function. typedef

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 - *Role/Scope

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

2012-05-02 Thread Paul Rubin
someone 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 this problem,

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

2012-05-02 Thread Paul Rubin
"Russ P." 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: 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 distro

Re: linux

2012-05-02 Thread Chris Angelico
On Wed, May 2, 2012 at 4:25 PM, Debashish Saha 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 -- http://mail.python.org/mailman/listinfo/python-list