Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread geremy condra
On Thu, Dec 17, 2009 at 2:25 AM, Mensanator wrote: > On Dec 16, 8:45�pm, Ned Deily wrote: >> In article >> <88bab2c0-d27c-4081-a703-26b353b9e...@9g2000yqa.googlegroups.com>, >> >> �Mensanator wrote: >> > Oh, and about Chapter 1. >> >> > If you're going to use version 3.1.1 as your standard, shou

Re: Can't Iterate

2009-12-16 Thread Chris Rebert
On Wed, Dec 16, 2009 at 11:26 PM, Victor Subervi wrote: > Hi; > I have this line of code: > > for store in ourStores(): > > which is called from the statement: > > from particulars import ourStores > > The latter file has the following: > > def ourStores(): >   return ['prescriptions', 'products']

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 16, 8:45�pm, Ned Deily wrote: > In article > <88bab2c0-d27c-4081-a703-26b353b9e...@9g2000yqa.googlegroups.com>, > > �Mensanator wrote: > > Oh, and about Chapter 1. > > > If you're going to use version 3.1.1 as your standard, shouldn't > > you also point out that 3.1.1 is NOT bundled with M

Can't Iterate

2009-12-16 Thread Victor Subervi
Hi; I have this line of code: for store in ourStores(): which is called from the statement: from particulars import ourStores The latter file has the following: def ourStores(): return ['prescriptions', 'products'] Yet, the above iteration only iterates the last of these items ('products').

Re: Print Options of optparse

2009-12-16 Thread Steven D'Aprano
On Wed, 16 Dec 2009 23:10:26 -0800, Enchanter wrote: > I am learning Python and uising optparse to handle command-line options. > But I am not sure who to print the options' content below: > > . > > options, args = parser.parse_args() Is there a reason why print options doesn't do what

Re: pyZui - anyone know about this?

2009-12-16 Thread Donn
On Wednesday 16 December 2009 07:03:19 David Roberts wrote: > It involves scaling an image to various resolutions, and partitioning > them into fixed-size tiles. It's roughly the same technique used by > Google Maps/Earth. Thanks. That gives me something to go on. Wikipedia didn't like my search t

Re: How to create a self-destructing Tkinter dialog box?

2009-12-16 Thread Martin P. Hellwig
mrstevegross wrote: Ok, I would like to put together a Python/Tkinter dialog box that displays a simple message and self-destructs after N seconds. Is there a simple way to do this? Thanks, --Steve Just, thinking aloud, I probably would do something like registering the [place|grid|pack]_for

Re: Either IDLE Can't Start a subprocess or a firewall software firewall is blocking the connection (Win)--Battlin McAfee

2009-12-16 Thread Alf P. Steinbach
* W. eWatson: See Subject msg from Python 2.5 Win XP. It is preceded by a "Socket Error". It happened while I had a simple program displayed, and I wanted to see the shell. The msg occurred when I pressed Shell on Run from the menu. I played around for awhile, but got nowhere. Same msg. I did

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Richard Heathfield
In , Alf P. Steinbach wrote: > * Mensanator: >> On Dec 16, 5:45 pm, "Alf P. Steinbach" wrote: >>> Learn to read. >>> >>> At the top of every second page it tells you that this is an >>> introduction based on Windows. >> >> Still, no excuse for giving out mis-information. It's just as easy >>

Re: Either IDLE Can't Start a subprocess or a firewall software firewall is blocking the connection (Win)--Battlin McAfee

2009-12-16 Thread Terry Reedy
On 12/16/2009 9:31 PM, W. eWatson wrote: See Subject msg from Python 2.5 Win XP. It is preceded by a "Socket Error". It happened while I had a simple program displayed, and I wanted to see the shell. The msg occurred when I pressed Shell on Run from the menu. I played around for awhile, but got n

Re: pyZui - anyone know about this?

2009-12-16 Thread Donn
On Wednesday 16 December 2009 09:42:14 David Roberts wrote: > PyZUI 0.1 has been released: Magic! Grabbed a tarball yesterday. \d -- \/\/ave: donn.in...@googlewave.com home: http://otherwise.relics.co.za/ 2D vector animation : https://savannah.nongnu.org/projects/things/ Font manager : https://s

Re: Wrapping paper, anyone ?

