Re: python cgi problem with textarea

2007-04-23 Thread Tim Roberts
placid <[EMAIL PROTECTED]> wrote: >On Apr 23, 1:01 am, Adrian Smith <[EMAIL PROTECTED]> wrote: >> On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: >> >> > i just tried it and its working. here it is >> >> >http://yallara.cs.rmit.edu.au/~bevcimen/form.html >> >> > maybe the internal server err

Re: Tutorial creates confusion about slices

2007-04-23 Thread Antoon Pardon
On 2007-04-23, Hamilton, William <[EMAIL PROTECTED]> wrote: >> -Original Message- >> From: [EMAIL PROTECTED] > [mailto:python- >> [EMAIL PROTECTED] On Behalf Of Antoon > Pardon >> Sent: Monday, April 23, 2007 7:38 AM >> To: python-list@python.org >> Subject: Tutorial creates confusion about

Re: Tutorial creates confusion about slices

2007-04-23 Thread Antoon Pardon
On 2007-04-23, Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 23, 2007, at 7:38 AM, Antoon Pardon wrote: > >> The following is part of the explanation on slices in the >> tutorial: >> >> The best way to remember how slices work is to think of the indices as >> pointing between characters, wi

Re: Python Widget to read in user input box in blog

2007-04-23 Thread half . italian
On Apr 23, 6:57 pm, [EMAIL PROTECTED] wrote: > Hey, > > I am helping to develop a project that displays images based on user > input. One possible way of implementing this is via a widget that > when it is run, would read in the users input from an input text field > (probably from a blog), and re

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-23 Thread Alex Martelli
Martin Drautzburg <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > > Yes, there is: use an ORM to do the SQL generation for you. Check out > > SQLAlchemy, it will buy you much more than what you asked for. > > Might look, though in general I don't like OR mappers much. Having SQL > generate

Re: getting scancodes

2007-04-23 Thread Grant Edwards
On 2007-04-24, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Anyone knows if its possible to get scan codes ??? What hardware? What OS? > I tried with getch () but with no success, just keycodes. > May be using the something in the sys.stdin module ?? > > Please, any help would be very appreci

Does socket.setdefaulttimeout affect the timeouts in MySQLdb?

2007-04-23 Thread John Nagle
Does setting "socket.setdefaulttimeout" affect the timeout in MySQLdb for connections to the database? I'm getting database connection timeouts on a local (same machine) connnection, and I've been setting "socket.setdefaulttimeout" to 15 seconds so web page opens don't hang. But MySQLdb uses

Re: Strange terminal behavior after quitting Tkinter application

2007-04-23 Thread Chris
> Is there some Tkinter clean up that you have omitted ? Not that I know about - I was hoping someone would tell me I'd omitted something. > Have you ensured that the clean up runs on both normal > exit and abnormal exit (eg ^C) ? (^C doesn't make the application exit, it just rai

*** Watch BOMBSHELL video of Senator John Kerry admitting 911 was in INSIDE JOB ???

2007-04-23 Thread lemnitzer
http://www.911blogger.com/node/8053 Senator John Kerry was questioned concerning 9/11 during an appearance at Book People in Austin, Texas. Members of Austin 9/11 Truth Now asked Kerry about the officially unexplained collapse of WTC Building 7." Kerry responded: "I do know that that wall, I

*** Watch BOMBSHELL video of Senator John Kerry admitting 911 was in INSIDE JOB ???

2007-04-23 Thread lemnitzer
http://www.911blogger.com/node/8053 Senator John Kerry was questioned concerning 9/11 during an appearance at Book People in Austin, Texas. Members of Austin 9/11 Truth Now asked Kerry about the officially unexplained collapse of WTC Building 7." Kerry responded: "I do know that that wall, I

Re: Python Widget to read in user input box in blog

2007-04-23 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hey, > > I am helping to develop a project that displays images based on user > input. One possible way of implementing this is via a widget that > when it is run, would read in the users input from an input text field > (probably from a blog), and replace it with the H

getting scancodes

2007-04-23 Thread andmarti
Anyone knows if its possible to get scan codes ??? I tried with getch () but with no success, just keycodes. May be using the something in the sys.stdin module ?? Pleasee, any help would be very appreciated. -- Andrés M.

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-23 Thread Mel Wilson
Neil Cerutti wrote: > The interpreter explains it: "A list is not a hashable object." > Choosing a hash table instead of some kind of balanced tree seems > to be just an optimization. ;) Even with a balanced tree, if a key in a node changes value, you may have to re-balance the tree. Nothing in

