Re: RSS feed creation?

2011-11-07 Thread Stefan Behnel
Stefan Behnel, 07.11.2011 08:22: Dan Stromberg, 06.11.2011 21:00: Is there an opensource Python tool for creating RSS feeds, that doesn't require large dependencies? I found feedformatter.py on pypi, but it seems a little old, and its sole automated test gives a traceback. Is there a better st

Re: Python lesson please

2011-11-07 Thread Peter Otten
gene heskett wrote: > Greetings experts: > > I just dl'd the duqu driver finder script from a link to NSS on /., and > fixed enough of the tabs in it to make it run error-free. At least python > isn't having a litter of cows over the indentation now. > > But it also runs instantly on linux. >

Re: question about Tkinter delete

2011-11-07 Thread Peter Otten
Kristen Aw wrote: > I don't understand why I get this error. I'm trying to delete the existing points, then redraw them after this bit of code to 'animate' my simulation. > > def update(self, point1, point2): > # Deletes existing points > if self.point1: > self.w.dele

Re: Python lesson please

2011-11-07 Thread gene heskett
On Monday, November 07, 2011 05:35:15 AM Peter Otten did opine: > gene heskett wrote: > > Greetings experts: > > > > I just dl'd the duqu driver finder script from a link to NSS on /., > > and fixed enough of the tabs in it to make it run error-free. At > > least python isn't having a litter of

logging: handle everything EXCEPT certain loggers

2011-11-07 Thread Gábor Farkas
hi, is there a way to setup log-handlers in a way that they log logs from every logger, exept certain ones? basically i want the handler to handle everything, except log-records that were generated by loggers from "something.*" can this be done? i tried to create filters, but the log-record does

Re: Python lesson please

2011-11-07 Thread Andreas Perstinger
On 2011-11-07 12:22, gene heskett wrote: On Monday, November 07, 2011 05:35:15 AM Peter Otten did opine: Are you talking about this one? https://github.com/halsten/Duqu-detectors/blob/master/DuquDriverPatterns .py Yes. My save as renamed it, still has about 30k of tabs in it. But I pulle

Re: Python lesson please

2011-11-07 Thread Dave Angel
On 11/07/2011 06:22 AM, gene heskett wrote: On Monday, November 07, 2011 05:35:15 AM Peter Otten did opine: Are you talking about this one? https://github.com/halsten/Duqu-detectors/blob/master/DuquDriverPatterns .py Yes. My save as renamed it, still has about 30k of tabs in it. But I pull

Re: logging: handle everything EXCEPT certain loggers

2011-11-07 Thread Jean-Michel Pichavant
Gábor Farkas wrote: hi, is there a way to setup log-handlers in a way that they log logs from every logger, exept certain ones? basically i want the handler to handle everything, except log-records that were generated by loggers from "something.*" can this be done? i tried to create filters, b

Re: logging: handle everything EXCEPT certain loggers

2011-11-07 Thread Gábor Farkas
2011/11/7 Jean-Michel Pichavant : > Gábor Farkas wrote: >> >> is there a way to setup log-handlers in a way that they log logs from >> every logger, exept certain ones? >> >> i tried to create filters, but the log-record does not have access to >> his logger, so i cannot filter based on it's "path"

Re: Python lesson please

2011-11-07 Thread Peter Otten
gene heskett wrote: > On Monday, November 07, 2011 05:35:15 AM Peter Otten did opine: > >> gene heskett wrote: >> > Greetings experts: >> > >> > I just dl'd the duqu driver finder script from a link to NSS on /., >> > and fixed enough of the tabs in it to make it run error-free. At >> > least p

read from file with mixed encodings in Python3

2011-11-07 Thread Jaroslav Dobrek
Hello, in Python3, I often have this problem: I want to do something with every line of a file. Like Python3, I presuppose that every line is encoded in utf-8. If this isn't the case, I would like Python3 to do something specific (like skipping the line, writing the line to standard error, ...) L