2009-12-16 Thread simon
On Dec 17, 2:18 am, Peter Otten <__pete...@web.de> wrote: > simon wrote: > > On Dec 16, 9:00 pm, Peter Otten <__pete...@web.de> wrote: > >> simon wrote: > > >> Nice :) > > >> --- stars.py    2009-12-16 10:52:49.553505036 +0100 > >> +++ stars_fixed.py      2009-12-16 10:53:32.545786454 +0100 > >> @@

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Alf P. Steinbach
* Mensanator: On Dec 16, 5:45 pm, "Alf P. Steinbach" wrote: * Mensanator: On Dec 16, 4:41 pm, Mensanator wrote: On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: * Alf P. Steinbach: Format: PDF http://preview.tinyurl.com/ProgrammingBookP3> The new stuff, section 2.7, is about program

Re: Using Python to Execute a C or FORTRAN Program (Windows)

2009-12-16 Thread Mensanator
On Dec 16, 8:41 pm, "W. eWatson" wrote: > Mensanator wrote: > > On Dec 14, 8:14 pm, "W. eWatson" wrote: > >> I think Python is capable of executing a compiled C or FORTRAN program, > > > Sure, if it was compiled to an .exe file. > > >> and maybe even getting some parameters passed back. > > > Sur

Re: Using Python to Execute a C or FORTRAN Program (Windows)

2009-12-16 Thread sturlamolden
On 17 Des, 03:41, "W. eWatson" wrote: > His program was originally written in Python, but a new > hardware device (capture card) had no good interface with Python, so he > wrote it in C++, which does. From my knowledge of the Python program > before the entry of c++, it seems he could have farmed

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
Neil Cerutti writes: > On 2009-12-16, J Kenneth King wrote: >> The language doesn't encourage anything. It's just a medium >> like oil paints and canvas. A painting can be good or bad >> despite the medium it is constructed on. The skill of the >> painter is what matters. > > Technically, oil

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Ned Deily
In article <88bab2c0-d27c-4081-a703-26b353b9e...@9g2000yqa.googlegroups.com>, Mensanator wrote: > Oh, and about Chapter 1. > > If you're going to use version 3.1.1 as your standard, shouldn't > you also point out that 3.1.1 is NOT bundled with Mac OS X? > > How about devoting a section on down

Re: Using Python to Execute a C or FORTRAN Program (Windows)

2009-12-16 Thread W. eWatson
Mensanator wrote: On Dec 14, 8:14�pm, "W. eWatson" wrote: I think Python is capable of executing a compiled C or FORTRAN program, Sure, if it was compiled to an .exe file. and maybe even getting some parameters passed back. Sure, if the program prints to stdout. Does anyone have a examp

Either IDLE Can't Start a subprocess or a firewall software firewall is blocking the connection (Win)--Battlin McAfee

2009-12-16 Thread W. eWatson
See Subject msg from Python 2.5 Win XP. It is preceded by a "Socket Error". It happened while I had a simple program displayed, and I wanted to see the shell. The msg occurred when I pressed Shell on Run from the menu. I played around for awhile, but got nowhere. Same msg. I did remove my McAfe

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread Asun Friere
On Dec 17, 4:41 am, pdlem...@earthlink.net wrote: > Does anyone have experience with OS X ? Could I use WConio in a > Windows emulator ?  I have no experience with MACs and am debating > whether to send this back before opening. You don't need an emulator per se. You can reboot a Mac into Window

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 16, 5:45 pm, "Alf P. Steinbach" wrote: > * Mensanator: > > > > > > > On Dec 16, 4:41 pm, Mensanator wrote: > >> On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: > > >>> * Alf P. Steinbach: >   Format: PDF >   http://preview.tinyurl.com/ProgrammingBookP3> > The new stuff, secti

Re: Seek support for new slice syntax PEP.

2009-12-16 Thread Colin W.
On 16-Dec-09 19:23 PM, Gregory Ewing wrote: Terry Reedy wrote: So it would be MUCH more useful if that notation created a range object. for i in [1:n]: ... So I would oppose the slice proposal in favor of a range proposal. Another possibility would be to unify range and slice objects so that

Re: Seek support for new slice syntax PEP.

2009-12-16 Thread Gregory Ewing
Terry Reedy wrote: So it would be MUCH more useful if that notation created a range object. for i in [1:n]: ... So I would oppose the slice proposal in favor of a range proposal. Another possibility would be to unify range and slice objects so that they're actually the same thing. Then the s

Re: ftplib retrlines timeout

2009-12-16 Thread BJ Swope
If it works like I've seen other python based network apps that have app timeouts, and Brandon's post seemed to indicate that his timed out during the readline portion of the FTP transfer. Auburn fans are like slinkys... not really good for anything but they still bring a smile to your face

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Alf P. Steinbach
* Mensanator: On Dec 16, 4:41 pm, Mensanator wrote: On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: * Alf P. Steinbach: Format: PDF http://preview.tinyurl.com/ProgrammingBookP3> The new stuff, section 2.7, is about programs as simulations and handling data, focusing on modeling things

Re: Dangerous behavior of list(generator)

2009-12-16 Thread Gregory Ewing
exar...@twistedmatrix.com wrote: Which is unfortunate, because it's not that hard to get StopIteration without explicitly raising it yourself and this behavior makes it difficult to debug such situations. It might not be hard if you set out to do it, but in my experience it's pretty rare to en

Re: Help with parsing a list

2009-12-16 Thread thunderf...@gmail.com
not as slick as Emile's (didn't think about using strip() ), but seemingly functional: data = ['key1: data1','key2: data2','key3: data3',' key4: ',' \tdata4.1',' \tdata4.2',' \tdata4.3','key5: data5'] result = {} for item in data: if item.endswith(': '): currkey = item[:-2] r

Re: Help with parsing a list

2009-12-16 Thread MRAB
J wrote: Hi all, I need some help in turning a list into a dictionary... The list looks something like this: ['key1: data1','key2: data2','key3: data3',' key4: ',' \tdata4.1',' \tdata4.2',' \tdata4.3','key5: data5'] and it's derived from output (via subprocess.Popen) that in a terminal would

Re: iterators and views of lists

2009-12-16 Thread Brendan Miller
On Wed, Dec 16, 2009 at 12:38 PM, Anh Hai Trinh wrote: > On Dec 16, 2:48 pm, Brendan Miller wrote: > >> No, that's what I'm getting at... Most of the existing mutating >> algorithms in python (sort, reverse) operate over entire collections, >> not partial collections delimited by indexes... which

frames in toplevel Tkinter

2009-12-16 Thread J Wolfe
Probably a stupid question, but can you have a frames in a toplevel widget? Anything I try to put in a frame goes back to the main or root widget and not the toplevel or pop-up widget. Thanks for the help! Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is PyMethod_GET_CLASS in Python 3?

2009-12-16 Thread Terry Reedy
On 12/16/2009 3:37 AM, Infinity77 wrote: Hi, On Dec 15, 9:22 pm, Terry Reedy wrote: On 12/15/2009 11:08 AM, Infinity77 wrote: Hi All, When building C extensions In Python 2.X, there was a magical PyMethod_GET_CLASS implemented like this: #define PyMethod_GET_CLASS(meth) \ (((P

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 16, 4:41 pm, Mensanator wrote: > On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: > > > > > > > * Alf P. Steinbach: > > > >   Format: PDF > > >   http://preview.tinyurl.com/ProgrammingBookP3> > > > > The new stuff, section 2.7, is about programs as simulations and > > > handling data, focusin

Re: Help with parsing a list

2009-12-16 Thread Emile van Sebille
On 12/16/2009 1:32 PM J said... Hi all, I need some help in turning a list into a dictionary... The list looks something like this: ['key1: data1','key2: data2','key3: data3',' key4: ',' \tdata4.1',' \tdata4.2',' \tdata4.3','key5: data5'] and it's derived from output (via subprocess.Popen) th

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Mensanator
On Dec 14, 1:23 am, "Alf P. Steinbach" wrote: > * Alf P. Steinbach: > > > > > > >   Format: PDF > >   http://preview.tinyurl.com/ProgrammingBookP3> > > > The new stuff, section 2.7, is about programs as simulations and > > handling data, focusing on modeling things. It includes some Python GUI > >

webscrapping ringcentral.com using mechanize

2009-12-16 Thread shrini
Hi, I am trying to scrap the website 'http://service.ringcentral.com' It has a form with three input boxes. When trying to get the form with mechanize, it is throwing the following error. mechanize._mechanize.FormNotFoundError: no form matching name 'login' but, the page has the form with name

Re: race/deadlock when creating a multiprocessing.manager instance while importing a module ?

2009-12-16 Thread Sebastien Binet
hi there, > On Tuesday 15 December 2009 02:49:00 Dave Angel wrote: > > Since I don't see any other responses, I'll give my guess, even though > > I'm not very experienced with the multiprocessing module. > > > > It's my understanding that threads may not be created or destroyed > > during an impor

Re: ftplib retrlines timeout

2009-12-16 Thread Jennifer
So you mean ftplib.FTP('.xxx.com',username,password,timeout) will timeout the retrlines as well, correct? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: read text file byte by byte

2009-12-16 Thread Nobody
On Mon, 14 Dec 2009 21:37:33 -0300, Gabriel Genellina wrote: >> There are no file objects in 3.x. The file() function no longer >> exists. The return value from open(), will be an instance of >> _io. depending upon the mode, e.g. _io.TextIOWrapper for 'r', >> _io.BufferedReader for 'rb', _io.Buffe

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Alf P. Steinbach
* Alf P. Steinbach: * Alf P. Steinbach: Format: PDF http://preview.tinyurl.com/ProgrammingBookP3> The new stuff, section 2.7, is about programs as simulations and handling data, focusing on modeling things. It includes some Python GUI programming. The plan is to discuss containers like li

Help with parsing a list

2009-12-16 Thread J
Hi all, I need some help in turning a list into a dictionary... The list looks something like this: ['key1: data1','key2: data2','key3: data3',' key4: ',' \tdata4.1',' \tdata4.2',' \tdata4.3','key5: data5'] and it's derived from output (via subprocess.Popen) that in a terminal would look like t

Re: Question to logging

2009-12-16 Thread Vinay Sajip at Red Dove
On 16/12/2009 12:49, stefan.messerl...@postfinance.ch wrote: > I have the following error and no clue, how to solve that. Up to python > version 2.5 the following script worked without an error, but since python > 2.6. I get the following error: > > #!/usr/bin/env python > # -*- coding: ISO-8859-

Re: I have a cross platform os.startfile but I need to asociate files with xdg-open in linux how do I do that??

2009-12-16 Thread eric_dex...@msn.com
On Dec 16, 10:36 am, Paul Boddie wrote: > On 16 Des, 17:03, "eric_dex...@msn.com" wrote: > > > #this should be a cross platform example of os.startfile ( startfile ) > > #for windows and linux.  this is the first version and > > #linux, mac, other os's commands for exceptions to the > > #rule wou

Re: python and command shell on Windows

2009-12-16 Thread eric_dex...@msn.com
On Dec 16, 11:58 am, josu wrote: > Hi > > I am trying to execute a windows command based on a shell by mean of > python. I have proven subprocess > > test=subprocess.Popen > (['shell_command'],shell=True,stdin=PIPE,stdout=PIPE) > > Initally, all seems ok, but, after seconds the python shell is fro

Re: Raw string substitution problem

2009-12-16 Thread Ed Keith
--- On Wed, 12/16/09, Peter Otten <__pete...@web.de> wrote: > Another possibility: > > >>> print re.sub('abc', lambda m: r'a\nb\n.c\a', > '123abcdefg') > 123a\nb\n.c\adefg I'm not sure whether that is clever, ugly, or just plain strange! I think I'll stick with: >>> m = re.match('^(.*)abc(.*)

Re: iterators and views of lists

2009-12-16 Thread Anh Hai Trinh
On Dec 16, 2:48 pm, Brendan Miller wrote: > No, that's what I'm getting at... Most of the existing mutating > algorithms in python (sort, reverse) operate over entire collections, > not partial collections delimited by indexes... which would be really > awkward anyway. Ok it can be done! The cod

How to create a self-destructing Tkinter dialog box?

2009-12-16 Thread mrstevegross
Ok, I would like to put together a Python/Tkinter dialog box that displays a simple message and self-destructs after N seconds. Is there a simple way to do this? Thanks, --Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw string substitution problem

2009-12-16 Thread Peter Otten
Gabriel Genellina wrote: > En Wed, 16 Dec 2009 14:51:08 -0300, Peter Otten <__pete...@web.de> > escribió: > >> Ed Keith wrote: >> >>> --- On Wed, 12/16/09, Gabriel Genellina wrote: >>> Ed Keith escribió: > I am having a problem when substituting a raw string. When I do

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
r0g writes: > J Kenneth King wrote: >> Steven D'Aprano writes: >> >>> On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: >>> > > Hear, hear! >>> That's all very well, but some languages and techniques encourage the >>> programmer to write bad code. >> >> That's just BS. >> >> Bad

Re: Python Imaging Library status

2009-12-16 Thread paulo.jpi...@gmail.com
On 16 Dez., 19:21, "Gabriel Genellina" wrote: > En Wed, 16 Dec 2009 13:07:30 -0300, paulo.jpi...@gmail.com   > escribió: > > > is the famous PIL now a dead project? > > > Latest available download is from 2006 and I still don't see any signs > > of having it updated for Python 2.6 or 3.x versions

Re: Raw string substitution problem

2009-12-16 Thread Gabriel Genellina
En Wed, 16 Dec 2009 14:51:08 -0300, Peter Otten <__pete...@web.de> escribió: Ed Keith wrote: --- On Wed, 12/16/09, Gabriel Genellina wrote: Ed Keith escribió: > I am having a problem when substituting a raw string. When I do the following: > > re.sub('abc', r'a\nb\nc', '123abcdefg') > >

Re: ftplib retrlines timeout

2009-12-16 Thread BJ Swope
I've had experiences with some python mail servers that time out connections if data from the socket is not sent to the application within the timeout parameter. I have seen a python app on FreeBSD that would timeout a connection after 600 seconds if freebsd did not receive at least 32 kb of data

Fwd: Re: Logging question

2009-12-16 Thread Vinay Sajip at Red Dove
Original Message Subject:Re: Logging question Date: Tue, 15 Dec 2009 18:28:54 + From: Vinay Sajip at Red Dove To: Yaroslav Molochko On 15/12/2009 14:29, Yaroslav Molochko wrote: > Hello Vinay Sajip, > > my name is Yaroslav, I'm trying to use your logging

Python training in Florida, January 19-21

2009-12-16 Thread Mark Lutz
Don't miss your chance to attend our upcoming Florida Python training class next month. This 3-day public class is being held January 19-21, in Sarasota, Florida. It is open to both individual and group enrollments. For more details on the class, as well as registration instructions, please visit

Re: iterators and views of lists

2009-12-16 Thread Brendan Miller
On Wed, Dec 16, 2009 at 4:16 AM, Paul Rudin wrote: > Steven D'Aprano writes: > > >> I'm sympathetic to your request for list views. I've often wanted some >> way to cleanly and neatly do this: >> >> for item in seq[1:]: >>     process(item) >> >> without making an unnecessary copy of almost all o

Re: Python Imaging Library status

2009-12-16 Thread Emile van Sebille
On 12/16/2009 8:07 AM paulo.jpi...@gmail.com said... Hi guys, is the famous PIL now a dead project? Latest available download is from 2006 and I still don't see any signs of having it updated for Python 2.6 or 3.x versions. PIL for Python 2.6 is available for download from http://www.pythonw

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread Mensanator
On Dec 16, 11:41 am, pdlem...@earthlink.net wrote: > I've been given a MAC AIR laptop with OS X 10.6 "Snow Leopard". > On my desktop I dual boot with XP - Ubuntu and have Python on both. > Unfortunately all my Python programs are written on Windows XP and > I heavily rely on WConio for console I/O.

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread Mark Dickinson
On Dec 16, 5:41 pm, pdlem...@earthlink.net wrote: > I've been given a MAC AIR laptop with OS X 10.6 "Snow Leopard". > On my desktop I dual boot with XP - Ubuntu and have Python on both. > Unfortunately all my Python programs are written on Windows XP and > I heavily rely on WConio for console I/O.

Re: Python Imaging Library status

2009-12-16 Thread Gabriel Genellina
En Wed, 16 Dec 2009 13:07:30 -0300, paulo.jpi...@gmail.com escribió: is the famous PIL now a dead project? Latest available download is from 2006 and I still don't see any signs of having it updated for Python 2.6 or 3.x versions. Version 1.1.7 is in beta. Here you can find all available v

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread r0g
pdlem...@earthlink.net wrote: > I've been given a MAC AIR laptop with OS X 10.6 "Snow Leopard". > On my desktop I dual boot with XP - Ubuntu and have Python on both. > Unfortunately all my Python programs are written on Windows XP and > I heavily rely on WConio for console I/O. > Called Apple tech

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread Rami Chowdhury
On Wed, Dec 16, 2009 at 09:41, wrote: > I've been given a MAC AIR laptop with OS X 10.6 "Snow Leopard". > On my desktop I dual boot with XP - Ubuntu and have Python on both. > Unfortunately all my Python programs are written on Windows XP and > I heavily rely on WConio for console I/O. > Called A

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread Philip Semanchuk
On Dec 16, 2009, at 12:41 PM, pdlem...@earthlink.net wrote: I've been given a MAC AIR laptop with OS X 10.6 "Snow Leopard". On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for console

python and command shell on Windows

2009-12-16 Thread josu
Hi I am trying to execute a windows command based on a shell by mean of python. I have proven subprocess test=subprocess.Popen (['shell_command'],shell=True,stdin=PIPE,stdout=PIPE) Initally, all seems ok, but, after seconds the python shell is frozen. Does someone know alternative ways valid fo

Re: Raw string substitution problem

2009-12-16 Thread Peter Otten
Ed Keith wrote: > --- On Wed, 12/16/09, Gabriel Genellina wrote: > >> From: Gabriel Genellina >> Subject: Re: Raw string substitution problem >> To: python-list@python.org >> Date: Wednesday, December 16, 2009, 9:35 AM >> En Wed, 16 Dec 2009 11:09:32 -0300, >> Ed Keith >> escribió: >> >> > I

Re: iterators and views of lists

2009-12-16 Thread Francesco Bochicchio
On Dec 16, 1:58 pm, Anh Hai Trinh wrote: > > You might be interested in this library stream>. > > You can easily create arbitrary "slice", for example > >   i = mylist >> takei(primes()) > > will return an iterator over the items of mylist with a prime number > ind

Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread pdlemper
I've been given a MAC AIR laptop with OS X 10.6 "Snow Leopard". On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for console I/O. Called Apple tech support. The technician had never heard

Re: regex help

2009-12-16 Thread Intchanter / Daniel Fackrell
On Dec 16, 10:22 am, r0g wrote: > Gabriel Rossetti wrote: > > Hello everyone, > > > I'm going nuts with some regex, could someone please show me what I'm > > doing wrong? > > > I have an XMPP msg : > > > > > Does someone know what is wrong with my expression? Thank you, Gabriel > > Gabriel, tryin

Re: another problem..

2009-12-16 Thread Grant Edwards
On 2009-12-16, codefly wrote: > now.. another problem.. Sorry to be so blunt, but your main problem is that you don't know how to ask questions. Fix that, and everything else will become much easier: 1) Read this: http://catb.org/~esr/faqs/smart-questions.html 2) Read it again. 3) Read t

Re: Python tricks with applescript in OS-X

2009-12-16 Thread Juanre
Thanks for the pointers to appscript, and for the comments on the page. I have changed the examples at http://juanreyero.com/article/python/os-x-python.html to reflect them. Cheers, Juan -- http://juanreyero.com -- http://mail.python.org/mailman/listinfo/python-list

Re: regex help

2009-12-16 Thread r0g
Gabriel Rossetti wrote: > Hello everyone, > > I'm going nuts with some regex, could someone please show me what I'm > doing wrong? > > I have an XMPP msg : > > > > Does someone know what is wrong with my expression? Thank you, Gabriel Gabriel, trying to debug a long regex in situ can be a

Re: Raw string substitution problem

2009-12-16 Thread Ed Keith
--- On Wed, 12/16/09, Gabriel Genellina wrote: > From: Gabriel Genellina > Subject: Re: Raw string substitution problem > To: python-list@python.org > Date: Wednesday, December 16, 2009, 9:35 AM > En Wed, 16 Dec 2009 11:09:32 -0300, > Ed Keith > escribió: > > > I am having a problem when subst

regex help

2009-12-16 Thread Gabriel Rossetti
Hello everyone, I'm going nuts with some regex, could someone please show me what I'm doing wrong? I have an XMPP msg : 123 456 ... the node may be absent or empty (), the node may be absent. I'd like to grab everything exept the

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
bartc wrote: > > "simon" wrote in message > news:a50b1c21-287b-498d-a8c3-51a3a2f94...@k9g2000vbl.googlegroups.com... >> #!/usr/bin/env python >> >> from math import * >> >> from random import * >> >> import cairo >> from cairo import Context > > What's cairo? > > A vector graphics library.

Re: i re-write it

2009-12-16 Thread Dave Angel
codefly wrote: On Dec 17, 12:43 am, "Diez B. Roggisch" wrote: codefly wrote: error message is here.. when i type import code2 Traceback (most recent call last): File "", line 1, in File "code2.py", line 11 ~ ^ SyntaxError: invalid syntax

Re: another problem..

2009-12-16 Thread Dave Angel
codefly wrote: now.. another problem.. when i type me = code2() the error is here.. Traceback (most recent call last): File "", line 1, in TypeError: 'module' object is not callable By creating a new thread for each new question, you're forcing yourself to repeat the code and environmen

Re: i re-write it

2009-12-16 Thread Bruno Desthuilliers
codefly a écrit : now.. another problem.. when i type me = code2() where ? and what is 'code2' in this context ? Sorry, my crystal ball is out for repair... the error is here.. Traceback (most recent call last): File "", line 1, in TypeError: 'module' object is not callable Ok, so it

Re: I have a cross platform os.startfile but I need to asociate files with xdg-open in linux how do I do that??

2009-12-16 Thread Paul Boddie
On 16 Des, 17:03, "eric_dex...@msn.com" wrote: > #this should be a cross platform example of os.startfile ( startfile ) > #for windows and linux.  this is the first version and > #linux, mac, other os's commands for exceptions to the > #rule would be appreciated.  at some point this will be > #in

Re: basic grammer error..

2009-12-16 Thread Bruno Desthuilliers
codefly a écrit : class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i < hours: print 'i wait %s hours' %(i) i = i+1 if i == hours: print '\nhe never comes' run error// what's wrong??

Re: Wrapping paper, anyone ?

2009-12-16 Thread bartc
"simon" wrote in message news:a50b1c21-287b-498d-a8c3-51a3a2f94...@k9g2000vbl.googlegroups.com... #!/usr/bin/env python from math import * from random import * import cairo from cairo import Context What's cairo? -- http://mail.python.org/mailman/listinfo/python-list

Re: i re-write it

2009-12-16 Thread Diez B. Roggisch
codefly wrote: > On Dec 17, 12:43 am, "Diez B. Roggisch" wrote: >> codefly wrote: >> > error message is here.. >> > when i type import code2 >> >> > Traceback (most recent call last): >> > File "", line 1, in >> > File "code2.py", line 11 >> > ~ >> > ^ >> > SyntaxError: invalid syntax >> >> > an

Re: basic grammer error..

2009-12-16 Thread Dave Angel
codefly wrote: class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i < hours: print 'i wait %s hours' %(i) i = i+1 if i == hours: print '\nhe never comes' run error// what's wrong??

Python Imaging Library status

2009-12-16 Thread paulo.jpi...@gmail.com
Hi guys, is the famous PIL now a dead project? Latest available download is from 2006 and I still don't see any signs of having it updated for Python 2.6 or 3.x versions. Thanks in Advance, Paulo -- http://mail.python.org/mailman/listinfo/python-list

I have a cross platform os.startfile but I need to asociate files with xdg-open in linux how do I do that??

2009-12-16 Thread eric_dex...@msn.com
#this should be a cross platform example of os.startfile ( startfile ) #for windows and linux. this is the first version and #linux, mac, other os's commands for exceptions to the #rule would be appreciated. at some point this will be #in the dex tracker project. import os import subprocess def

another problem..

2009-12-16 Thread codefly
now.. another problem.. when i type me = code2() the error is here.. Traceback (most recent call last): File "", line 1, in TypeError: 'module' object is not callable -- http://mail.python.org/mailman/listinfo/python-list

Re: i re-write it

2009-12-16 Thread codefly
On Dec 17, 12:43 am, "Diez B. Roggisch" wrote: > codefly wrote: > > error message is here.. > > when i type import code2 > > > Traceback (most recent call last): > >   File "", line 1, in > >   File "code2.py", line 11 > >     ~ > >                        ^ > > SyntaxError: invalid syntax > > > a

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread Victor Subervi
On Wed, Dec 16, 2009 at 11:33 AM, Dave Angel wrote: > > > Victor Subervi wrote: > >> On Tue, Dec 15, 2009 at 6:57 PM, r0g wrote: >> >> >> >> Cookies in FF for Windows are stored in an sqlite database in here... >>> >>> ~\Application Data\Mozilla\Firefox\Profiles\%XYZ%\firefox_profile\ >>> >>>

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread David Robinow
On Wed, Dec 16, 2009 at 10:33 AM, Dave Angel wrote: > You can also find the appdata directory by looking at the environment > variable USERPROFILE, switching to that directory, and descending directly > into "application data" by using the tab key. > ... Lots of good advice. I'd just point out tha

Re: i re-write it

2009-12-16 Thread codefly
On Dec 17, 12:43 am, "Diez B. Roggisch" wrote: > codefly wrote: > > error message is here.. > > when i type import code2 > > > Traceback (most recent call last): > >   File "", line 1, in > >   File "code2.py", line 11 > >     ~ > >                        ^ > > SyntaxError: invalid syntax > > > a

Re: i re-write it

2009-12-16 Thread Diez B. Roggisch
codefly wrote: > error message is here.. > when i type import code2 > > Traceback (most recent call last): > File "", line 1, in > File "code2.py", line 11 > ~ >^ > SyntaxError: invalid syntax > > > and source code is here No, it isn't. The above error says "li

Re: Subclassing RegexObject

2009-12-16 Thread Peter Otten
Tobias Weber wrote: > how do I subclass or at least add a method to something returned by > re.compile()? Let's see: >>> import re >>> r = re.compile("yadda") >>> class S(type(r)): pass ... Traceback (most recent call last): File "", line 1, in TypeError: Error when calling the metaclass base

i re-write it

2009-12-16 Thread codefly
error message is here.. when i type import code2 Traceback (most recent call last): File "", line 1, in File "code2.py", line 11 ~ ^ SyntaxError: invalid syntax and source code is here class codefly: def WaitFreecatz(self, hours): hours = self.hour

Re: power of explicit self?

2009-12-16 Thread Gabriel Genellina
En Wed, 16 Dec 2009 11:56:17 -0300, Grant Edwards escribió: On 2009-12-16, Gabriel Genellina wrote: Fire Crow : > Nowhere, I'd say. An *implicit* self would have to be implemented > somewhere in the compiler -- but an explicit self doesn't. It's > homogeneous, always name-dot-attribute; the

Re: basic grammer error..

2009-12-16 Thread codefly
On 12월17일, 오전12시23분, "Diez B. Roggisch" wrote: > codefly wrote: > > class codefly: > > > def WaitFreecatz(self, hours): > > hours = self.hours > > i = 1 > > while i < hours: > > print 'i wait %s hours' %(i) > > i = i+1 > > if i =

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread Dave Angel
Victor Subervi wrote: On Tue, Dec 15, 2009 at 6:57 PM, r0g wrote: Cookies in FF for Windows are stored in an sqlite database in here... ~\Application Data\Mozilla\Firefox\Profiles\%XYZ%\firefox_profile\ Man, I searched C drive (the only drive) on this computer where I'm working (In

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
simon wrote: > On Dec 17, 12:36 am, r0g wrote: >> Peter Otten wrote: >>> simon wrote: >>> Nice :) >>> --- stars.py2009-12-16 10:52:49.553505036 +0100 >>> +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 >>> @@ -48,7 +48,9 @@ >>> def __init__(self): >>> self.calls = []

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread r0g
J Kenneth King wrote: > Steven D'Aprano writes: > >> On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: >> >>> Hear, hear! >> That's all very well, but some languages and techniques encourage the >> programmer to write bad code. > > That's just BS. > > Bad code doesn't just write itself

Re: basic grammer error..

2009-12-16 Thread Diez B. Roggisch
codefly wrote: > class codefly: > > def WaitFreecatz(self, hours): > hours = self.hours > i = 1 > while i < hours: > print 'i wait %s hours' %(i) > i = i+1 > if i == hours: > print '\nhe never comes' > > > run er

Re: Wrapping paper, anyone ?

2009-12-16 Thread Peter Otten
simon wrote: > On Dec 16, 9:00 pm, Peter Otten <__pete...@web.de> wrote: >> simon wrote: >> >> Nice :) >> >> --- stars.py2009-12-16 10:52:49.553505036 +0100 >> +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 >> @@ -48,7 +48,9 @@ >> def __init__(self): >> self.calls = [] >> >> -

basic grammer error..

2009-12-16 Thread codefly
class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i < hours: print 'i wait %s hours' %(i) i = i+1 if i == hours: print '\nhe never comes' run error// what's wrong?? -- http://mail.pytho

Re: platform module problem when frozen?

2009-12-16 Thread Dave Angel
Gabriel Rossetti wrote: Hello everyone, I am having problems with the platform module when being run from a frozen program (py2exe). It imports it fine, but it gives me the following error : 'module' object does not contain attribute 'platform' when I do this : platform.platfom() Does p

Re: power of explicit self?

2009-12-16 Thread Grant Edwards
On 2009-12-16, Gabriel Genellina wrote: > Fire Crow : > >> > Nowhere, I'd say. An *implicit* self would have to be implemented >> > somewhere in the compiler -- but an explicit self doesn't. It's >> > homogeneous, always name-dot-attribute; the name 'self' is not special at >> > all. > >> This is

  1   2   >