Re: numpy migration (also posted to numpy-discussion)

2007-04-23 Thread Duncan Smith
Travis E. Oliphant wrote: > Duncan Smith wrote: > >> Hello, >> Since moving to numpy I've had a few problems with my existing >> code. It basically revolves around the numpy scalar types. e.g. >> > > You will probably get more help on the numpy discussion list: > > [EMAIL PROTECTED] > >

Re: script for seconds in given month?

2007-04-23 Thread Alex Martelli
edfialk <[EMAIL PROTECTED]> wrote: > Alex, very nice. That should be good enough for me. > The rest of you as well, thanks for all the help. > > I, unfortunately, failed to realize the actual platform the script is > for is IronPython. When trying to import calendar in IronPython, I > get: > >

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-23 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: > >But don't put such black magic in production. The completely different > >way is: just don't. > > Could you expand on that? After all, that's exactly what we do to > implement a super() that works with classic classes -- and it's certainly > production code.

Python Widget to read in user input box in blog

2007-04-23 Thread ecpbm765
Hey, I am helping to develop a project that displays images based on user input. One possible way of implementing this is via a widget that when it is run, would read in the users input from an input text field (probably from a blog), and replace it with the HTML that would display those images.

Re: numpy migration (also posted to numpy-discussion)

2007-04-23 Thread Travis E. Oliphant
Duncan Smith wrote: > Hello, > Since moving to numpy I've had a few problems with my existing > code. It basically revolves around the numpy scalar types. e.g. > You will probably get more help on the numpy discussion list: [EMAIL PROTECTED] You are encountering problems because numpy sca

Re: script for seconds in given month?

2007-04-23 Thread Gabriel Genellina
En Mon, 23 Apr 2007 17:28:11 -0300, edfialk <[EMAIL PROTECTED]> escribió: > Alex, very nice. That should be good enough for me. > The rest of you as well, thanks for all the help. > > I, unfortunately, failed to realize the actual platform the script is > for is IronPython. When trying to import

Re: Beginner: Simple Output to a Dialog PyQt4

2007-04-23 Thread Glen
On Sat, 21 Apr 2007 03:15:00 +0200, David Boddie wrote: > On Tuesday 17 April 2007 07:42, Glen wrote: > # Just to avoid any misunderstanding: the form is actually stored as XML. # You can create C++ code with uic or Python code with pyuic4. Right. I do remember noticing that when I opened one o

Re: Beginner: Formatting text output (PyQt4) Solved

2007-04-23 Thread Steve Holden
Glen wrote: > Sorry I've been away a while, figuring stuff out. It absolutely wasn't a > monospaced font that I was using. I'm still getting used to Qt Designer > and didn't see the expandable item under 'font' where I could easily > select another font. I felt pretty stupid when I saw it. My p

Re: Beginner: Formatting text output (PyQt4) Solved

2007-04-23 Thread Glen
Sorry I've been away a while, figuring stuff out. It absolutely wasn't a monospaced font that I was using. I'm still getting used to Qt Designer and didn't see the expandable item under 'font' where I could easily select another font. I felt pretty stupid when I saw it. My program output the co

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-23 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Martin Drautzburg <[EMAIL PROTECTED]> wrote: >> >> The problem is the first part: how can I lookup the callers module and >> the classobjs defined in there? Or finding any constant strings in the >> caller's module would also

Re: Learning Python - First Project