Re: read from file with mixed encodings in Python3

2011-11-07 Thread Dave Angel
On 11/07/2011 09:23 AM, Jaroslav Dobrek wrote: Hello, in Python3, I often have this problem: I want to do something with every line of a file. Like Python3, I presuppose that every line is encoded in utf-8. If this isn't the case, I would like Python3 to do something specific (like skipping the

Re: read from file with mixed encodings in Python3

2011-11-07 Thread Peter Otten
Jaroslav Dobrek wrote: > Hello, > > in Python3, I often have this problem: I want to do something with > every line of a file. Like Python3, I presuppose that every line is > encoded in utf-8. If this isn't the case, I would like Python3 to do > something specific (like skipping the line, writing

Re: Python ORMs Supporting POPOs and Substituting Layers in Django

2011-11-07 Thread John Gordon
In <415d875d-bc6d-4e69-bcf8-39754b450...@n18g2000vbv.googlegroups.com> Travis Parks writes: > Which web frameworks have people here used and which have they found > to be: scalable, RAD compatible, performant, stable and/or providing > good community support? I am really trying to get as much fe

Re: Python lesson please

2011-11-07 Thread gene heskett
On Monday, November 07, 2011 10:38:32 AM Andreas Perstinger did opine: > On 2011-11-07 12:22, gene heskett wrote: > > On Monday, November 07, 2011 05:35:15 AM Peter Otten did opine: > >> Are you talking about this one? > >> > >> https://github.com/halsten/Duqu-detectors/blob/master/DuquDriverP

Re: Python lesson please

2011-11-07 Thread gene heskett
On Monday, November 07, 2011 11:30:45 AM Dave Angel did opine: Back on the list.. > On 11/07/2011 06:22 AM, gene heskett wrote: > > On Monday, November 07, 2011 05:35:15 AM Peter Otten did opine: > > > > > >> Are you talking about this one? > >> > >> https://github.com/halsten/Duqu-detectors/blo

Re: xml-rpc server on wine

2011-11-07 Thread Adam Tauno Williams
On Sat, 2011-11-05 at 05:50 -0700, pacopyc wrote: > Hi, I have a XML-RPC server python running on VM Windows (on Linux) > and a XML-RPC client python on Linux. Server and client have different > IP address. I'd like migrate server on wine. How can communicate > server and client? IP address is diff

Re: RSS feed creation?

2011-11-07 Thread Adam Tauno Williams
On Mon, 2011-11-07 at 08:22 +0100, Stefan Behnel wrote: > Dan Stromberg, 06.11.2011 21:00: > > Is there an opensource Python tool for creating RSS feeds, that doesn't > > require large dependencies? > > I found feedformatter.py on pypi, but it seems a little old, and its sole > > automated test giv

Extracting elements over multiple lists?

2011-11-07 Thread JoeM
Howdy, If I have a few lists like a=[1,2,3,4,5] b=["one", "two", "three", "four", "five"] c=["cat", "dog", "parrot", "clam", "ferret"] what is the most pythonic method of removing the first element from all of the lists? A list comprehension such as [arr[1:] for arr in a,b,c] gives a single 2d

Re: Extracting elements over multiple lists?

2011-11-07 Thread John Gordon
In JoeM writes: > a=[1,2,3,4,5] > b=["one", "two", "three", "four", "five"] > c=["cat", "dog", "parrot", "clam", "ferret"] > what is the most pythonic method of removing the first element from > all of the lists? for arr in [a,b,c]: arr.pop(0) -- John Gordon A is for Amy

Re: Python ORMs Supporting POPOs and Substituting Layers in Django

2011-11-07 Thread John Gordon
In John Gordon writes: > In <415d875d-bc6d-4e69-bcf8-39754b450...@n18g2000vbv.googlegroups.com> Travis > Parks writes: > > Which web frameworks have people here used and which have they found > > to be: scalable, RAD compatible, performant, stable and/or providing > > good community support?

Re: Extracting elements over multiple lists?

2011-11-07 Thread Laurent Claessens
Le 07/11/2011 18:12, JoeM a écrit : Howdy, If I have a few lists like a=[1,2,3,4,5] b=["one", "two", "three", "four", "five"] c=["cat", "dog", "parrot", "clam", "ferret"] what is the most pythonic method of removing the first element from all of the lists? Do you want to remove the first ite

Re: Extracting elements over multiple lists?

2011-11-07 Thread JoeM
Thanks guys, I was just looking for a one line solution instead of a for loop if possible. Why do you consider [x.remove(x[0]) for x in [a,b,c]] cheating? It seems compact and elegant enough for me. Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Python lesson please

2011-11-07 Thread Dave Angel
On 11/07/2011 11:40 AM, gene heskett wrote: On Monday, November 07, 2011 11:30:45 AM Dave Angel did opine: Back on the list.. On 11/07/2011 06:22 AM, gene heskett wrote: On Monday, November 07, 2011 05:35:15 AM Peter Otten did opine: Are you talking about this one? https://github.com/halste

Re: Extracting elements over multiple lists?

2011-11-07 Thread John Gordon
In JoeM writes: > Thanks guys, I was just looking for a one line solution instead of a > for loop if possible. Why do you consider > [x.remove(x[0]) for x in [a,b,c]] > cheating? It seems compact and elegant enough for me. I wouldn't call it cheating, but that solution does a fair bit of unn

Re: Extracting elements over multiple lists?

2011-11-07 Thread Peter Otten
JoeM wrote: > Thanks guys, I was just looking for a one line solution instead of a > for loop if possible. Why do you consider > > [x.remove(x[0]) for x in [a,b,c]] > > cheating? It seems compact and elegant enough for me. I think it's a misconception that you are avoiding the for-loop. You mov

Re: Extracting elements over multiple lists?

2011-11-07 Thread Jean-Michel Pichavant
JoeM wrote: Thanks guys, I was just looking for a one line solution instead of a for loop if possible. Why do you consider [x.remove(x[0]) for x in [a,b,c]] cheating? It seems compact and elegant enough for me. Cheers This is a one liner, but since you asked something *pythonic*, John's

memory management

2011-11-07 Thread Juan Declet-Barreto
Hi, Can anyone provide links or basic info on memory management, variable dereferencing, or the like? I have a script that traverses a file structure using os.walk and adds directory names to a list. It works for a small number of directories, but when I set it loose on a directory with thousan

Re: Python lesson please

2011-11-07 Thread gene heskett
On Monday, November 07, 2011 02:43:11 PM Dave Angel did opine: > On 11/07/2011 11:40 AM, gene heskett wrote: > > On Monday, November 07, 2011 11:30:45 AM Dave Angel did opine: > > Back on the list.. > > > >> On 11/07/2011 06:22 AM, gene heskett wrote: > >>> On Monday, November 07, 2011 05:35:15 A

Re: Extracting elements over multiple lists?

2011-11-07 Thread Dave Angel
On 11/07/2011 01:01 PM, JoeM wrote: Thanks guys, I was just looking for a one line solution instead of a for loop if possible. Why do you consider [x.remove(x[0]) for x in [a,b,c]] cheating? It seems compact and elegant enough for me. Cheers Are you considering the possibility that two of th

Re: memory management

2011-11-07 Thread Dave Angel
On 11/07/2011 02:43 PM, Juan Declet-Barreto wrote: Hi, Can anyone provide links or basic info on memory management, variable dereferencing, or the like? I have a script that traverses a file structure using os.walk and adds directory names to a list. It works for a small number of directorie

Re: A Python script to put CTAN into git (from DVDs)

