Re: recording input from USB port and write to text file

2009-08-19 Thread Simon Forman
On Aug 18, 7:33 pm, Allan af2...@gmail.com wrote: Hi! I'm fairly new to Python.  I understand the basics basics but I'm been trying to write a simple python code that will let me read input data (such as mouse movement) from my USB port and write it in a text file and I am so lost.  Can anyone

Re: Need cleanup advice for multiline string

2009-08-19 Thread Simon Forman
On Aug 19, 12:05 am, Ben Finney ben+pyt...@benfinney.id.au wrote: Simon Forman sajmik...@gmail.com writes: On Tue, Aug 18, 2009 at 8:42 PM, Ben Finneyben+pyt...@benfinney.id.au wrote: We're all unified by our humanity. Bringing any god into the picture is surely counter to any goals

Re: #elements of seq A in seq B

2009-08-19 Thread Simon Forman
in b: if item in a: d[item] += 1 return d print g(A, B) # prints defaultdict(type 'int', {' ': 1, 'e': 1, 'g': 1, 'i': 1, 'o': 1, 'n': 2, 's': 1, 'r': 2, 't': 2}) HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: #elements of seq A in seq B

2009-08-19 Thread Simon Forman
On Aug 19, 11:34 pm, John Machin sjmac...@lexicon.net wrote: On Aug 20, 12:12 pm, Simon Forman sajmik...@gmail.com wrote: On Aug 19, 8:17 pm, Jan Kaliszewski z...@chopin.edu.pl wrote: If you mean: to count non overlaping occurences of string A in B -- simply:    B.count(A) You

Re: comparing XML files to eachother

2009-08-18 Thread Simon Forman
On Mon, Aug 17, 2009 at 3:51 PM, David Brochubrochu...@gmail.com wrote: I need to compare one xml document to another to see if the content matches. Unfortunately, the formatting (spacing) and order of elements may change between files from run to run. I have looked into xml dom minidom but

Re: define class over 2 files

2009-08-18 Thread Simon Forman
On Tue, Aug 18, 2009 at 1:57 AM, Steven D'Apranoste...@remove.this.cybersource.com.au wrote: On Mon, 17 Aug 2009 21:45:57 -0700, naveen wrote: Is it possible to split up a class definition over multiple files? Not exactly, but you can do variations of this: In file A.py, create: class

Re: Need cleanup advice for multiline string

2009-08-18 Thread Simon Forman
On Tue, Aug 18, 2009 at 1:05 PM, Jean-Michel Pichavantjeanmic...@sequans.com wrote: Steve Holden wrote: Robert Dailey: [...] It's a figure of speech. And besides, why would I want programming advice from a woman? lol. Thanks for the help. Sorry, Robert, simply not acceptable. Whether

Re: Inheriting dictionary

2009-08-18 Thread Simon Forman
On Tue, Aug 18, 2009 at 6:08 PM, Simon Formansajmik...@gmail.com wrote: On Aug 18, 3:44 pm, Pavel Panchekha pavpanche...@gmail.com wrote: I want a dictionary that will transparently inherit from a parent dictionary. So, for example: a = InheritDict({1: one, 2: two, 4: four}) b

Re: Need cleanup advice for multiline string

2009-08-18 Thread Simon Forman
On Tue, Aug 18, 2009 at 8:03 PM, Steven D'Apranost...@remove-this-cybersource.com.au wrote: On Tue, 18 Aug 2009 17:13:02 -0400, Simon Forman wrote: Sexism, racism, homophobia, religious intolerance, etc., all stem from a fundamental forgetfulness of our Unity in God (as I would put

Re: Need cleanup advice for multiline string

2009-08-18 Thread Simon Forman
On Tue, Aug 18, 2009 at 8:42 PM, Ben Finneyben+pyt...@benfinney.id.au wrote: Simon Forman sajmik...@gmail.com writes: Sexism, racism, homophobia, religious intolerance, etc., all stem from a fundamental forgetfulness of our Unity in God (as I would put it) It seems odd, for someone who cites

Re: problem with interface of operator.itemgetter

2009-08-16 Thread Simon Forman
) if len(indexes) 1: return I return lambda thing: (I(thing),) If indexes contains only one index the itemgetter is wrapped in a lambda that turns its output into a tuple. HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Splitting a string into substrings of equal size

2009-08-16 Thread Simon Forman
On Aug 14, 8:22 pm, candide cand...@free.invalid wrote: Suppose you need to split a string into substrings of a given size (except possibly the last substring). I make the hypothesis the first slice is at the end of the string. A typical example is provided by formatting a decimal string with

Re: Need cleanup advice for multiline string

2009-08-12 Thread Simon Brunning
industry (cf http://tinyurl.com/c5nqju and many more), I'm sorry to say that I don't think this is funny. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need cleanup advice for multiline string

2009-08-12 Thread Simon Forman
On Aug 12, 10:41 am, Robert Dailey rcdai...@gmail.com wrote: On Aug 12, 9:09 am, exar...@twistedmatrix.com wrote: On 01:27 pm, jeanmic...@sequans.com wrote: Simon Brunning wrote: 2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote

Re: Search and write to .txt file

2009-08-11 Thread Simon Forman
is False) so your if statement will always succeed unless '1' is the first character on the line. HTH, ~Simon P.S. you can use the help() command in the python interpreter to get docs on most things: help(str.find) Help on method_descriptor: find(...) S.find(sub [,start [,end]]) - int

Re: dictionary help

2009-08-11 Thread Simon Forman
On Aug 11, 11:51 am, MRAB pyt...@mrabarnett.plus.com wrote: Krishna Pacifici wrote: Thanks for the help. Actually this is part of a much larger project, but I have unfortunately pigeon-holed myself into needing to do these things without a whole lot of flexibility. To give a specific

Re: unique-ifying a list

2009-08-09 Thread Simon Forman
On Aug 7, 4:53 pm, kj no.em...@please.post wrote: Suppose that x is some list.  To produce a version of the list with duplicate elements removed one could, I suppose, do this:     x = list(set(x)) but I expect that this will not preserve the original order of elements. I suppose that I

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-08-06 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___ ___ Python-bugs-list

Re: Newbie Question regarding __init__()

2009-08-04 Thread Simon
On Aug 3, 11:00 pm, Dave Angel da...@ieee.org wrote: Simon wrote: On Aug 2, 5:51 am, Dave Angel da...@ieee.org wrote: snip I don't understand your comparison to Foxpro.  read on. As your code was last posted, you don't need a return value from init_Exec()  Every function that doesn't

Re: Newbie Question regarding __init__()

2009-08-03 Thread Simon
On Aug 2, 5:51 am, Dave Angel da...@ieee.org wrote: Simon wrote: Okay I will fix my code and include self and see what happens.  I know I tried that before and got another error which I suspect was another newbie error. The idea behind the init_Pre is that I can put custom code here

Re: Newbie Question regarding __init__()

2009-08-01 Thread Simon
().And.This.init_Exec() and the result is discarded so that is why it looks the way it does. In this form init_Exec has to return a value. However, If self.init_Pre(): self.init_Exec() would work the same and then I could avoid returning a value. Thanks, Simon On Aug 1, 5:52 am, Dave Angel da

Newbie Question regarding __init__()

2009-07-31 Thread Simon
Hi I want to create an instance of dcCursor which inherits from dcObject. When I run the following code it gives the error shown. Can some explain to me what is wrong? I have included the dcObject.py and dcCursor.py below. import dcObject import dcCursor x = dcCursor.dcCursor() Traceback

Re: Newbie Question regarding __init__()

2009-07-31 Thread Simon
Hi So should the dcObject class include the self as well since I have not defined an __init__ method in dcCursor? Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Very Strange Problem

2009-07-30 Thread Simon Forman
On Wed, Jul 29, 2009 at 3:10 PM, Omer Khalidomer.kha...@cern.ch wrote: Hi Dave, Thanks for your reply. I actually didn't cut and paste my code as it was dispersed in different places, i typed the logic behind my code in the email (and obiviously made some typos, indentations is some thing

Re: iText for Python

2009-07-27 Thread Simon Brunning
a separate module with Python and I am thinking of doing this in as my final year project also. Kindly give me your suggestion. What would this give us that ReportLab does not? I wouldn't want to see you spend a lot of time reinventing the wheel... -- Cheers, Simon B. -- http://mail.python.org

Re: invoke method on many instances

2009-07-21 Thread Simon Forman
like so: def apply3(iterator, method, *args, **kwargs): for item in iterator: method(item, *args, **kwargs) class X: def method(self, x, y, **kw): pass items = [X() for _ in range(10)] apply3(items, X.method, 1, 2, foo=3) HTH, ~Simon -- http://mail.python.org/mailman/listinfo

Re: tough-to-explain Python

2009-07-21 Thread Simon Forman
On Mon, Jul 20, 2009 at 9:54 PM, Paul Rubinhttp://phr...@nospam.invalid wrote: Simon Forman sajmik...@gmail.com writes: But I'm glad it's there to study, these are wheels I don't have to invent for myself. http://dwheeler.com/essays/high-assurance-floss.html might be an interesting place

Re: Help understanding the decisions *behind* python?

2009-07-21 Thread Simon Forman
(computer_science) ) Broadly speaking, lists are useful for things like stacks and queues, and sorting, while tuples are useful for aggregating heterogeneous data into coherent units, and you can hash them (provided their contents are also hashable.) HTH, ~Simon -- http://mail.python.org/mailman

Re: time.strftime('%m-%d-%Y %H:%m:%S') to log is out of order

2009-07-21 Thread Simon Forman
On Jul 21, 5:00 pm, davidj411 davidj...@gmail.com wrote: I am using a recursive function to print the time and a few other things on each pass. ( the function calculates size of file that is being transferred and if not 100 % copied, it waits 20 secs and checks again). i would expect the

Re: time.strftime('%m-%d-%Y %H:%m:%S') to log is out of order

2009-07-21 Thread Simon Forman
On Jul 21, 5:53 pm, davidj411 davidj...@gmail.com wrote: On Jul 21, 5:29 pm, Simon Forman sajmik...@gmail.com wrote: On Jul 21, 5:00 pm, davidj411 davidj...@gmail.com wrote: I am using a recursive function to print the time and a few other things on each pass. ( the function

Re: tough-to-explain Python

2009-07-20 Thread Simon Forman
, these are wheels I don't have to invent for myself. ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: tough-to-explain Python

2009-07-20 Thread Simon Forman
useful or necessary. However, I do feel that it's better to learn the correct way, and then introduce ambiguity, than to simply throw e.g. Java at some poor student and let them find solid ground catch as catch can. ~Simon -- http://mail.python.org/mailman/listinfo/python-list

[issue6500] urllib2 maximum recursion depth exceeded

2009-07-17 Thread simon
New submission from simon nku...@gmail.com: def __getattr__(self, attr): # XXX this is a fallback mechanism to guard against these # methods getting called in a non-standard order. this may be # too complicated and/or unnecessary. # XXX should the __r_XXX

Re: tkinter problem

2009-07-10 Thread Paul Simon
David Smith d...@cornell.edu wrote in message news:h35f78$pt...@ruby.cit.cornell.edu... Paul Simon wrote: Peter Otten __pete...@web.de wrote in message news:h3481q$d95$0...@news.t-online.com... Paul Simon wrote: Chris Rebert c...@rebertia.com wrote in message news:mailman

Re: tkinter problem

2009-07-09 Thread Paul Simon
Peter Otten __pete...@web.de wrote in message news:h3481q$d95$0...@news.t-online.com... Paul Simon wrote: Chris Rebert c...@rebertia.com wrote in message news:mailman.2863.1247095339.8015.python-l...@python.org... On Wed, Jul 8, 2009 at 4:18 PM, Paul Simonpsi...@sonic.net wrote: I have

Re: can i write a assemly language programs in python

2009-07-09 Thread Simon Forman
them to standard assembly languages. HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: gett error message: TypeError: 'int' object is not callable

2009-07-09 Thread Simon Forman
has changed in the last few years) HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: ... remove all 0 values

