Python tutorials

2007-05-29 Thread Laurentiu
Hello! i was searching the net for some python video tutorials (free and payed). i found some interesting stuff at www.showmedo.com but i want something more complex. can someone give me some address for python video tutorials or companies how made this tutorials, free or payed. i search at Ly

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Martin v. Lo
> yes, it could print to the terminal(cmd.exe), but when I write these > string to file. I got the follow error: > > File "E:\Tools\filegen\filegen.py", line 212, in write > self.file.write(data) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u0394' in > position 0 > : ordinal

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread 人言落日是天涯,望极天涯不见家
On 5月29日, 下午3时05分, "Martin v. Lo"wis" <[EMAIL PROTECTED]> wrote: > > yes, it could print to the terminal(cmd.exe), but when I write these > > string to file. I got the follow error: > > > File "E:\Tools\filegen\filegen.py", line 212, in write > > self.file.write(data) > > UnicodeEncodeError:

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread BJörn Lindqvist
On 5/29/07, Eric S. Johansson <[EMAIL PROTECTED]> wrote: > A huge reason why this is important because the vast majority of software > developers who are injured fall off the economic ladder. They leave the > profession and had very few options for work that doesn't involve significant > handy is.

Re: DbiDate object

2007-05-29 Thread revuesbio
On 29 mai, 07:22, Frank Millman <[EMAIL PROTECTED]> wrote: > On May 29, 12:51 am, revuesbio <[EMAIL PROTECTED]> wrote: > > > > > Hi all > > > I am using odbc to connect to Microsoft Access DB. When I send a > > request with a datetime column from the database, odbc returns > > something called a D

Re: Python tutorials

2007-05-29 Thread Stefano Canepa
On 29 Mag, 09:08, Laurentiu <[EMAIL PROTECTED]> wrote: > Hello! > > i was searching the net for some python video > tutorials (free and payed). > > i found some interesting stuff atwww.showmedo.combut > i want something more complex. > > can someone give me some address for python video > tutorials

Re: Sci.linalg.lu permuation error

2007-05-29 Thread [EMAIL PROTECTED]
Hi Luke, you should send this to the scipy user list: [EMAIL PROTECTED] Bernhard On May 28, 10:44 am, Luke <[EMAIL PROTECTED]> wrote: > I'm trying to use Scipy's LU factorization. Here is what I've got: > > from numpy import * > import scipy as Sci > import scipy.linalg > > A=array([[3., -2.,

multiline regular expression (replace)