2011-11-07 Thread Jonathan Fine
On 06/11/11 20:28, Jakub Narebski wrote: Note that for gitPAN each "distribution" (usually but not always corresponding to single Perl module) is in separate repository. The dependencies are handled by CPAN / CPANPLUS / cpanm client (i.e. during install). Thank you for your interest, Jakub, an

RE: memory management

2011-11-07 Thread Juan Declet-Barreto
Well, I am using Python 2.5 (and the IDLE shell) in Windows XP, which ships with ESRI's ArcGIS. In addition, I am using some functions in the arcgisscripting Python geoprocessing module for geographic information systems (GIS) applications, which can complicate things. I am currently isolating

Re: memory management

2011-11-07 Thread Stefan Krah
Juan Declet-Barreto wrote: > Well, I am using Python 2.5 (and the IDLE shell) in Windows XP, which > ships with ESRI's ArcGIS. In addition, I am using some functions in the > arcgisscripting Python geoprocessing module for geographic information > systems (GIS) applications, which can complicate t

Re: memory management

2011-11-07 Thread Dave Angel
On 11/07/2011 03:33 PM, Juan Declet-Barreto wrote: Well, I am using Python 2.5 (and the IDLE shell) in Windows XP, which ships with ESRI's ArcGIS. In addition, I am using some functions in the arcgisscripting Python geoprocessing module for geographic information systems (GIS) applications, wh

all() is slow?

2011-11-07 Thread OKB (not okblacke)
I noticed this (Python 2.6.5 on Windows XP): >>> import random, timeit >>> def myAll(x): ... for a in x: ... if a not in (True, False): ... return False ... return True >>> x = [random.choice([True, False]) for a in xrange(0, 500)] >>> timeit.timeit('myAll(x

RE: python-based downloader (youtube-dl) missing critical feature ...

2011-11-07 Thread Prasad, Ramit
>Maybe Lbrtchx is one of the Sheldon Cooper's nicknames :o) > >JM > >PS : I have the feeling that my nerdy reference will fall flat... Not completely ;) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423

Re: all() is slow?

2011-11-07 Thread Chris Rebert
On Mon, Nov 7, 2011 at 1:00 PM, OKB (not okblacke) wrote: >        What is the point of the all() function being a builtin if it's > slower than writing a function to do the check myself? Regardless of whether it's slower (which I expect someone will be along to debunk or explain shortly), do yo

Re: memory management

2011-11-07 Thread Chris Angelico
On Tue, Nov 8, 2011 at 6:43 AM, Juan Declet-Barreto wrote: > > I have a script that traverses a file structure using os.walk and adds > directory names to a list. It works for a small number of directories, but > when I set it loose on a directory with thousands of dirs/subdirs, it crashes > th

Re: all() is slow?

2011-11-07 Thread david vierra
On Nov 7, 11:00 am, "OKB (not okblacke)" wrote: >         What is the point of the all() function being a builtin if it's > slower than writing a function to do the check myself? > But, you didn't write an all() function. You wrote a more specialized allBoolean() function. I think this comparis

Re: A Python script to put CTAN into git (from DVDs)

2011-11-07 Thread Jakub Narebski
The following message is a courtesy copy of an article that has been posted to comp.text.tex as well. Jonathan Fine writes: > On 06/11/11 20:28, Jakub Narebski wrote: > > > Note that for gitPAN each "distribution" (usually but not always > > corresponding to single Perl module) is in separate re

Re: A Python script to put CTAN into git (from DVDs)

2011-11-07 Thread Jonathan Fine
On 07/11/11 21:49, Jakub Narebski wrote: [snip] But now I understand that you are just building tree objects, and creating references to them (with implicit ordering given by names, I guess). This is to be a start of further work, isn't it? Yes, that's exactly the point, and my apologies if

Re: all() is slow?

2011-11-07 Thread Chris Angelico
On Tue, Nov 8, 2011 at 8:46 AM, david vierra wrote: > But, you didn't write an all() function.  You wrote a more specialized > allBoolean() function. I think this comparison is more fair to the > builtin all(): So really, it's not "all() is slow" but "function calls are slow". Maybe it'd be worth

ctypes accessing functions with double pointers

2011-11-07 Thread Eleftherios Garyfallidis
Hello, Is it possible using ctypes to call C functions from a shared object containing double pointers e.g. int foo(float **i) and if yes how? Best wishes, Eleftherios -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes accessing functions with double pointers

2011-11-07 Thread Chris Rebert
On Mon, Nov 7, 2011 at 2:06 PM, Eleftherios Garyfallidis wrote: > Hello, > > Is it possible using ctypes to call C functions from a shared object > containing double pointers e.g. int foo(float **i) and if yes how? (Untested conjecture:) import ctypes # ...create ctypes_wrapped_foo... the_float

Re: all() is slow?

2011-11-07 Thread Joshua Landau
See these all vs myAll tests: %~> python all_test 0.5427970886230469 1.1579840183258057 3.3052260875701904 3.4992029666900635 3.303942918777466 1.7343430519104004 3.18320894241333 1.6191949844360352 In the first pair and the second pair, the pairs receive the same input. The builtin all outper

Re: Extracting elements over multiple lists?

2011-11-07 Thread Terry Reedy
On 11/7/2011 1:22 PM, John Gordon wrote: In JoeM writes: Thanks guys, I was just looking for a one line solution instead of a for loop if possible. Why do you consider [x.remove(x[0]) for x in [a,b,c]] cheating? It seems compact and elegant enough for me. It looks like incomplete cod

Re: memory management

2011-11-07 Thread Terry Reedy
On 11/7/2011 3:47 PM, Stefan Krah wrote: Juan Declet-Barreto wrote: Well, I am using Python 2.5 (and the IDLE shell) in Windows XP, which ships with ESRI's ArcGIS. In addition, I am using some functions in the arcgisscripting Python geoprocessing module for geographic information systems (GIS)

Re: Python lesson please

2011-11-07 Thread Terry Reedy
On 11/7/2011 11:30 AM, gene heskett wrote: Perhaps winderz does not have 'pipe' files so the authors never got caught out on this? Last I know, Windows not only had no pipe files but also no real in-memory pipes. Maybe one or both of those has changed. -- Terry Jan Reedy -- http://mail.pyt

Re: Python lesson please

2011-11-07 Thread gene heskett
On Monday, November 07, 2011 07:34:05 PM Terry Reedy did opine: > On 11/7/2011 11:30 AM, gene heskett wrote: > > Perhaps winderz does not have 'pipe' files so the authors never got > > caught out on this? > > Last I know, Windows not only had no pipe files but also no real > in-memory pipes. Mayb

Re: Python ORMs Supporting POPOs and Substituting Layers in Django

2011-11-07 Thread Travis Parks
On Nov 7, 12:44 pm, John Gordon wrote: > In John Gordon writes: > > > In <415d875d-bc6d-4e69-bcf8-39754b450...@n18g2000vbv.googlegroups.com> > > Travis Parks writes: > > > Which web frameworks have people here used and which have they found > > > to be: scalable, RAD compatible, performant, st

Re: How to mix-in __getattr__ after the fact?

2011-11-07 Thread Lie Ryan
On 10/31/2011 11:01 PM, dhyams wrote: Thanks for all of the responses; everyone was exactly correct, and obeying the binding rules for special methods did work in the example above. Unfortunately, I only have read-only access to the class itself (it was a VTK class wrapped with SWIG), so I had

easy_install doesn't install non-package *.py file

2011-11-07 Thread Makoto Kuwata
I got trouble about easy_install command. My package: README.rst setup.py foobar/ foobar/__init__.py foobar/data/ foobar/data/template.py In the above example, 'foobar/data/template.py' is just a template data file (= not a python module file). (notice that 'foobar/data/__init__.py'

Re: Python lesson please

2011-11-07 Thread Cameron Simpson
On 07Nov2011 15:00, gene heskett wrote: | On Monday, November 07, 2011 02:43:11 PM Dave Angel did opine: | > On 11/07/2011 11:40 AM, gene heskett wrote: | > > Down toward the bottom of the file, the tab indentations were as high | > > as 33 leading tabs per line. Each stanza of the data was tab |

Re: Python ORMs Supporting POPOs and Substituting Layers in Django

2011-11-07 Thread Lie Ryan
On 11/08/2011 01:21 PM, Travis Parks wrote: On Nov 7, 12:44 pm, John Gordon wrote: In John Gordon writes: In<415d875d-bc6d-4e69-bcf8-39754b450...@n18g2000vbv.googlegroups.com> Travis Parks writes: Which web frameworks have people here used and which have they found to be: scalable, RAD

overview on dao

2011-11-07 Thread Simeon Chaos
Dao is a a functional logic solver (similar to lambdaProlog, Curry) written in python. The links related to dao are here: pypi distribution and document: http://pypi.python.org/pypi/daot code repository: https://github.com/chaosim/dao dao groups on google: Group name: daot, Group home page: http:/

Re: Question about 'iterable cursors'

2011-11-07 Thread Lie Ryan
On 11/07/2011 05:04 PM, John Nagle wrote: Realize that SQLite is not a high-performance multi-user database. You use SQLite to store your browser preferences, not your customer database. I agree with SQLite is not multi-user; I disagree that SQLite is not a high-performance database. In single

simpler over view on dao: a functional logic solver with builtin parsing power, and dinpy, the sugar syntax for dao in python

2011-11-07 Thread Simeon Chaos
Dao is a a functional logic solver (similar to lambdaProlog, Curry) written in python. The links related to dao are here: pypi distribution and document: http://pypi.python.org/pypi/daot code repository: https://github.com/chaosim/dao dao groups on google: http://groups.google.com/group/daot, d.

Re: How to mix-in __getattr__ after the fact?

2011-11-07 Thread Steven D'Aprano
On Tue, 08 Nov 2011 15:17:14 +1100, Lie Ryan wrote: > On 10/31/2011 11:01 PM, dhyams wrote: >> >> Thanks for all of the responses; everyone was exactly correct, and >> obeying the binding rules for special methods did work in the example >> above. Unfortunately, I only have read-only access to th

Re: Python lesson please

2011-11-07 Thread gene heskett
On Tuesday, November 08, 2011 12:53:20 AM Cameron Simpson did opine: > On 07Nov2011 15:00, gene heskett wrote: > | On Monday, November 07, 2011 02:43:11 PM Dave Angel did opine: > | > On 11/07/2011 11:40 AM, gene heskett wrote: > | > > Down toward the bottom of the file, the tab indentations were

Re: Python lesson please

2011-11-07 Thread Chris Angelico
On Tue, Nov 8, 2011 at 5:29 PM, gene heskett wrote: > Not on that file, but on the next pull it was, and works now.  And on the > first file, the blink compare disclosed I had some indentation wrong, and > that there was a lowercase b in front of all the opening double quotes used > that I didn't

Re: Extracting elements over multiple lists?

2011-11-07 Thread Laurent Claessens
Le 07/11/2011 19:01, JoeM a écrit : Thanks guys, I was just looking for a one line solution instead of a for loop if possible. Why do you consider [x.remove(x[0]) for x in [a,b,c]] cheating? It seems compact and elegant enough for me. I have the feeling that it does not do what I expect it do

Re: Python ORMs Supporting POPOs and Substituting Layers in Django

2011-11-07 Thread Chris Angelico
On Tue, Nov 8, 2011 at 4:09 PM, Lie Ryan wrote: > IMO, Python has a much nicer choice of built-in data structure for data > processing. Python has a much more mature object-orientation, e.g. I prefer > writing l.append(x) rather than array_push(l, x). I think these qualities > are what makes you t