2009-07-08 Thread Simon Forman
On Jul 8, 10:44 am, Daniel Austria futureb...@gmx.at wrote: Hi python - hackers, just one question. How can i remove all 0 values in a list? Sure - i can loop over it, but that s not a neat style.  list.remove() will only remove the first occurence. Doing that while no exception is raised is

tkinter problem

2009-07-08 Thread Paul Simon
do I modify my python configuration? Is there a file that needs to be edited? Which setup.py file do I use? Make? or python setup.py build and python setup.py install? Thanks. I appreciate your help. Paul Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter problem

2009-07-08 Thread Paul Simon
Chris Rebert c...@rebertia.com wrote in message news:mailman.2863.1247095339.8015.python-l...@python.org... On Wed, Jul 8, 2009 at 4:18 PM, Paul Simonpsi...@sonic.net wrote: I have the tkinter problem and need some assistance to straighten it out. From the web page

Re: tough-to-explain Python

2009-07-08 Thread Simon Forman
(I wanted to reply to a few messages in one post so I quoted them all below. Let me know if this is bad etiquette.) On Jul 8, 8:23 am, kj no.em...@please.post wrote: In 5f0a2722-45eb-468c-b6b2-b7bb80ae5...@q11g2000yqi.googlegroups.com Simon Forman sajmik...@gmail.com writes: Frankly, I'm

Re: Newbie needs help

2009-07-07 Thread Simon Forman
though. HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Catching control-C

2009-07-07 Thread Simon Forman
On Jul 6, 6:02 pm, Michael Mossey michaelmos...@gmail.com wrote: On Jul 6, 2:47 pm, Philip Semanchuk phi...@semanchuk.com wrote: On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote: What is required in a python program to make sure it catches a   control- c on the command-line? Do some

Re: Clarity vs. code reuse/generality

2009-07-07 Thread Simon Forman
On Tue, Jul 7, 2009 at 8:51 AM, Jean-Michel Pichavantjeanmic...@sequans.com wrote: Steven D'Aprano wrote: On Tue, 07 Jul 2009 05:13:28 +, Lie Ryan wrote: When people are fighting over things like `sense`, although sense may not be strictly wrong dictionary-wise, it smells of something

Re: automatic multiprocessing

2009-07-07 Thread Simon Forman
the if statement if you're going to use it often.) HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: tough-to-explain Python

2009-07-07 Thread Simon Forman
On Jul 7, 4:04 pm, kj no.em...@please.post wrote: I'm having a hard time coming up with a reasonable way to explain certain things to programming novices. Consider the following interaction sequence: def eggs(some_int, some_list, some_tuple): ... some_int += 2 ... some_list +=

Re: generation of keyboard events

2009-07-06 Thread Simon Brunning
to write a python script which invokes my program and pass Enter key event to my program so that it runs without manual intervention. Try http://pywinauto.openqa.org/. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tree structure consuming lot of memory

2009-07-06 Thread Simon Forman
On Mon, Jul 6, 2009 at 6:12 AM, mayank guptamooni...@gmail.com wrote: Thanks for the other possibilites. I would consider option (2) and (3) to improve my code. But out of curiosity, I would still like to know why does an object of a Python-class consume so much of memory (1.4 kb), and this

Re: question of style

2009-07-04 Thread Simon Forman
On Jul 4, 2:03 am, upwestdon upwest...@gmail.com wrote: On Jul 2, 1:23 pm, Simon Forman sajmik...@gmail.com wrote: Hey I was hoping to get your opinions on a sort of minor stylistic point. These two snippets of code are functionally identical. Which would you use and why? The first

Re: question of style

2009-07-04 Thread Simon Forman
On Jul 4, 2:10 pm, Paul Rubin http://phr...@nospam.invalid wrote: Simon Forman sajmik...@gmail.com writes: if not (self.higher and self.lower):     return self.higher or self.lower That would work too in this case, both higher and lower are expected to be either None or an object

Re: Clarity vs. code reuse/generality

2009-07-04 Thread Simon Forman
. FWIW, you can use if __debug__: and put anything you like in the statement suite and the whole if statement goes away when run with '- O'. Sort of a super-assert. Regards, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: PSP Caching

2009-07-03 Thread Simon Forman
caching with apache, but the answer mght be on this page: http://httpd.apache.org/docs/2.2/caching.html Meanwhile, couldn't you just send apache a restart signal when you modify your code? HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: question of style

2009-07-03 Thread Simon Forman
On Jul 3, 2:09 am, Lie Ryan lie.1...@gmail.com wrote: Simon Forman wrote: On Jul 2, 3:57 pm, Scott David Daniels scott.dani...@acm.org wrote: Duncan Booth wrote: Simon Forman sajmik...@gmail.com wrote: ... if self.higher is self.lower is None: return ... As a matter of style however

Re: question of style

2009-07-03 Thread Simon Forman
On Jul 3, 12:56 am, Paul Rubin http://phr...@nospam.invalid wrote: Simon Forman sajmik...@gmail.com writes: Yes, but the concept of null pointers is considered kludgy these days. Seriously? kludgy?  (I really AM getting old.)  http://math.andrej.com/2009/04/11/on-programming-language

Re: Python debugger

2009-07-03 Thread Simon Forman
On Jul 3, 8:15 am, srinivasan srinivas sri_anna...@yahoo.co.in wrote: Hi, Could you suggest some python debuggers? Thanks, Srini       Love Cricket? Check out live scores, photos, video highlights and more. Click herehttp://cricket.yahoo.com Ipython has good debugger integration. --

Re: Need Help

2009-07-02 Thread Simon Brunning
*...no... *Amongst* our links Amongst our linkry are such elements as http://effbot.org/zone/unicode-objects.htm, http://www.joelonsoftware.com/articles/Unicode.html I'll come in again. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

question of style

2009-07-02 Thread Simon Forman
Hey I was hoping to get your opinions on a sort of minor stylistic point. These two snippets of code are functionally identical. Which would you use and why? The first one is easier [for me anyway] to read and understand, but slightly less efficient, while the second is [marginally] harder to

Re: question of style

2009-07-02 Thread Simon Forman
On Jul 2, 1:44 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: Simon Forman sajmik...@gmail.com wrote: Hey I was hoping to get your opinions on a sort of minor stylistic point. These two snippets of code are functionally identical. Which would you use and why? The first one

Re: question of style

2009-07-02 Thread Simon Forman
On Jul 2, 4:08 pm, Erik Max Francis m...@alcyone.com wrote: Simon Forman wrote: Hey I was hoping to get your opinions on a sort of minor stylistic point. These two snippets of code are functionally identical. Which would you use and why? The first one is easier [for me anyway] to read

Re: question of style

2009-07-02 Thread Simon Forman
On Jul 2, 3:57 pm, Scott David Daniels scott.dani...@acm.org wrote: Duncan Booth wrote: Simon Forman sajmik...@gmail.com wrote: ... if self.higher is self.lower is None: return ... As a matter of style however I wouldn't use the shorthand to run two 'is' comparisons together, I'd

Re: What are the limitations of cStringIO.StringIO() ?

2009-07-02 Thread Simon Forman
On Wed, Jul 1, 2009 at 7:48 AM, Barak, Ronron.ba...@lsi.com wrote: Hi, I think I'm up against a limitation in cStringIO.StringIO(), but could not find any clues on the web, especially not in http://docs.python.org/library/stringio.html. What I have is the following function:     def

Re: question of style

2009-07-02 Thread Simon Forman
On Jul 2, 9:30 pm, Paul Rubin http://phr...@nospam.invalid wrote: Simon Forman sajmik...@gmail.com writes: This code is part of a delete() method for a binary tree implementation. None is used to simulate a NULL pointer. In the case where both children are non-None the code goes

Re: getting rid of —

2009-07-02 Thread Simon Forman
interpreter here and it worked fine: | data = 'foo — bar' | data.split('—') |['foo ', ' bar'] | data = u'foo — bar' | data.split(u'—') |[u'foo ', u' bar'] Figure out the smallest piece of html source code that causes the problem and include that with your next post. HTH, ~Simon You might also read

problem installing python 2.6.2 from tarball

2009-07-01 Thread Paul Simon
like build, Demo, Doc, Include, Lib, etc. There are many files under /usr/bin/local/ which appear to be duplicates. This looks like a mess to me and would like some help to sort this out. Paul Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Open Source RSS Reader in Python?

2009-07-01 Thread Simon Forman
On Jul 1, 7:18 pm, Alex alex.lavoro.pro...@gmail.com wrote: I am looking for an open source RSS reader (desktop, not online) written in Python but in vain. I am not looking for a package but a fully functional software. Google: python open source (rss OR feeds) reader Any clue ? There's

Re: Flexible warning system

2009-06-29 Thread Simon Forman
. Repetitions of a particular warning for the same source location are typically suppressed. - http://docs.python.org/library/warnings.html That said, why not just use exceptions? HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: The Python Way for module configuration?

2009-06-29 Thread Simon Forman
On Sun, Jun 28, 2009 at 1:22 PM, kjno.em...@please.post wrote: In 87fxdlujds@benfinney.id.au Ben Finney ben+pyt...@benfinney.id.au writes: (Even if you don't want to receive email, could you please give your actual name in the ‘From’ field instead of just initials? It makes conversation

Re: Good books in computer science?

2009-06-29 Thread Simon Forman
On Sat, Jun 13, 2009 at 11:49 AM, koranthalakoranth...@gmail.com wrote: Hi all,    I do understand that this is not a python question and I apologize for that straight up.    But I am a full time follower of this group and I have seen very very brilliant programmers and solutions.    I also

Re: Creating an Instance Messenger type of application

2009-06-29 Thread Simon Forman
On Mon, Jun 29, 2009 at 12:18 PM, Elf Scripterlfscrip...@gmail.com wrote: Hello, Has anyone created an Instance Messenger in Python before, i mean a simple or Complex GUI based instance messenger? I thought about something like, the client also act as server, has it`s own listening port, but

Re: Creating an Instance Messenger type of application

2009-06-29 Thread Simon Forman
On Mon, Jun 29, 2009 at 12:44 PM, Elf Scripterlfscrip...@gmail.com wrote: Thank you for correcting my mistake. I checked google but nothing close. did you have any idea? On Mon, Jun 29, 2009 at 5:42 PM, Simon Forman sajmik...@gmail.com wrote: On Mon, Jun 29, 2009 at 12:18 PM, Elf

Re: What does Guido want in a GUI toolkit for Python?

2009-06-28 Thread Simon Forman
call pygoo that lets you create Tkinter GUIs from a simple text specification. http://www.pygoo.com/ http://code.google.com/p/pygoo/ Warm regards, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginning with Python; the right choice?

2009-06-28 Thread Simon Brunning
-crowdsourcing-app - The Guardian, a UK national newspaper, quickly wrote and deployed a Python application to allow their readers to cooperate in the massive manual task of analysing MPs' expenses receipts, looking for ill-doing. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo

Re: creating garbage collectable objects (caching objects)

2009-06-28 Thread Simon Forman
On Jun 28, 11:03 am, News123 news...@free.fr wrote: Hi. I started playing with PIL. I'm performing operations on multiple images and would like compromise between speed and memory requirement. The fast approach would load all images upfront and create then multiple result files. The

mailog - a minimalstic blog engine

2009-06-25 Thread simon oberhammer
serving static html (enhanced with ajax) created by a python daemon fetching markdowned emails via imap. * post and comment per email o youremail+p...@example.com o youremail+comm...@example.com * no database, no dependencies (only python, which you should already

Re: Graphical library - charts

2009-06-22 Thread Paul Simon
I suggest you look at matplotlib. It's a bit of a learning curve but will do whatever you need. I have a similar requirement and found that gnuplot did not work for me. The plots are impressive. Paul Simon przemol...@poczta.fm-n-o-s-p-a-m wrote in message news:h1nv4q$5k

Re: install Python-2.4.4 from source (parallel to existing Python-2.6)

2009-06-13 Thread Simon
Christian Heimes wrote: Simon schrieb: Christian Heimes wrote: Simon wrote: I installed Python-2.4.4.tar.bz2 from python.org, using gcc-4.3 (within openSUSE 11.1 x86_64) via 'make altinstall'. First, I tried to configure with the following flags: --prefix=/opt/python-24 --enable-framework

install Python-2.4.4 from source (parallel to existing Python-2.6)

2009-06-12 Thread Simon
edexter wrote: simon wrote: Hi everybody, The situation: I wrote a GUI, based on Python, TkInter and Pmw. It runs perfectly fine with Python 2.4 (providing, TkInter and Pmw are installed). But it crashes with Python 2.6. I tried this on MacOSX11.4 and various Linux Distributions. Crashes

Re: install Python-2.4.4 from source (parallel to existing Python-2.6)

2009-06-12 Thread Simon
Simon wrote: edexter wrote: simon wrote: Hi everybody, The situation: I wrote a GUI, based on Python, TkInter and Pmw. It runs perfectly fine with Python 2.4 (providing, TkInter and Pmw are installed). But it crashes with Python 2.6. I tried this on MacOSX11.4 and various Linux Distributions

Re: install Python-2.4.4 from source (parallel to existing Python-2.6)

2009-06-12 Thread Simon
Benjamin Kaplan wrote: On Fri, Jun 12, 2009 at 9:31 AM, Simon simon...@gmx.de mailto:simon...@gmx.de wrote: edexter wrote: simon wrote: Hi everybody, The situation: I wrote a GUI, based on Python, TkInter and Pmw. It runs

[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2009-06-07 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6230 ___ ___ Python-bugs-list

[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-07 Thread Simon Cross
Changes by Simon Cross hodges...@gmail.com: -- nosy: +hodgestar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6232 ___ ___ Python-bugs-list

Re: Programming language comparison examples?

2009-06-06 Thread Simon Brunning
://www.codecodex.com/wiki/index.php?title=Main_Page http://merd.sourceforge.net/pixel/language-study/scripting-language/ http://pleac.sourceforge.net/ http://www.angelfire.com/tx4/cus/shapes/index.html And my favorite: http://99-bottles-of-beer.net/ -- Cheers, Simon B. -- http://mail.python.org/mailman

select.poll returning strange file descriptors.

2009-05-25 Thread Simon Wittber
I'm using the poll object from select.poll to check for events on sockets. It seems to work, however when I call .poll() on the poll objects, I sometimes get a fileno 1 returned, which is strange, because none of the sockets I registered with the poll object have a fileno of 1. In fact, the

Re: select.poll returning strange file descriptors.

2009-05-25 Thread Simon Wittber
Solved. I was using poll.register(fileno) without any flags specfied, which means tell me when _anything_ happens. Because of this, I was receiving OOB data, which seems to use strange fileno values. to fix this, I now use this: poll.register(sock.fileno(), select.POLLIN|select.POLLOUT|

Re: pushback iterator

2009-05-22 Thread Simon Forman
enough to write. *shrug* Regards, ~Simon [1] http://www.dabeaz.com/generators/Generators.pdf -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert UNIX formated text files to DOS formated?

2009-05-12 Thread Simon Forman
on your system. (FYI there's also a crlf.py script in the same directory too.) HTH ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping comments

2009-05-11 Thread Simon Brunning
then. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression, unicode

2009-04-30 Thread Simon Strobl
Thanks for your hints. Usually, all my files are utf-8. Obviously, I somehow managed to inadvertently switch the encoding when creating this specific file. I have no idea how this could happen. Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: using zip() and dictionaries

2009-04-30 Thread Simon Forman
On Apr 30, 2:00 pm, Sneaky Wombat joe.hr...@gmail.com wrote: quick update, #change this line: for (k,v) in zip(header,[[]]*len(header)): #to this line: for (k,v) in zip(header,[[],[],[],[]]): and it works as expected.  Something about the [[]]*len(header) is causing the weird behavior.  

Re: don't understand namespaces...

2009-04-30 Thread Simon Forman
= App(root) win2 = Toplevel(root) app2 = App2(win2) app.setWidget(app2.some_name) root.mainloop() Then code in App can use self.widget to access the widget. HTH, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Return value usage

2009-04-29 Thread Simon Brunning
and 2. I would like to keep the complexity of the api to a bare minimum. Why not return a proxy, and have the proxy do the retrieval of the needed data if it's used? Delegation is ridiculously easy in Python. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

regular expression, unicode

2009-04-29 Thread Simon Strobl
/python3.0/codecs.py, line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data Simon -- http://mail.python.org/mailman/listinfo/python-list

regular expression, unicode

2009-04-29 Thread Simon Strobl
/python3.0/codecs.py, line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-3: invalid data Simon -- http://mail.python.org/mailman/listinfo/python-list

Problem with COM and variants

2009-04-21 Thread Simon Carter
build 213, on Vista 64. Any help much appreciated. Thanks! Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with COM and variants

2009-04-21 Thread Simon Carter
Doh! Ta. Simon John Machin sjmac...@lexicon.net wrote in message news:023fcc82-6e98-4ddd-9977-06d95ab44...@c18g2000prh.googlegroups.com... On Apr 21, 7:37 pm, Simon Carter bbbscar...@gmail.com wrote: Hullo! I'm having a problem interfacing with a proprietary COM library on Windows, and I

[issue1697175] winreg module for cygwin?

2009-04-06 Thread Simon Law
Simon Law sfl...@sfllaw.ca added the comment: zooko: You may be interested in http://pypi.python.org/pypi/cygwinreg/ -- nosy: +sfllaw ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1697175

[issue5704] Command line option '-3' should imply '-t'

2009-04-05 Thread Simon Anders
New submission from Simon Anders sand...@fs.tum.de: The '-3' command line option in Python 2.6 is supposed to warn whenever encountering something that would throw an error in Python 3. Mixing of tabs and spaces has become illegal in Python 3. However, Python 2.6, called with '-3', passes

Re: Converting a PIL image object to a buffer

2009-04-02 Thread Simon Hibbs
On 2 Apr, 08:28, Diez B. Roggisch de...@nospam.web.de wrote: Simon Hibbs schrieb: On 1 Apr, 21:43, Gary Herron gher...@islandtraining.com wrote: Simon Hibbs wrote: I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data

Converting a PIL image object to a buffer

2009-04-01 Thread Simon Hibbs
(win32clipboard.CF_BITMAP, img) It fails, telling be that The object must support the buffer interface. How can I convert a PIL image into a buffer object? I can't find any clues. Help appreciated, Simon Hibbs -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a PIL image object to a buffer

2009-04-01 Thread Simon Hibbs
On 1 Apr, 21:43, Gary Herron gher...@islandtraining.com wrote: Simon Hibbs wrote: I'm trying to dump a snapshot of my application window to the clipboard. I can use ImageGrab in PIL to get the screen data into a PIL image object, which i have converted to a bitmap using ImageWin, but when

<    2   3   4   5   6   7   8   9   10   11   >