2007-05-29 Thread Zdenek Maxa
Hi all, I would like to perform regular expression replace (e.g. removing everything from within tags in a XML file) with multiple-line pattern. How can I do this? where = open("filename").read() multilinePattern = "^ <\/tag>$" re.search(multilinePattern, where, re.MULTILINE) Thanks great

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-05-29 Thread Ulf Wiger
> "Jon" == Jon Harrop <[EMAIL PROTECTED]> writes: Jon> Anyway, are there any libraries to do hardware accelerated Jon> vector graphics in Perl, Python, Lisp, Java or any functional Jon> language (except OCaml and F# and excluding WPF and Jon> Silverlight)? I guess the OpenGL binding f

Re: ten small Python programs

2007-05-29 Thread stef
> >> Secondly, Python is nowadays not only used by >> programmers, >> but also by e.g. Scientific users (former MatLab >> users), >> who are not interested in the code itself, >> but just in the results of that particular code. >> For these people a lot of example programs, >> for which they ca

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Steve Howell
--- Carsten Haese <[EMAIL PROTECTED]> wrote: > On Sun, 2007-05-27 at 07:30 +, OKB (not > okblacke) wrote: > > Underscores are harder to type than any > alphanumeric character. > > This is a discussion about underscores versus > capital letters denoting > the word boundaries in

Video tutorials

2007-05-29 Thread Laurentiu
Hello! i was searching the net for some video tutorials (free and payed). i found some interesting stuff at www.showmedo.com but i want something more complex. can someone give me some address for video tutorials or companies how made this tutorials, free or payed. i search at Lynda.com and vtc

Re: multiline regular expression (replace)

2007-05-29 Thread half . italian
On May 29, 2:03 am, Zdenek Maxa <[EMAIL PROTECTED]> wrote: > Hi all, > > I would like to perform regular expression replace (e.g. removing > everything from within tags in a XML file) with multiple-line pattern. > How can I do this? > > where = open("filename").read() > multilinePattern = "^ <

Re: itertools.groupby

2007-05-29 Thread Raymond Hettinger
On May 28, 8:02 pm, Gordon Airporte <[EMAIL PROTECTED]> wrote: > "Each" seems to imply uniqueness here. Doh! This sort of micro-massaging the docs misses the big picture. If "each" meant unique across the entire input stream, then how the heck could the function work without reading in the entire

Re: Periodic tasks.

2007-05-29 Thread Ben Finney
Ramashish Baranwal <[EMAIL PROTECTED]> writes: > I am trying to execute some tasks periodically, those familiar with > unix can think of it as equivalent to cron jobs. Can you not use cron? If not, why not? Is there an equivalent service you can use? > I have tried looking around, but couldn't f

Re: gui application on cross platform

2007-05-29 Thread Stefano Canepa
On 28 Mag, 09:28, james_027 <[EMAIL PROTECTED]> wrote: > On May 28, 3:06 pm, Stefano Canepa <[EMAIL PROTECTED]> wrote: > > > > > On 28 Mag, 08:01, james_027 <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I am using delphi to develop gui application, and wish to make a shift > > > to python. here ar

Re: Periodic tasks.

2007-05-29 Thread Steve Howell
--- Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to execute some tasks periodically, > those familiar with > unix can think of it as equivalent to cron jobs. I > have tried looking > around, but couldn't find a way. Would appreciate > any pointers or > clues.. > I'm also

Re: Periodic tasks.

2007-05-29 Thread Ramashish Baranwal
> > I am trying to execute some tasks periodically, those familiar with > > unix can think of it as equivalent to cron jobs. > > Can you not use cron? If not, why not? Is there an equivalent service > you can use? I can, but the work I want to do is written in Python. This is not an issue but I wo

PyQt: Is signal / slot really working across threads?

2007-05-29 Thread Alexander Eisenhuth
Hello pyqt users, i tried to use signal / slot across threads. With the following example I want to emit a signal when the thread loop is entered. The connected slot is never called. Why? Any help is very welcome ... Alexander import time import sys import PyQt4 from PyQt4.QtCore import (QOb

Re: PyQt: Is signal / slot really working across threads?

2007-05-29 Thread Phil Thompson
On Tuesday 29 May 2007 11:58 am, Alexander Eisenhuth wrote: > Hello pyqt users, > > i tried to use signal / slot across threads. With the following example I > want to emit a signal when the thread loop is entered. The connected slot > is never called. Why? > > Any help is very welcome ... > > Ale

Re: Periodic tasks.

2007-05-29 Thread Steve Holden
Ben Finney wrote: > Ramashish Baranwal <[EMAIL PROTECTED]> writes: > >> I am trying to execute some tasks periodically, those familiar with >> unix can think of it as equivalent to cron jobs. > > Can you not use cron? If not, why not? Is there an equivalent service > you can use? > >> I have tri

Re: multiline regular expression (replace)

2007-05-29 Thread Zdenek Maxa
[EMAIL PROTECTED] wrote: > On May 29, 2:03 am, Zdenek Maxa <[EMAIL PROTECTED]> wrote: > >> Hi all, >> >> I would like to perform regular expression replace (e.g. removing >> everything from within tags in a XML file) with multiple-line pattern. >> How can I do this? >> >> where = open("filename"

Re: Resize image NO PIL!!

2007-05-29 Thread cbmeeks
Nope. They don't support that either. I emailed them (again) asking for these features or at least see if they are in the works sometime in the future and I keep getting their standard response which is basically "you can do it yourself if you upgrade to our $249/mo dedicated plan". I'd go with

override PyBitmapDataObject

2007-05-29 Thread Ashok
hi, I am new to python and am trying my experimenting with python and wxpython. I want to use wx.PyBitmapDataObject to get bitmap data form clipboard. The wx documentation says that 'to be able to provide bitmap data on demand, derive from this class and overload GetBitmap'. How do i overload GetBi

Re: PyQt: Is signal / slot really working across threads?

2007-05-29 Thread Alexander Eisenhuth
Ok, thanks. Phil Thompson schrieb: > On Tuesday 29 May 2007 11:58 am, Alexander Eisenhuth wrote: >> Hello pyqt users, >> >> i tried to use signal / slot across threads. With the following example I >> want to emit a signal when the thread loop is entered. The connected slot >> is never called. Wh

Re: multiline regular expression (replace)

2007-05-29 Thread Steve Holden
Zdenek Maxa wrote: > [EMAIL PROTECTED] wrote: >> On May 29, 2:03 am, Zdenek Maxa <[EMAIL PROTECTED]> wrote: >> >>> Hi all, >>> >>> I would like to perform regular expression replace (e.g. removing >>> everything from within tags in a XML file) with multiple-line pattern. >>> How can I do this? >

Re: multiline regular expression (replace)

2007-05-29 Thread vbr
> Od: Zdenek Maxa <[EMAIL PROTECTED]> > Předmět: Re: multiline regular expression (replace) > Datum: 29.5.2007 13:46:32 > > [EMAIL PROTECTED] wrote: > > On May 29, 2:03 am, Zdenek Maxa <[EMAIL PROTECTED]> wrote: > > > >> Hi all, > >> > >> I would like to

Re: itertools.groupby

2007-05-29 Thread Carsten Haese
On Mon, 2007-05-28 at 23:34 -0700, Raymond Hettinger wrote: > On May 28, 8:36 pm, "Carsten Haese" <[EMAIL PROTECTED]> wrote: > > And while > > we're at it, it probably should be keyfunc(value), not key(value). > > No dice. The itertools.groupby() function is typically used > in conjunction with s

Re: Video tutorials

2007-05-29 Thread Needless
How much more complex? On May 28, 1:20 am, Laurentiu <[EMAIL PROTECTED]> wrote: > Hello! > > i was searching the net for some video tutorials (free > and payed). > > i found some interesting stuff atwww.showmedo.combut > i want something more complex. > > can someone give me some address for video

python unix install, sqlite3

2007-05-29 Thread Simon
I installed the source code on unix for python 2.5.1. The install went mainly okay, except for some failures regarding: _ssl, _hashlib, _curses, _curses_panel. No errors regarding sqlite3. However, when I start python and do an import sqlite3 I get: /ptmp/bin/> python Python 2.5.1 (r251:54863, Ma

Re: stdout and threads

2007-05-29 Thread kyosohma
On May 28, 4:54 am, "Troels Thomsen" wrote: > Hello All > > I have trouble printing to stdout from a thread and main program. > > Not only will it look strange when they try to print at the same time, that > is ok, but i think i see lock-ups. (strange exceptions in Tkinker etc) Or is > it an issue

vector graphics bindings, was Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-05-29 Thread Tony Finch
Jon Harrop <[EMAIL PROTECTED]> wrote: > >Anyway, are there any libraries to do hardware accelerated vector graphics >in Perl, Python, Lisp, Java or any functional language (except OCaml and F# >and excluding WPF and Silverlight)? http://www.cairographics.org/bindings/ That covers all the languages

wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
If there is a wxPython on Debian user in the house? I am using the version of the demo that came with the apt-get download of wxPython. I thought I'd followed the instructions for installing and unpacking the wxPython demo program. It appears to run after a fashion, but I also get this at the comm

Re: Storing tracebacks

2007-05-29 Thread kyosohma
On May 28, 10:46 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > I'm reading the docs on sys.exc_info() but I can't tell for sure > whether I'm using it safely to get a snapshot of an exception and > reraise it later. The use case is a class which acts like a deferred > callable, a callable that wil

Re: wxpython demo error on debian etch

2007-05-29 Thread kyosohma
On May 29, 8:38 am, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > If there is a wxPython on Debian user in the house? I am using the > version of the demo that came with the apt-get download of wxPython. > > I thought I'd followed the instructions for installing and unpacking > the wxPython demo p

Re: Periodic tasks.

2007-05-29 Thread vasudevram
On May 29, 4:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Alternatively, the user could make use of the already-existing "sched" > module from the standard library. With a little threading that would do > the job fine. > > regards > Steve > -- > Steve Holden+1 571 484 6266 +1 800 4

Re: multiline regular expression (replace)

2007-05-29 Thread Gerard Flanagan
On May 29, 11:03 am, Zdenek Maxa <[EMAIL PROTECTED]> wrote: > Hi all, > > I would like to perform regular expression replace (e.g. removing > everything from within tags in a XML file) with multiple-line pattern. > How can I do this? > > where = open("filename").read() > multilinePattern = "^

Re: Circular imports

2007-05-29 Thread jim-on-linux
On Tuesday 29 May 2007 00:08, Carsten Haese wrote: > On Mon, 28 May 2007 23:46:00 -0400, Ron Provost > wrote > > > [...] python is not happy about my circular > > imports [...] > > A circular import is not a problem in itself. > I'm guessing you're running into a situation > like this: > > Module A

Re: python unix install, sqlite3

2007-05-29 Thread vasudevram
On May 29, 5:52 pm, Simon <[EMAIL PROTECTED]> wrote: > I installed the source code on unix for python 2.5.1. The install went > mainly okay, except for some failures regarding: > _ssl, _hashlib, _curses, _curses_panel. > > No errors regarding sqlite3. > However, when I start python and do an import

Re: python unix install, sqlite3

2007-05-29 Thread jim-on-linux
On Tuesday 29 May 2007 08:52, Simon wrote: > I installed the source code on unix for python > 2.5.1. The install went mainly okay, except for > some failures regarding: _ssl, _hashlib, > _curses, _curses_panel. > > No errors regarding sqlite3. > However, when I start python and do an import > sqlit

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Maric Michaud
Steve Howell a écrit : > --- Carsten Haese <[EMAIL PROTECTED]> wrote: > >> On Sun, 2007-05-27 at 07:30 +, OKB (not >> okblacke) wrote: >>> Underscores are harder to type than any >> alphanumeric character. >> >> This is a discussion about underscores versus >> capital letters d

[B,IX] = sort(A,...) - Order for sort()-function

2007-05-29 Thread Orlando Döhring
Dear community, I want to use the sort function to sort a (nested) list. General information can be found below. http://www.python.org/doc/2.4.2/lib/typesseq-mutable.html http://wiki.python.org/moin/HowTo/Sorting http://www.python.org/doc/2.4.4/whatsnew/node12.html I want to solve the following

ANNOUNCE: SCons 0.97 has been released

2007-05-29 Thread Steven Knight
SCons is a software construction tool (build tool, or make tool) written in Python. It is based on the design which won the Software Carpentry build tool competition in August 2000. Version 0.97 of SCons has been released and is available for download from the SCons web site: http://www

Re: Resize image NO PIL!!

2007-05-29 Thread Daniel Nogradi
> I have created an image hosting site and when a user uploads an image, > I want a service to run on the server to create a few thumbnails while > the user does other things. > > My stupid host (pair.com) doesn't have PIL installed and I'm too much > of a stupid newbie to figure out how to get it

RSA SecurID token authentication?

2007-05-29 Thread Chris Shenton
Anyone doing python application authentication using RSA SecurID tokens? We have a Pylons app that needs this. I've written code against RSA's API and found the docs terrible and the libraries painful to use. RSA has a RADIUS server fronting their server so I expect I could use that instead,

[B,IX] = sort(A,...) - Order for sort()-function

2007-05-29 Thread Orlando Döhring
Dear community, I want to use the sort function to sort a (nested) list. General information can be found below. http://www.python.org/doc/2.4.2/lib/typesseq-mutable.html http://wiki.python.org/moin/HowTo/Sorting http://www.python.org/doc/2.4.4/whatsnew/node12.html I want to solve the follow

Re: [B,IX] = sort(A,...) - Order for sort()-function

2007-05-29 Thread Maric Michaud
Orlando Döhring a écrit : > ... > A = [ 3 7 5 > 0 4 2 ]; > > # in Python: A = [[3,7,5],[0,4,2]] > > [B,IX] = sort(A,2) > > # sort by rows > > B = > 3 5 7 > 0 2 4 > > IX = > 1 3 2 > 1 3 2 > > # first line: 3 was formerly in the fi

ANN: eGenix mxODBC 3.0 Developer Licenses (mxODBC Database Interface)

2007-05-29 Thread eGenix Team: M.-A. Lemburg
eGenix.com mxODBC 3.0 Developer Licenses Available eGenix is pleased to announce the immediate availability of developer licenses for our P

Re: Seeking author of script which generated HTML pages from pictures of them

2007-05-29 Thread metaperl
I found him! http://programming.reddit.com/info/k9dx/comments -- http://mail.python.org/mailman/listinfo/python-list

RE: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Warren Stringer
Hi Eric, You make a compelling argument for underscores. I sometimes help a visually impaired friend with setting up his computers. I'm wondering about the aural output to you second example: link.set_parse_action(emit_link_HTML) Does it sound like this: link dot set under parse under action

RE: Using python for a CAD program

2007-05-29 Thread George, Harry G
I haven't followed up. When I last looked, I found the problem space is too large for one person (or project) to do it all. So the job is to glue together lots of good OSS tools -- which is a very pythonic task. The absolute requirement for Knowledge-Based-Engineering is an API which allows a sc

Unicode to HTML entities

2007-05-29 Thread Clodoaldo
I was looking for a function to transform a unicode string into htmlentities. Not only the usual html escaping thing but all characters. As I didn't find I wrote my own: # -*- coding: utf-8 -*- from htmlentitydefs import codepoint2name def unicode2htmlentities(u): htmlentities = list() f

How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
Hi I wonder if you can set what subclass a class should have at instance creation. The problem is that I have something like: class CoreLang(): def AssignVar(self, var, value): pass class Lang1(CoreLang): def AssignVar(self, var, value): return var, "=", value class

Re: Unicode to HTML entities

2007-05-29 Thread Richard Brodie
"Clodoaldo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I was looking for a function to transform a unicode string into >htmlentities. >>> u'São Paulo'.encode('ascii', 'xmlcharrefreplace') 'São Paulo' -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode to HTML entities

2007-05-29 Thread Clodoaldo
On May 29, 12:57 pm, "Richard Brodie" <[EMAIL PROTECTED]> wrote: > "Clodoaldo" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > >I was looking for a function to transform a unicode string into > >htmlentities. > >>> u'São Paulo'.encode('ascii', 'xmlcharrefreplace') > > 'São Paulo

Scope - import and globals

2007-05-29 Thread HMS Surprise
In the file snippet below the value for the global hostName is determined at runtime. Functions imported from the parent baseClass file such as logon also need access to this variable but cannot see it the with the implementation I have attempted here. Also, functions in this file and in the imp

Re: Scope - import and globals

2007-05-29 Thread Troels Thomsen
"HMS Surprise" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] > > In the file snippet below the value for the global hostName is > determined at runtime. Functions imported from the parent baseClass > file such as logon also need access to this variable but cannot see it > the

Re: Storing tracebacks

2007-05-29 Thread George Sakkis
On May 29, 9:46 am, [EMAIL PROTECTED] wrote: > On May 28, 10:46 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > I'm reading the docs on sys.exc_info() but I can't tell for sure > > whether I'm using it safely to get a snapshot of an exception and > > reraise it later. The use case is a class

SMTPAuthenticationError

2007-05-29 Thread Ramashish Baranwal
Hi, I am trying to send a mail using smtplib. My server requires me to authenticate, for this I'm using SMTP.login function. However it fails- >>> server = smtplib.SMTP(host='mail.domain', port=25) >>> server.login('username', 'password') Traceback (most recent call last): File "", line 1, in ?

Tkinter Listbox - Different Text colors in one listbox

2007-05-29 Thread rahulnag22
Hi, Is it possible to have different items in a listbox in different colors? Or is it just one color for all items in a listbox? Thanks Rahul -- http://mail.python.org/mailman/listinfo/python-list

Re: SMTPAuthenticationError

2007-05-29 Thread Larry Bates
Ramashish Baranwal wrote: > Hi, > > I am trying to send a mail using smtplib. My server requires me to > authenticate, for this I'm using SMTP.login function. However it > fails- > server = smtplib.SMTP(host='mail.domain', port=25) server.login('username', 'password') > Traceback (most

Re: Storing tracebacks

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 13:51:09 -0300, George Sakkis <[EMAIL PROTECTED]> escribió: > The traceback module is handy if you want a text representation of the > traceback, not the actual traceback. The reason I want to store the > actual traceback is to make the exception transparent to the user, > i.

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Ramashish Baranwal
On May 29, 8:52 pm, glomde <[EMAIL PROTECTED]> wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): >

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread [EMAIL PROTECTED]
Why not just have Lang1 and Lang2 inherit from WriteStruct as well? On May 29, 8:52 am, glomde <[EMAIL PROTECTED]> wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 04:24:15 -0300, 人言落日是天涯,望极天涯不见家 <[EMAIL PROTECTED]> escribió: > On 5月29日, 下午3时05分, "Martin v. Lo"wis" <[EMAIL PROTECTED]> wrote: >> > yes, it could print to the terminal(cmd.exe), but when I write these >> > string to file. I got the follow error: >> >> > File "E:\Tools\fi

Re: wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
On May 29, 8:51 am, [EMAIL PROTECTED] wrote: > The wxPython > website details how to get the latest version of wxPython (2.8.4) I'm fairly new to Linux, so I probably shouldn't mess with my stable Etch. I'll make do with this version of wxPython or go back to puzzling over Tkinter. Thanks, ric

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
On 29 Maj, 19:27, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Why not just have Lang1 and Lang2 inherit from WriteStruct as well? This wont work I think since if add antoher Class: class WriteStruct(): def func1(self); print "Hello2" def Generate(self): self.func1() class

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
On 29 Maj, 19:20, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > On May 29, 8:52 pm, glomde <[EMAIL PROTECTED]> wrote: > > > > > Hi I wonder if you can set what subclass a class should > > have at instance creation. > > > The problem is that I have something like: > > > class CoreLang(): > > d

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Ramashish Baranwal
On May 29, 8:52 pm, glomde <[EMAIL PROTECTED]> wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): >

Re: multiline regular expression (replace)

2007-05-29 Thread Holger Berger
Hi, yes: import re a=""" I Am Multiline but short anyhow""" b="(I[\s\S]*line)" print re.search(b, a,re.MULTILINE).group(1) gives I Am Multiline Be aware that . matches NO newlines!!! May be this caused your problems? regards Holger Zdenek Maxa wrote: > [EMAIL PROTECTED] wrote:

embeded python progam into visual C++ application crash

2007-05-29 Thread fabien.lyon
hello, The C++ application uses a python module which wraps commands set for CVS management: checkout, checkin and tag. We used python2.5.1 and Visual C++ 6.0 The problem we get is: After a good import and definition of python functions we have a random unhandled exception (from python25.dll) when

Re: wxpython demo error on debian etch

2007-05-29 Thread kyosohma
On May 29, 12:33 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > On May 29, 8:51 am, [EMAIL PROTECTED] wrote: > > > The wxPython > > website details how to get the latest version of wxPython (2.8.4) > > I'm fairly new to Linux, so I probably shouldn't mess with my stable > Etch. > > I'll make do

Re: Storing tracebacks

2007-05-29 Thread George Sakkis
On May 29, 1:21 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 29 May 2007 13:51:09 -0300, George Sakkis > <[EMAIL PROTECTED]> escribió: > > > The traceback module is handy if you want a text representation of the > > traceback, not the actual traceback. The reason I want to store the

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-29 Thread kyosohma
On May 29, 12:02 pm, [EMAIL PROTECTED] wrote: > Hi, > Is it possible to have different items in a listbox in different > colors? Or is it just one color for all items in a listbox? > Thanks > Rahul Looks like it has to be the same color and font: http://www.pythonware.com/library/tkinter/introduct

Re: 0 == False but [] != False?

2007-05-29 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > > Anyone who finds this surprising, might enjoy reading this > > article from the time several years ago when the feature > > was being considered. When you have some time - it's long, > > but int

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Ragnar Ouchterlony
tis 2007-05-29 klockan 09:05 +0200 skrev "Martin v. Lo"wis": > Yes, when writing to a file, you need to define an encoding, e.g. > > self.file.write(data.encode("utf-8")) > > You can use codecs.open() instead of open(), > so that you can just use self.file.write(data) If I for some reason can't

Connection acception with confirmation

2007-05-29 Thread no`name`
Hi, i'm new in Python and i'm trying to write some server which can confirm connection from client. Here is a part of code: import sys import threading from socket import * class TelGUI(threading.Thread): def __init__(self): threading.Thread.__init__(self) def ru

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Stargaming
glomde schrieb: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): > def AssignVar(self, var, value): >

Re: 0 == False but [] != False?

2007-05-29 Thread Erik Max Francis
Donn Cave wrote: > Not that it is of no historical interest to review all these > reasonable arguments, but allow me to restore the context quote > from my follow-up: If the counterpoints are of no historical interest, then the original point must be of no historical interest either, since it wa

Re: python unix install, sqlite3

2007-05-29 Thread Simon
On May 29, 7:05 am, vasudevram <[EMAIL PROTECTED]> wrote: > On May 29, 5:52 pm, Simon <[EMAIL PROTECTED]> wrote: > > > > > > > I installed the source code on unix for python 2.5.1. The install went > > mainly okay, except for some failures regarding: > > _ssl, _hashlib, _curses, _curses_panel. > >

Re: wxpython demo error on debian etch

2007-05-29 Thread BartlebyScrivener
On May 29, 1:09 pm, [EMAIL PROTECTED] wrote: > The newer versions of wxPython won't make your Debian crash or > anything. Thanks, mike, i'll try it. rick -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing tracebacks

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 15:13:33 -0300, George Sakkis <[EMAIL PROTECTED]> escribió: > On May 29, 1:21 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> A traceback contains a linked list of frames, each with its own globals >> and locals and lot of context info. >> I'm not sure that moving a t

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 15:16:52 -0300, Ragnar Ouchterlony <[EMAIL PROTECTED]> escribió: > If I for some reason can't open the object myself or needs encoding on > other file-like objects, I think the following wrapper function is of > use (it essentially does what codecs.open() does but takes a fil

Re: Connection acception with confirmation

2007-05-29 Thread Rob Williscroft
no`name` wrote in news:[EMAIL PROTECTED] in comp.lang.python: > maybe someone have some ideas how to block first stdin in main > function and get stdin from the thread when here is a new connection? > No, but you could instead use a Queue: http://docs.python.org/lib/module-Queue.html

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Eric S. Johansson
Warren Stringer wrote: > Hi Eric, > > You make a compelling argument for underscores. I sometimes help a visually > impaired friend with setting up his computers. > > I'm wondering about the aural output to you second example: > > link.set_parse_action(emit_link_HTML) > > Does it sound like th

Speex bindings for python 2.5

2007-05-29 Thread JarodEvans
Hello, For a personal project, I need to use speex with Python on Win32, but pyspeex is compiled for python 2.2. Could somebody try to compile pyspeex for python 2.5 please ? Thanx a lot for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: Speex bindings for python 2.5

2007-05-29 Thread JarodEvans
On 29 mai, 21:28, [EMAIL PROTECTED] wrote: > Hello, > > For a personal project, I need to use speex with Python on Win32, but > pyspeex is compiled for python 2.2. > > Could somebody try to compile pyspeex for python 2.5 please ? > > Thanx a lot for your help. I forgot to give the url : http://www

Re: SMTPAuthenticationError

2007-05-29 Thread Ramashish Baranwal
> > > I am trying to send a mail using smtplib. My server requires me to > > authenticate, for this I'm using SMTP.login function. However it > > fails- > > server = smtplib.SMTP(host='mail.domain', port=25) > server.login('username', 'password') > > Traceback (most recent call last): > >

Re: 0 == False but [] != False?

2007-05-29 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > > Not that it is of no historical interest to review all these > > reasonable arguments, but allow me to restore the context quote > > from my follow-up: > > If the counterpoints are of no histori

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread Steve Holden
glomde wrote: > Hi I wonder if you can set what subclass a class should > have at instance creation. > > The problem is that I have something like: > > class CoreLang(): > def AssignVar(self, var, value): > pass > > class Lang1(CoreLang): > def AssignVar(self, var, value): >

Re: embeded python progam into visual C++ application crash

2007-05-29 Thread Gabriel Genellina
En Tue, 29 May 2007 15:01:07 -0300, fabien.lyon <[EMAIL PROTECTED]> escribió: > hello, > The C++ application uses a python module which wraps commands set for CVS > management: > checkout, checkin and tag. > We used python2.5.1 and Visual C++ 6.0 2.5.1 is compiled with Visual Studio 2005 - I ho

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Ragnar Ouchterlony
tis 2007-05-29 klockan 16:08 -0300 skrev Gabriel Genellina: > sys.stdout = filewrapper(sys.stdout, 'utf-8') > print u"åäö \N{GREEK CAPITAL LETTER DELTA}" > > > > Useful if you don't want to append .encode() to everything you print out > > that potentially can contain non-ascii letters. >

Re: How to set a class inheritance at instance creation?

2007-05-29 Thread glomde
On 29 Maj, 22:45, Steve Holden <[EMAIL PROTECTED]> wrote: > glomde wrote: > > Hi I wonder if you can set what subclass a class should > > have at instance creation. > > > The problem is that I have something like: > > > class CoreLang(): > > def AssignVar(self, var, value): > > pass >

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread [EMAIL PROTECTED]
On May 29, 3:22 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote: > Warren Stringer wrote: > > Hi Eric, > > > You make a compelling argument for underscores. I sometimes help a visually > > impaired friend with setting up his computers. > > > I'm wondering about the aural output to you second exam

Malformed big5 reading bug

2007-05-29 Thread tsuraan
Python enters some sort of infinite loop when attempting to read data from a malformed file that is big5 encoded (using the codecs library). This behaviour can be observed under Linux and FreeBSD, using Python 2.4 and 2.5. A really simple example illustrating the bug follows: Python 2.4.4 (#1, M

Open Source Developers' Conference 2007 - Brisbane - Call for Papers

2007-05-29 Thread Richard Jones
Call for Papers --- Open Source Developers' Conference 2007 - Brisbane, Australia "Success in Development & Business" OSDC is a grass-roots conference providing Open Source developers with an opportunity to meet, share, learn, and of course show-off. OSDC focuses on Open Source develo

Re: Periodic tasks.

2007-05-29 Thread Steve Howell
--- vasudevram <[EMAIL PROTECTED]> wrote: > On May 29, 4:39 pm, Steve Holden > <[EMAIL PROTECTED]> wrote: > > > Alternatively, the user could make use of the > already-existing "sched" > > module from the standard library. With a little > threading that would do > > the job fine. > > Yes. Also,

Re: itertools.groupby

2007-05-29 Thread Steve Howell
--- Carsten Haese <[EMAIL PROTECTED]> wrote: > As an aside, while groupby() will indeed often be > used in conjunction > with sorted(), there is a significant class of use > cases where that's > not the case: I use groupby to produce grouped > reports from the results > of an SQL query. In such ca

Re: Why isn't this query working in python?

2007-05-29 Thread erikcw
On May 28, 2:47 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 28 May 2007 14:53:57 -0300, Dennis Lee Bieber > <[EMAIL PROTECTED]> escribió: > > > On Sun, 27 May 2007 20:35:28 -0400, Carsten Haese <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > >> On Sun, 2007

setting environment from shell file in python

2007-05-29 Thread George Trojan
Is there a utility to parse a Bourne shell environment file, such as .bashrc, and set the environmental variables from within a Python script? What I mean is an equivalent to shell dot command. I don't think it would be too difficult to write a shell parser, but if such thing already exists...

  1   2   >