2007-04-23 Thread 7stud
On Apr 23, 5:04 pm, Kevin Haynes <[EMAIL PROTECTED]> wrote: > Hello > > I was a python newbie just a month ago and found the following books a great > help. > > Beginning Python: From Novice to Professional (Beginning: From Novice to > Professional) by Magnus L. Hetland (Paperback - 29 Sep > 2005

Re: Learning Python - First Project

2007-04-23 Thread Kevin Haynes
Hello I was a python newbie just a month ago and found the following books a great help. Beginning Python: From Novice to Professional (Beginning: From Novice to Professional) by Magnus L. Hetland (Paperback - 29 Sep 2005) http://www.amazon.co.uk/Beginning-Python-Novice-Professional/dp/1590595

Re: Numpy problem: Arrays in a list of dictionaries

2007-04-23 Thread Robert Kern
ZMY wrote: > Dear Robert, > > So how should I do this? I tried > > d1 = {1: array([2, 3, 4]).copy(), 2: ''} > l1 = [] > for i in range(3): l1.append(d1.copy()) > > and it still doesn't work. Of course it doesn't, for the same reason that your first attempt didn't work either. You've

Re: vtkStructuredGrid usage question in MayaVi

2007-04-23 Thread Tyler
Just found it Still not sure what the third entries are, but it's a start! # create a vtk data file sp = pyvtk.StructuredPoints ((nx, ny, 1), (xmin, ymin, 0), (dx, dy, 1)) pd = pyvtk.PointData(pyvtk.Scalars(z, name='Scalars', lookup_table="default

vtkStructuredGrid usage question in MayaVi

2007-04-23 Thread Tyler
Hello All: I hope this is a simple question, but I can't seem to figure it out. I am using MayaVi to visualize some data. I have finally manged to get the data to plot, but the axes are weird, and the scaling of the image is way off. I have been fooling around with the command below. grid = pyvtk

Re: wx.TextCtrl.SetDefaultStyle not working?

2007-04-23 Thread 7stud
On Apr 23, 11:05 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > On my platform, styling the text doesn't work for single line > > TextCtrl's(which seems kind of stupid), and on Windows I think you are > > required to specify wx.TE_RICH2 to style the text. This following > > code colors the

Re: Learning Python - First Project

2007-04-23 Thread 7stud
Uhhmm...how are you supposed to close a ShapedWindow(under Miscellaneous)? -- http://mail.python.org/mailman/listinfo/python-list

Re: Numpy problem: Arrays in a list of dictionaries

2007-04-23 Thread ZMY
Dear Robert, So how should I do this? I tried d1 = {1: array([2, 3, 4]).copy(), 2: ''} l1 = [] for i in range(3): l1.append(d1.copy()) and it still doesn't work. I think my problem is: how to create a new array every time I append it to the list... Thanks in advance, - ZMY On

Re: Learning Python - First Project

2007-04-23 Thread 7stud
On Apr 23, 4:25 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Apr 23, 12:26 pm, [EMAIL PROTECTED] wrote: > > > I am assuming you are using Tkinter for your front-end GUI. You might > > also take a gander at wxPython. It has an excellent demo you could > > download and it might give you some additional

Re: script for seconds in given month?

2007-04-23 Thread John Machin
On Apr 24, 6:39 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Mon, 2007-04-23 at 13:28 -0700, edfialk wrote: > > Alex, very nice. That should be good enough for me. > > The rest of you as well, thanks for all the help. > > > I, unfortunately, failed to realize the actual platform the script is

Re: Learning Python - First Project

2007-04-23 Thread 7stud
On Apr 23, 12:26 pm, [EMAIL PROTECTED] wrote: > I am assuming you are using Tkinter for your front-end GUI. You might > also take a gander at wxPython. It has an excellent demo you could > download and it might give you some additional ideas for > implementation:www.wxpython.org. > > Mike Hi, I'v

Re: Python and Javascript equivalence

2007-04-23 Thread Sam the Cat
>> >> I am writing some COM code in Python to control photoshop. Several >> functions of PS require an "Array" argument. In the examples of VBscript >> or javascript the Array type is used. I have tried what would appear to >> be the equivalent in Python -- Lists and Tuples -- but to no avail

Re: Socket exceptions aren't in the standard exception hierarchy

2007-04-23 Thread Steve Holden
John Nagle wrote: [socket.error bug report] >> >> Where did you get this information? If true it would certainly need to >> be logged as a bug, but under Windows on 2,4 I see >> >> >>> issubclass(socket.gaierror, Exception) >> True >> >>> >> >> and the same under Cygwin 2.5. I am presuming most

Establishing socket connections to Synthesis Toolkit

2007-04-23 Thread Mangabasi
Howdy, I would like to use the Synthesis Toolkit for a demo. I downloaded the STK from http://ccrma.stanford.edu/software/stk/index.html. It seems very powerful and user friendly. There are bindings for socket connections and TCL gui examples. I would like to get one of the demo samples work w

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-23 Thread Martin Drautzburg
Peter Otten wrote: def SQL(sql): > ...     print sql > ... a = SQL("module") > module # that one was obvious class A: > ...     b = SQL("class") > ...     def method(self, c=SQL("default arg")): > ...             d = SQL("method") > ... You are my hero. Indeed very cool! -- http:/

Re: Socket exceptions aren't in the standard exception hierarchy

2007-04-23 Thread Daniel Nogradi
> 2. File "D:\Python24\lib\socket.py", line 295, in read > data = self._sock.recv(recv_size) > error: (10054, 'Connection reset by peer') > > >>> That looks like M$ Windows version of UNIX/Linux error number 54 > >>> (pretty much all Windows socket errors are UNIX number+100

Re: Select weirdness

2007-04-23 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Donn Cave <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Ron Garret <[EMAIL PROTECTED]> wrote: > > > The answer is obvious: select is looking only at the underlying socket, > > and not at the rfile buffers. > > > > So... is this a bug in select?

Re: No speedup on multi-processor machine?

2007-04-23 Thread Klaas
On Apr 21, 5:14 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > Additionally, extending IronPython from C# is orders of magnitude > easier than extending CPython from C. Given the existence of Pyrex, that statement is pretty difficult to substantiate. -Mike -- http://mail.python.org/mailman/listinfo

Re: script for seconds in given month?

2007-04-23 Thread edfialk
Alex, very nice. Thank you. Unfortunately, I just found out the platform for using the script will be IronPython, not Python. So, importing calendar in IronPython gives me: SyntaxError: future feature is not defined: with_statement (c: \Python25\Lib\calendar.py, line 8) so, compatibility issue.

Re: Select weirdness

2007-04-23 Thread Klaas
On Apr 23, 9:51 am, Ron Garret <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > > Twisted does this out of the box, for what it's worth. > > Thanks. I will look at that. There is also asyncore in the standard library, which is a ve

Re: Learning Python - First Project

2007-04-23 Thread KDawg44
On Apr 23, 1:44 pm, [EMAIL PROTECTED] wrote: > On Apr 23, 9:52 am, KDawg44 <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I am new to Python and am trying to write a little front end to > > another application in Python. > > > What I want is to have a gui pop up listing some items with several > >

Re: script for seconds in given month?

2007-04-23 Thread Carsten Haese
On Mon, 2007-04-23 at 13:28 -0700, edfialk wrote: > Alex, very nice. That should be good enough for me. > The rest of you as well, thanks for all the help. > > I, unfortunately, failed to realize the actual platform the script is > for is IronPython. When trying to import calendar in IronPython,

Re: script for seconds in given month?

2007-04-23 Thread edfialk
Alex, very nice. That should be good enough for me. The rest of you as well, thanks for all the help. I, unfortunately, failed to realize the actual platform the script is for is IronPython. When trying to import calendar in IronPython, I get: SyntaxError: future feature is not defined: with_st

Re: Launch another application

2007-04-23 Thread Larry Bates
KDawg44 wrote: > Hi, > > I would like to launch another application and pass some arguments to > it from python. WHen the user clicks on the button, i want it to > execute: > > binaryApplication fileName > > Is there a way to do this as if I was doing it from a shell in > python? Would it be u

Re: Socket exceptions aren't in the standard exception hierarchy

2007-04-23 Thread John Nagle
Steve Holden wrote: > John Nagle wrote: > >> Dennis Lee Bieber wrote: >> >>> On Sun, 22 Apr 2007 23:20:25 -0700, John Nagle <[EMAIL PROTECTED]> >>> declaimed the following in comp.lang.python: >>> >>> 2. File "D:\Python24\lib\socket.py", line 295, in read data = self._sock.recv(recv_size

Re: Dictionaries and dot notation

2007-04-23 Thread Bruno Desthuilliers
Martin Drautzburg a écrit : > Daniel Nogradi wrote: > > > What if I want to create a datastructure that can be used in dot notation without having to create a class, i.e. because those objects have no behavior at all? >>> >>>A class inheriting from dict and implementing __getattr__ a

Launch another application

2007-04-23 Thread KDawg44
Hi, I would like to launch another application and pass some arguments to it from python. WHen the user clicks on the button, i want it to execute: binaryApplication fileName Is there a way to do this as if I was doing it from a shell in python? Would it be using something like popen? this ap

Re: Learning Python - First Project

2007-04-23 Thread kyosohma
On Apr 23, 1:44 pm, [EMAIL PROTECTED] wrote: > On Apr 23, 9:52 am, KDawg44 <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I am new to Python and am trying to write a little front end to > > another application in Python. > > > What I want is to have a gui pop up listing some items with several > >

Re: Shebang or Hashbang for modules or not?

2007-04-23 Thread Steven W. Orr
On Monday, Apr 23rd 2007 at 17:31 +0100, quoth Michael Hoffman: =>Steven W. Orr wrote: =>> On Saturday, Apr 21st 2007 at 19:18 +0100, quoth Michael Hoffman: =>> =>> =>Chris Lasher wrote: =>> =>> Should a Python module not intended to be executed have shebang/ =>> =>> hashbang (e.g., "#!/usr/bin/e

Re: Generate report containing pdf or ps figures?

2007-04-23 Thread Grant Edwards
On 2007-04-23, infidel <[EMAIL PROTECTED]> wrote: >> I've looked at ReportLab's documentation, but although it >> appears to be able to use bitmap images (e.g jpeg) it doesn't >> appear to be able to use vector images (EPS/PDF/SVG). >> >> Is there a PDF generation library that can place EPS or >>

Re: Generate report containing pdf or ps figures?

2007-04-23 Thread Grant Edwards
On 2007-04-23, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> I've looked at ReportLab's documentation, but although it >> appears to be able to use bitmap images (e.g jpeg) it doesn't >> appear to be able to use vector images (EPS/PDF/SVG). >> >> Is there a PDF generation library that can place

Re: Generate report containing pdf or ps figures?

2007-04-23 Thread infidel
On Apr 23, 9:30 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > I need to be able to generate a PDF report which consists > mostly of vector images (which I can generate as encapsulated > Postscript, PDF, or SVG). What I need is a way to combine > these figures into a single PDF document. Right no

Re: tftpy 0.41 errors

2007-04-23 Thread Carsten Haese
On Mon, 2007-04-23 at 12:17 -0700, [EMAIL PROTECTED] wrote: > When trying to import the tftpy package, I've gotten the following > error messages: > > Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) > [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 > Type "help", "copyright", "cred

tftpy 0.41 errors

2007-04-23 Thread manhhle
When trying to import the tftpy package, I've gotten the following error messages: Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tftpy Traceback (most

Re: Generate report containing pdf or ps figures?

2007-04-23 Thread half . italian
On Apr 23, 9:30 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > I need to be able to generate a PDF report which consists > mostly of vector images (which I can generate as encapsulated > Postscript, PDF, or SVG). What I need is a way to combine > these figures into a single PDF document. Right no

Re: Generate report containing pdf or ps figures?

2007-04-23 Thread Grant Edwards
On 2007-04-23, Kjell Magne Fauske <[EMAIL PROTECTED]> wrote: >> Is there a PDF generation library that can place EPS or PDF >> figures on a page? > > If you are familiar with LaTeX, an easy solution would be to > automatically generate a LaTeX document that includes your > images. Yea, I've been

Re: Learning Python - First Project

2007-04-23 Thread kyosohma
On Apr 23, 9:52 am, KDawg44 <[EMAIL PROTECTED]> wrote: > Hi, > > I am new to Python and am trying to write a little front end to > another application in Python. > > What I want is to have a gui pop up listing some items with several > buttons. The guts of the program I am not having any trouble w

Re: Socket exceptions aren't in the standard exception hierarchy

2007-04-23 Thread Steve Holden
John Nagle wrote: > Dennis Lee Bieber wrote: >> On Sun, 22 Apr 2007 23:20:25 -0700, John Nagle <[EMAIL PROTECTED]> >> declaimed the following in comp.lang.python: >> >> >>> 2. File "D:\Python24\lib\socket.py", line 295, in read >>> data = self._sock.recv(recv_size) >>> error: (10054, 'Connection re

Re: Learning Python - First Project

2007-04-23 Thread kyosohma
On Apr 23, 9:52 am, KDawg44 <[EMAIL PROTECTED]> wrote: > Hi, > > I am new to Python and am trying to write a little front end to > another application in Python. > > What I want is to have a gui pop up listing some items with several > buttons. The guts of the program I am not having any trouble w

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-23 Thread Neil Cerutti
On 2007-04-23, Steve Holden <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: >> So the question becomes: Why do Python dictionaries require >> keys to be of an immutable type? > > Because otherwise people would expect to be able to use a list > to select a dictionary entry even after they'd modifie

Re: python style guide inconsistencies

2007-04-23 Thread Terry Reedy
"Darren Dale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Then perhaps http://www.python.org/doc/essays/styleguide.html should either | be updated to either agree with or simply link to PEPs 8 and 257. What is | the point of keeping old, out-of-date essays up on python.org? No

Re: Generate report containing pdf or ps figures?

2007-04-23 Thread Kjell Magne Fauske
On Apr 23, 6:30 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > I need to be able to generate a PDF report which consists > mostly of vector images (which I can generate as encapsulated > Postscript, PDF, or SVG). What I need is a way to combine > these figures into a single PDF document. Right no

Re: Shebang or Hashbang for modules or not?

2007-04-23 Thread Steve Holden
Michael Hoffman wrote: > Steven W. Orr wrote: >> On Saturday, Apr 21st 2007 at 19:18 +0100, quoth Michael Hoffman: >> >> =>Chris Lasher wrote: >> =>> Should a Python module not intended to be executed have shebang/ >> =>> hashbang (e.g., "#!/usr/bin/env python") or not? I'm used to having a >> =>>

Re: Python's handling of unicode surrogates

2007-04-23 Thread Ross Ridge
Ross Ridge writes: > The Unicode standard doesn't require that you support surrogates, or > any other kind of character, so no you wouldn't be lying. <[EMAIL PROTECTED]> wrote: > There is the notion of Unicode implementation levels, and each of them > does include a set of characters to support.

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-23 Thread Steve Holden
Neil Cerutti wrote: > On 2007-04-21, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> On Fri, 20 Apr 2007 15:36:00 -0700, [EMAIL PROTECTED] wrote: The article explains that, amongst other things, tuples are faster than lists, so if you are working with constant values (inmutables) they

Re: Socket exceptions aren't in the standard exception hierarchy

2007-04-23 Thread John Nagle
Dennis Lee Bieber wrote: > On Sun, 22 Apr 2007 23:20:25 -0700, John Nagle <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >>2. File "D:\Python24\lib\socket.py", line 295, in read >>data = self._sock.recv(recv_size) >>error: (10054, 'Connection reset by peer') >> > >

Re: Select weirdness

2007-04-23 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Ron Garret <[EMAIL PROTECTED]> wrote: > The answer is obvious: select is looking only at the underlying socket, > and not at the rfile buffers. > > So... is this a bug in select? Or a bug in my code? Yes. I don't see any specific followup to this point, but it

Re: wx.TextCtrl.SetDefaultStyle not working?

2007-04-23 Thread [EMAIL PROTECTED]
> On my platform, styling the text doesn't work for single line > TextCtrl's(which seems kind of stupid), and on Windows I think you are > required to specify wx.TE_RICH2 to style the text. This following > code colors the entered text red for me: That's it! I didn't have the TE_RICH2 option set

Re: pyserial ... timeout on write

2007-04-23 Thread hg
hg wrote: > Hi, > > I notice that pyserial will hang on a write (even with timeout on) if > rts/cts are one. > > Anyway to get around that ? > > Thanks > > hg PS: on windows -- http://mail.python.org/mailman/listinfo/python-list

pyserial ... timeout on write

2007-04-23 Thread hg
Hi, I notice that pyserial will hang on a write (even with timeout on) if rts/cts are one. Anyway to get around that ? Thanks hg -- http://mail.python.org/mailman/listinfo/python-list

Re: Select weirdness

2007-04-23 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > Twisted does this out of the box, for what it's worth. Thanks. I will look at that. rg -- http://mail.python.org/mailman/listinfo/python-list

Re: Redirection problem

2007-04-23 Thread half . italian
On Apr 23, 9:10 am, CSUIDL PROGRAMMEr <[EMAIL PROTECTED]> wrote: > I am new to python. so be patient with me > > I am trying to redirect the output of os.popen command to a file. I > want to append to that file. but instead of appending. The file only > shows last command that was writtenn to it.

Re: Select weirdness

2007-04-23 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 23 Apr 2007 04:33:22 -0300, Ron Garret <[EMAIL PROTECTED]> > escribió: > > > I have not been able to find a proxy server that can proxy to unix > > sockets, so I need to write my own. Conceptually its a v

Re: Redirection problem

2007-04-23 Thread Gabriel Genellina
En Mon, 23 Apr 2007 13:10:55 -0300, CSUIDL PROGRAMMEr <[EMAIL PROTECTED]> escribió: > I am new to python. so be patient with me > > I am trying to redirect the output of os.popen command to a file. I > want to append to that file. but instead of appending. The file only > shows last command that

Re: matplotlib basic question

2007-04-23 Thread Robert Kern
Pete Forman wrote: > Robert Kern <[EMAIL PROTECTED]> writes: > > > Colin J. Williams wrote: >>> I'm not sure that scipy has been updated to Python 2.5 > > ? scipy certainly works with 2.5. Are you referring to something > > else perhaps? > > Yes, the Python Enthought Edition was being discusse

Re: python style guide inconsistencies

2007-04-23 Thread Michael Hoffman
Darren Dale wrote: > Bjoern Schliessmann wrote: > >> Darren Dale wrote: >> >>> I was just searching for some guidance on how to name packages and >>> modules, and discovered some inconsistencies on the >>> www.python.org. http://www.python.org/doc/essays/styleguide.html >>> says "Module names can

Re: Shebang or Hashbang for modules or not?

2007-04-23 Thread Michael Hoffman
Steven W. Orr wrote: > On Saturday, Apr 21st 2007 at 19:18 +0100, quoth Michael Hoffman: > > =>Chris Lasher wrote: > =>> Should a Python module not intended to be executed have shebang/ > =>> hashbang (e.g., "#!/usr/bin/env python") or not? I'm used to having a > =>> shebang in every .py file but

Generate report containing pdf or ps figures?

2007-04-23 Thread Grant Edwards
I need to be able to generate a PDF report which consists mostly of vector images (which I can generate as encapsulated Postscript, PDF, or SVG). What I need is a way to combine these figures into a single PDF document. Right now the reports consist entire of these figures, so I just write the fi

Re: Can __init__ not return an object?

2007-04-23 Thread Kay Schluehr
On Apr 22, 4:36 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > When I go to create an object I want to be able to decide whether the > object is valid or not in __init__, and if not, I want the constructor to > return something other than an object, (like maybe None). I seem to be > having proble

Redirection problem

2007-04-23 Thread CSUIDL PROGRAMMEr
I am new to python. so be patient with me I am trying to redirect the output of os.popen command to a file. I want to append to that file. but instead of appending. The file only shows last command that was writtenn to it. filehandle= open("/root/yhpc-2.0/installer/yhpc-log" ,"a+"); fileh

Python-URL! - weekly Python news and links (Apr 23)

2007-04-23 Thread Cameron Laird
QOTW: "The users." - Ali, answering a question on what's special about Emacs. "Dynamic languages look at WSDL and shrug - another example of the hoops that static typing forces humans to go through." - Gordon Weakliem http://lists.community.tummy.com/pipermail/frpythoneers/2007-April/001342.

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-23 Thread Gabriel Genellina
En Mon, 23 Apr 2007 12:46:13 -0300, Neil Cerutti <[EMAIL PROTECTED]> escribió: > On 2007-04-23, Chris Cioffi <[EMAIL PROTECTED]> wrote: >> On 23 Apr 2007 17:19:15 +0200, Neil Cerutti <[EMAIL PROTECTED]> >> wrote: >>> So the question becomes: Why do Python dictionaries require >>> keys to be of a

numpy migration (also posted to numpy-discussion)

2007-04-23 Thread Duncan Smith
Hello, Since moving to numpy I've had a few problems with my existing code. It basically revolves around the numpy scalar types. e.g. >>> import Numeric as N >>> a = N.array([[0,1],[2,3]]) >>> a array([[0, 1], [2, 3]]) >>> i = a[0,0] >>

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-23 Thread Neil Cerutti
On 2007-04-23, Chris Cioffi <[EMAIL PROTECTED]> wrote: > On 23 Apr 2007 17:19:15 +0200, Neil Cerutti <[EMAIL PROTECTED]> > wrote: >> So the question becomes: Why do Python dictionaries require >> keys to be of an immutable type? > > Dictionary keys are hashed values. If you change the key, you > c

Re: python style guide inconsistencies

2007-04-23 Thread Paddy
On Apr 22, 8:27 pm, Darren Dale <[EMAIL PROTECTED]> wrote: > I was just searching for some guidance on how to name packages and modules, > and discovered some inconsistencies on > thewww.python.org.http://www.python.org/doc/essays/styleguide.htmlsays > "Module names can be > either MixedCase or l

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-23 Thread Chris Cioffi
On 23 Apr 2007 17:19:15 +0200, Neil Cerutti <[EMAIL PROTECTED]> wrote: > So the question becomes: Why do Python dictionaries require keys > to be of an immutable type? Dictionary keys are hashed values. If you change the key, you change the hash and lose the pointer to the referenced object. Or:

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-23 Thread Neil Cerutti
On 2007-04-21, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 20 Apr 2007 15:36:00 -0700, [EMAIL PROTECTED] wrote: >>> The article explains that, amongst other things, tuples are >>> faster than lists, so if you are working with constant values >>> (inmutables) they are more indicated than li

Re: Two syntax questions (newbie)

2007-04-23 Thread Michael Hoffman
Diez B. Roggisch wrote: >> This is already better. Is it possible to define function composition >> as an operator and have something like ([EMAIL PROTECTED]@sorted)(items) >> or (list*reversed*sorted)(items) ? > > Not on functions, but on classes/instances. So something like this might > work for

Re: python style guide inconsistencies

2007-04-23 Thread Darren Dale
Bjoern Schliessmann wrote: > Darren Dale wrote: > >> I was just searching for some guidance on how to name packages and >> modules, and discovered some inconsistencies on the >> www.python.org. http://www.python.org/doc/essays/styleguide.html >> says "Module names can be either MixedCase or lower

Learning Python - First Project

2007-04-23 Thread KDawg44
Hi, I am new to Python and am trying to write a little front end to another application in Python. What I want is to have a gui pop up listing some items with several buttons. The guts of the program I am not having any trouble with but the GUI part I am (or more accurately, the transition betwe

Re: [SQLite] Recommended wrapper?

2007-04-23 Thread Gilles Ganault
On Mon, 23 Apr 2007 16:03:05 +0200, Thomas Krüger <[EMAIL PROTECTED]> wrote: >It's all there: >http://docs.python.org/lib/module-sqlite3.html Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: [re.finditer] Getting all occurences in one go?

2007-04-23 Thread Gilles Ganault
On 22 Apr 2007 15:33:37 -0700, Paul Rubin wrote: > mytable[item] = ','.join(m.group(1) for m in matches) Thanks, that did it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Do other Python GUI toolkits require this?

2007-04-23 Thread Diez B. Roggisch
> I had originally thought that learning PyObjC might preclude me from > having to learn Objective-C, but that seems not to be the case. I have > previously found the same to be true with PyQt and wxPython--not knowing > the toolkits as they are implemented in C++ is a serious handicap. I've > even

RE: Tutorial creates confusion about slices

2007-04-23 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Antoon Pardon > Sent: Monday, April 23, 2007 7:38 AM > To: python-list@python.org > Subject: Tutorial creates confusion about slices > > The following is part of the explanation on slices in the

Re: Can __init__ not return an object?

2007-04-23 Thread Steve Holden
Steven W. Orr wrote: > On Sunday, Apr 22nd 2007 at 21:01 -0400, quoth Steve Holden: [let's keep it on the list so everything gets indexed] > =>Steven W. Orr wrote: > =>> When I go to create an object I want to be able to decide whether the > =>> object is valid or not in __init__, and if not, I wa

Re: Tutorial creates confusion about slices

2007-04-23 Thread Michael Bentley
On Apr 23, 2007, at 7:38 AM, Antoon Pardon wrote: > The following is part of the explanation on slices in the > tutorial: > > The best way to remember how slices work is to think of the indices as > pointing between characters, with the left edge of the first character > numbered 0. Then the righ

Re: [SQLite] Recommended wrapper?

2007-04-23 Thread Thomas Krüger
It's all there: http://docs.python.org/lib/module-sqlite3.html Thomas -- sinature: http://nospam.nowire.org/signature_usenet.png -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >