Re: KeyError: '13'

2012-06-06 Thread Phanindra Ramesh Challa
I got metatype compiled. Thanks for your help On Wed, Jun 6, 2012 at 6:44 PM, Peter Otten <__pete...@web.de> wrote: > Phanindra Ramesh Challa wrote: > > [Please hit "reply-all" in you email client when you answer a post. That > way > it will appear on the mailing list and give more people a chanc

Re: problem python

2012-06-06 Thread Aldrich DeMata
Python can't find site.py. It's either missing when you installed python, it was deleted, or it's located in another directory. Run >>> find / -iname 'site.py' , sudo if needed, and add the location of site.py in your python search path. The python online docs has a good documentation on python s

Re: Adopting ‘lockfile’

2012-06-06 Thread Ben Finney
Ben Finney writes: > Thanks for the suggestion. I've imported it from Subversion into Bazaar > (my preferred DVCS), and it went smoothly. Development of ‘python-lockfile’ now proceeds on Alioth https://alioth.debian.org/projects/python-lockfile/>. > I will proceed with a handover from Skip for

Re: Compare 2 times

2012-06-06 Thread t_texas
On Jun 6, 7:50 am, loial wrote: > I have a requirement to test the creation time of a file with the > current time and raise a message if the file is  more than 15 minutes > old. > > Platform is Unix. > > I have looked at using os.path.getctime for the file creation time and > time.time() for the

Re: [Python-ideas] changing sys.stdout encoding

2012-06-06 Thread Rurpy
On 06/06/2012 10:09 AM, MRAB wrote: > On 06/06/2012 08:09, Rurpy wrote: >> On 06/05/2012 05:56 PM, MRAB wrote: >>> On 06/06/2012 00:34, Victor Stinner wrote: 2012/6/5 Rurpy: > In my first foray into Python3 I've encountered this problem: > I work in a multi-language environment.

Re: UDPSock.recvfrom(buf) ??????? (buf) ???

2012-06-06 Thread MRAB
On 06/06/2012 22:12, Diego Uribe Gamez wrote: > Estoy mirando una conexión por Soket y no logro entender que hace el > buf? que es lo que cambia? el numero que se le asigna es que? > > |host= "localhost" > > port= 21567 > > buf= 1024 > > data= '' > > addr= (host, port) > > UDPSock = socket

Re: Compare 2 times

2012-06-06 Thread Jon Clements
On 06/06/12 14:39, Christian Heimes wrote: Am 06.06.2012 14:50, schrieb loial: I have a requirement to test the creation time of a file with the current time and raise a message if the file is more than 15 minutes old. Platform is Unix. I have looked at using os.path.getctime for the file cre

ANN: Tracerlib 0.1 Released

2012-06-06 Thread Calvin Spealman
Tracerlib is a set of utilities to make tracing Python code easier. It provides TracerManager, which can allow multiple trace functions to coexist. It can easily be enabled and disabled, either manually or as a context manager in a with statement. Tracer classes make handling the different trace

Re: usenet reading

2012-06-06 Thread Colin Higwell
On Sun, 03 Jun 2012 16:25:53 +0200, Matej Cepl wrote: > Yes, Pan is better, but it used to have some rough edges > (e.g., it's offline qualities were a bit elusive) I wouldn't know about that. My connection is always-on. -- http://mail.python.org/mailman/listinfo/python-list

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Terry Reedy
On 6/6/2012 4:56 PM, Jerry Hill wrote: On Wed, Jun 6, 2012 at 4:10 PM, Alec Ross wrote: FWIW, English idiomatic usage includes "see overleaf", and "see over", for the obverse side of a page/sheet, i.e, the following page; and "see facing page", w/ the obvious meaning. For what it's worth, I'v

Re: what gui designer is everyone using

2012-06-06 Thread Colin Higwell
On Tue, 05 Jun 2012 10:10:17 -0400, Mark R Rivet wrote: > I want a gui designer that writes the gui code for me. I don't want to > write gui code. what is the gui designer that is most popular? > I tried boa-constructor, and it works, but I am concerned about how > dated it seems to be with no upd

RE: Searching 2 Strings in A File

2012-06-06 Thread Prasad, Ramit
> > Dave, actually it's a 2 arguments. Sorry, i did not make it clear in my > question. I used Ramit's hint and it worked. The code should be as follows: > > > > pattern = "({0}|{1})".format(x,y) > > cmd_line = Popen(["egrep", pattern, aLogFile], stdout=PIPE, stdin=PIPE, > stderr=STDOUT) > > > > Re

Re: Searching 2 Strings in A File

2012-06-06 Thread Dave Angel
On 06/06/2012 05:10 PM, dohoang4...@comcast.net wrote: > hi all, (You forgot to include the list in your reply) > > thanks a lot for your quick response. > > Dave, actually it's a 2 arguments. Sorry, i did not make it clear in my > question. I used Ramit's hint and it worked. The code should

Re: How to exec() a string like interactive python does?

2012-06-06 Thread News123
On 06/06/2012 01:31 AM, Steven D'Aprano wrote: On Wed, 06 Jun 2012 00:12:00 +0200, News123 wrote: If I start Python in interactive mode, and I yype the commands, 'a=3', 'a', 'print a' Then the output would look like: >>> a = 3 >>> a 3 >>> print a 3 Now within an application I'd l

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Jerry Hill
On Wed, Jun 6, 2012 at 4:10 PM, Alec Ross wrote: > FWIW, English idiomatic usage includes "see overleaf", and "see over", for > the obverse side of a page/sheet, i.e, the following page; and "see facing > page", w/ the obvious meaning. For what it's worth, I've never seen either of those construc

Need to build Python 2.6 with Microsoft Visual Studio 2010

2012-06-06 Thread Tom Kacvinsky
For reasons beyond my control, I have a need to build Python 2.6 with MSVC 2010 (for x64). Does anyone have any hints as to how I can accomplish this? I see there are instructions for building Python 2.7 with MSVC 2010, but those are using the Python 2.7 source as the base for patching, so they d

Re: English version for M�mento Python 3 (draft, readers needed)

2012-06-06 Thread Alec Ross
In message <4fcf9108$0$16471$426a7...@news.free.fr>, Laurent Pointal writes Ulrich Eckhardt wrote: Am 05.06.2012 19:32, schrieb Laurent Pointal: ... "see verso for string formatting..." - what is "verso"? Modified with Paul indications (its the "other side" in french - from latin).

Re: ttk.Spinbox missing?

2012-06-06 Thread Terry Reedy
On 6/6/2012 9:06 AM, Mark Summerfield wrote: I have Python 3.2 with Tcl/Tk 8.5, but there doesn't seem to be a ttk.Spinbox widget even though that widget is part of Tcl/Tk 8.5: http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_spinbox.htm Why is that? My guess is that Spinbox was not present when tkinte

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Jugurtha Hadjar
On 06/06/2012 07:45 PM, MRAB wrote: On 06/06/2012 18:23, Jugurtha Hadjar wrote: [snip] "range returns a « generator », convert it to list to see.." --> "converts" instead of "convert". No, "convert" is correct here; it's the imperative, i.e. "convert it to a list if you want to see...". My

Re: file pointer array

2012-06-06 Thread Jon Clements
On 06/06/12 19:51, MRAB wrote: On 06/06/2012 19:28, Jon Clements wrote: On 06/06/12 18:54, Prasad, Ramit wrote: data= [] for index in range(N, 1): # see Chris Rebert's comment with open('data%d.txt' % index,'r') as f: data.append( f.readlines() ) I think "data.extend(f)" would be a better ch

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Andrew Berg
On 6/6/2012 1:45 PM, MRAB wrote: > On 06/06/2012 18:23, Jugurtha Hadjar wrote: > [snip] >> "range returns a « generator », convert it to list to see.." --> >> "converts" instead of "convert". >> > No, "convert" is correct here; it's the imperative, i.e. "convert it to > a list if you want to see.

Re: file pointer array

2012-06-06 Thread MRAB
On 06/06/2012 19:28, Jon Clements wrote: On 06/06/12 18:54, Prasad, Ramit wrote: data= [] for index in range(N, 1): # see Chris Rebert's comment with open('data%d.txt' % index,'r') as f: data.append( f.readlines() ) I think "data.extend(f)" would be a better choice. .exten

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread MRAB
On 06/06/2012 18:23, Jugurtha Hadjar wrote: [snip] "range returns a « generator », convert it to list to see.." --> "converts" instead of "convert". No, "convert" is correct here; it's the imperative, i.e. "convert it to a list if you want to see...". "frequently used in for iterative loops"

RE: file pointer array

2012-06-06 Thread Prasad, Ramit
> > data= [] > > for index in range(N, 1): # see Chris Rebert's comment > > with open('data%d.txt' % index,'r') as f: > > data.append( f.readlines() ) > > > > I think "data.extend(f)" would be a better choice. Wouldn't that concatenate the data from each file rather than keeping eac

Re: file pointer array

2012-06-06 Thread Jon Clements
On 06/06/12 18:54, Prasad, Ramit wrote: data= [] for index in range(N, 1): # see Chris Rebert's comment with open('data%d.txt' % index,'r') as f: data.append( f.readlines() ) I think "data.extend(f)" would be a better choice. Jon. -- http://mail.python.org/mailman/listinfo/pytho

Re: Compare 2 times

2012-06-06 Thread Nobody
On Wed, 06 Jun 2012 05:50:02 -0700, loial wrote: > I have a requirement to test the creation time of a file with the current > time and raise a message if the file is more than 15 minutes old. > > Platform is Unix. > > I have looked at using os.path.getctime for the file creation time and > tim

RE: file pointer array

2012-06-06 Thread Prasad, Ramit
> > > > I have a simple question. I wish to generate an array of file pointers. > > For example, I have files: > > > > data1.txt > > data2.txt > > data3.txt > > > > > > I wish to generate fine pointer array so that I can read the files at > > the same time. > > > > for index in range(N): > >

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Laurent Pointal
Ulrich Eckhardt wrote: > Am 05.06.2012 19:32, schrieb Laurent Pointal: >> I started a first translation of my document originally in french. Could >> some fluent english people read it and indicate errors or bad english >> expressions. > > Just one note up front: Languages or nationalities are wr

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Jugurtha Hadjar
On 06/05/2012 06:32 PM, Laurent Pointal wrote: Hello, I started a first translation of my document originally in french. Could some fluent english people read it and indicate errors or bad english expressions. http://perso.limsi.fr/pointal/python:memento Thanks. A+ Laurent. Very nice ! Som

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Laurent Pointal
Paul Rubin wrote: > Laurent Pointal writes: >>> There are a few other things like that, and I'll try to look more >>> carefully tonight, I can't spend more time on it right now. >> I updated the document into 1.0.5a (and fix some other errors). > > A few more things: > > In "Files" > don't

Re: [Python-ideas] changing sys.stdout encoding

2012-06-06 Thread MRAB
On 06/06/2012 08:09, Rurpy wrote: On 06/05/2012 05:56 PM, MRAB wrote: On 06/06/2012 00:34, Victor Stinner wrote: 2012/6/5 Rurpy: In my first foray into Python3 I've encountered this problem: I work in a multi-language environment. I've written a number of tools, mostly command-line, t

Re: [Python-Dev] TZ-aware local time

2012-06-06 Thread MRAB
On 06/06/2012 07:10, Ben Finney wrote: MRAB writes: datetime objects would consist of the UTC time, time zone and DST. “time zone” information always entails DST information doesn't it? It isn't proper time zone information if it doesn't tell you about DST. That is, when you know the full

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread MRAB
On 06/06/2012 12:08, Tim Wintle wrote: On Wed, 2012-06-06 at 12:03 +0200, Ulrich Eckhardt wrote: "block else for other cases" - this sounds as if it was blocking the else. Maybe "else-block for other cases", I would say "else block". "else-block" is grammatically correct too, but I don't thi

Re: Compare 2 times

2012-06-06 Thread William R. Wing (Bill Wing)
On Jun 6, 2012, at 9:45 AM, William R. Wing (Bill Wing) wrote: > On Jun 6, 2012, at 9:29 AM, Alain Ketterlin wrote: > >> loial writes: >> >>> I have a requirement to test the creation time of a file with the >>> current time and raise a message if the file is more than 15 minutes >>> old. >>>

Re: Compare 2 times

2012-06-06 Thread Alain Ketterlin
Alain Ketterlin writes: > loial writes: > >> I have a requirement to test the creation time of a file with the >> current time and raise a message if the file is more than 15 minutes >> old. >> Platform is Unix. >> I have looked at using os.path.getctime for the file creation time and >> time.t

Re: Compare 2 times

2012-06-06 Thread William R. Wing (Bill Wing)
On Jun 6, 2012, at 9:29 AM, Alain Ketterlin wrote: > loial writes: > >> I have a requirement to test the creation time of a file with the >> current time and raise a message if the file is more than 15 minutes >> old. >> Platform is Unix. >> I have looked at using os.path.getctime for the file

Re: Compare 2 times

2012-06-06 Thread Christian Heimes
Am 06.06.2012 14:50, schrieb loial: > I have a requirement to test the creation time of a file with the > current time and raise a message if the file is more than 15 minutes > old. > > Platform is Unix. > > I have looked at using os.path.getctime for the file creation time and > time.time() for

Re: Compare 2 times

2012-06-06 Thread Peter Otten
loial wrote: > I have a requirement to test the creation time of a file with the > current time and raise a message if the file is more than 15 minutes > old. > > Platform is Unix. > > I have looked at using os.path.getctime for the file creation time and ctime is not actually the creation tim

Re: problem python

2012-06-06 Thread Peter Otten
Tom King wrote: [Please hit "reply-all" in your email client when you answer a post. That way it will appear on the mailing list and give more people a chance to answer] >>> when i type python in my command line console i get an error message >>> >>> 'import site' failed; use -v for traceback

Re: KeyError: '13'

2012-06-06 Thread Peter Otten
Phanindra Ramesh Challa wrote: [Please hit "reply-all" in you email client when you answer a post. That way it will appear on the mailing list and give more people a chance to answer] > output of the is just the line > "sizes". >> and then decide if you to need to change the lookup key or to ad

ttk.Spinbox missing?

2012-06-06 Thread Mark Summerfield
Hi, I have Python 3.2 with Tcl/Tk 8.5, but there doesn't seem to be a ttk.Spinbox widget even though that widget is part of Tcl/Tk 8.5: http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_spinbox.htm Why is that? -- http://mail.python.org/mailman/listinfo/python-list

Re: problem python

2012-06-06 Thread Peter Otten
Tom King wrote: > hi im new in python and i have a problem about > > when i type python in my command line console i get an error message > > 'import site' failed; use -v for traceback > Python 2.4.3 (#1, May 5 2011, 18:44:23) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2 > Type "help", "

problem python

2012-06-06 Thread Tom King
hi im new in python and i have a problem about when i type python in my command line console i get an error message  'import site' failed; use -v for traceback Python 2.4.3 (#1, May  5 2011, 18:44:23) [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2 Type "help", "copyright", "credits" or "lice

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Tim Wintle
On Wed, 2012-06-06 at 12:03 +0200, Ulrich Eckhardt wrote: > "block else for other cases" - this sounds as if it was blocking the > else. Maybe "else-block for other cases", I would say "else block". "else-block" is grammatically correct too, but I don't think I've seen it used regularly. RE: the

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Ulrich Eckhardt
Am 05.06.2012 19:32, schrieb Laurent Pointal: > I started a first translation of my document originally in french. Could > some fluent english people read it and indicate errors or bad english > expressions. Just one note up front: Languages or nationalities are written with uppercase letters, l

Re: How to exec() a string like interactive python does?

2012-06-06 Thread News123
On 06/06/2012 12:12 AM, News123 wrote: If I start Python in interactive mode, and I yype the commands, 'a=3', 'a', 'print a' Then the output would look like: >>> a = 3 >>> a 3 >>> print a 3 Now within an application I'd like to achieve exactly this behaviour Meaning, that - for assignments

Re: KeyError: '13'

2012-06-06 Thread Peter Otten
Phanindra Ramesh Challa wrote: > I am trying to run a python program. It is giving the KeyError: '13'. I > have no clue regarding this error. > this is the python code relevant to the error: > > dpi = 100 > bold = 0 > italic = 0 > mono = 0 > comment = "" > dbname = "font.db" > > for o, a in opt