Hi,
I am trying following script...
On Mon, Apr 5, 2010 at 1:33 PM, hiral wrote:
> Hi,
> I am trying following script...
>
>
On 04/05/10 00:05, r wrote:
However i have also considered that maybe *all* the "well knowns" are
in fact the many colorful personalities of Guido.
De vraag is dan natuurlijk of al zijn persoonlijkheden nog steeds
nederlands machtig zijn.
--
mph
--
http://mail.python.org/mailman/listinfo/
Hello.
I found several discussions where this question was asked, but was not
answered.
Now I am creating Python-API for my application, and want create it
with translation support, including documentation strings for modules,
classes, methods etc.
It is simple to translate special-marked string
I saw this posted in the July issue but did not see any follow-up there:
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 500
>>> b = 500
>>> a == b
True
>>> a is b
False
>>> p = 50
>>> q
Python caches objects for reuse, but I'm not too certain on how it works,
either. Seems a bit odd. I just tested on 2.6.5 and got the same result.
This hasn't been a problem for me, though.
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
Martin P. Hellwig wrote:
> On 04/05/10 00:05, r wrote:
>
>> However i have also considered that maybe *all* the "well knowns" are
>> in fact the many colorful personalities of Guido.
>>
>
>
> De vraag is dan natuurlijk of al zijn persoonlijkheden nog steeds
> nederlands machtig zijn.
>
Good so
Jason Friedman ha scritto:
I saw this posted in the July issue but did not see any follow-up there:
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
a = 500
b = 500
a == b
True
a is b
False
On Mon, 2010-04-05 at 11:38 +, Jason Friedman wrote:
> I saw this posted in the July issue but did not see any follow-up there:
>
> $ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
On Mon, 05 Apr 2010 13:48:15 +0200 News123 wrote:
> Martin P. Hellwig wrote:
> > On 04/05/10 00:05, r wrote:
> >
> >> However i have also considered that maybe *all* the "well knowns"
> >> are in fact the many colorful personalities of Guido.
> >>
> >
> >
> > De vraag is dan natuurlijk of al z
On 5-4-2010 13:48, superpollo wrote:
Jason Friedman ha scritto:
I saw this posted in the July issue but did not see any follow-up there:
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
a = 500
On 04/05/10 20:31, sapient wrote:
> Hello.
>
> I found several discussions where this question was asked, but was not
> answered.
Why would you want to translate docstring? Docstring is meant for
developers not users. Maintaining a translated docstring is going to be
a maintenance hell and will e
Jason Friedman wrote:
I saw this posted in the July issue but did not see any follow-up there:
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
a = 500
b = 500
a == b
True
a is
Dear all,
PEP 245 and 246 about interfaces for python are both rejected for
'something much better' (GvR in 246's rejection notice). Does anybody
know what this is? I am *very* curious!
Kind regards, Roald
--
http://mail.python.org/mailman/listinfo/python-list
All,
Thanks for all of the great solutions! Sorry I wasn't more specific
in my post and will keep that in mind for future posts. Just FYI I
was using a Windows machine and running Python 2.6.
Once again thanks for all of your help!
Gerad
--
http://mail.python.org/mailman/listinfo/python-list
Wolfman wrote:
Hello- was hoping someone could give me a hand in permanently setting
my TCL_LIBRARY and TK_LIBRARY.
I downloaded Python2.6 to a ThinkPad that came installed with
Python2.2, and I can not run IDLE as something automatically sets
TCL_LIBRARY and TK_LIBRARY to C:\IBMTools\Python22\
Thanks for the replies. The param style is pyformat. I've tried
using the '%s' style with a set and get exactly the same error.
c.execute('SELECT * FROM %s LIMIT 1',('mytable',))
psycopg2.ProgrammingError: syntax error at or near "E'mytable'"
LINE 1: SELECT * FROM E'mytable' LIMIT 1
MRAB and St
On Apr 4, 6:32 am, Simon Brunning wrote:
> On 3 April 2010 18:20, mcanjo wrote:
>
> > I tried doing the following code:
>
> > from subprocess import Popen
> > from subprocess import PIPE, STDOUT
> > exefile = Popen('pmm.exe', stdout = PIPE, stdin = PIPE, stderr =
> > STDOUT)
> > exefile.communica
On Apr 5, 4:40 pm, Roald de Vries wrote:
> Dear all,
>
> PEP 245 and 246 about interfaces for python are both rejected for
> 'something much better' (GvR in 246's rejection notice). Does anybody
> know what this is? I am *very* curious!
>
> Kind regards, Roald
Given that was in 2001, probably
On Apr 5, 11:22 am, mcanjo wrote:
> On Apr 4, 6:32 am, Simon Brunning wrote:
>
>
>
> > On 3 April 2010 18:20, mcanjo wrote:
>
> > > I tried doing the following code:
>
> > > from subprocess import Popen
> > > from subprocess import PIPE, STDOUT
> > > exefile = Popen('pmm.exe', stdout = PIPE, std
For a school project, I'm trying to make a minimalist web browser, and
I chose to use Tk as the rendering toolkit. I made my parser classes
into Tkinter canvases, so that I would only have to call pack and
mainloop functions in order to display the rendering. Right now, two
bugs are affecting the p
On 5 avr, 12:36, ejetzer wrote:
> For a school project, I'm trying to make a minimalist web browser, and
> I chose to use Tk as the rendering toolkit. I made my parser classes
> into Tkinter canvases, so that I would only have to call pack and
> mainloop functions in order to display the rendering
Alf P. Steinbach wrote:
Best is however to recognize that you have some state (your variable)
and some operations on that state (your callback), and that that is what
objects are all about. I.e. wrap your logic in a class. Then
'lastModifiedTime' becomes an instance attribute, and 'handler' be
hello,
AFAIK there's no case insensitive list in Python.
By case insentive I mean that that sort and memebr of is case insensitive.
Does soeone has a implementation of sucha case insensitive list ?
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-04-05 12:08 PM, John Nagle wrote:
Alf P. Steinbach wrote:
Best is however to recognize that you have some state (your variable)
and some operations on that state (your callback), and that that is
what objects are all about. I.e. wrap your logic in a class. Then
'lastModifiedTime' become
On 2010-04-05 12:17 PM, Stef Mientki wrote:
hello,
AFAIK there's no case insensitive list in Python.
By case insentive I mean that that sort and memebr of is case insensitive.
Does soeone has a implementation of sucha case insensitive list ?
mylist.sort(key=lambda x: x.lower())
any(x.lower()
> And now for the most import point: __getattr__ is only called as a
> *last* resort. That is, after the attribute lookup mechanism will have
> tried *and failed* to find the name in the instance's __dict__.
Thanks you all for all the suggestions and thoughts. So in other
words, this piece of cod
In <4bb802f7$0$8827$c3e8...@news.astraweb.com> Steven D'Aprano
writes:
>On Sat, 03 Apr 2010 22:58:43 +, kj wrote:
>> Suppose I have a function with the following signature:
>>
>> def spam(x, y, z):
>> # etc.
>>
>> Is there a way to refer, within the function, to all its arguments as a
On 2010-04-05 10:08:51 -0700, John Nagle said:
Yes. Functions with persistent state are generally a bad idea.
Unfortunately, the "signal" module requires a callback parameter
which is a plain function. So you have to send it a function,
closure, or lambda. Here, it's being sent a clos
Can you use dicts with string.Template?
e.g. a structure like:
game = {
'home': {'team': row['home_team_full'], 'score':
row['home_score'],
'record': '0-0', 'pitcher': {
'id': home_pitcher.attrib['id'], 'name':
home_pitcher.attrib['last_name'], 'wins': hom
Andreas Waldenburger wrote:
> On Mon, 05 Apr 2010 13:48:15 +0200 News123 wrote:
>
>> Martin P. Hellwig wrote:
>>> On 04/05/10 00:05, r wrote:
>>>
However i have also considered that maybe *all* the "well knowns"
are in fact the many colorful personalities of Guido.
>>>
>>>
>>> De
Wells Oliver wrote:
> Can you use dicts with string.Template?
>
> e.g. a structure like:
>
> game = {
> 'home': {'team': row['home_team_full'], 'score': row['home_score'],
> 'record': '0-0', 'pitcher': {
> 'id': home_pitcher.attrib['id'], 'name':
> home_pitcher.attrib['last_name'], 'wins': home_
On Mon, Apr 5, 2010 at 8:40 AM, Roald de Vries wrote:
> Dear all,
>
> PEP 245 and 246 about interfaces for python are both rejected for 'something
> much better' (GvR in 246's rejection notice). Does anybody know what this
> is? I am *very* curious!
Abstract Base Classes (ABCs) fulfill a similar
I'm trying to cut a BMP with 80 adjacent frames down to 40 using the
Image.copy and .paste functions but I'm getting error "ValueError:
images do not match" on the paste line.
Here is the source ---
import sys
from PIL import Image
if len(sys.argv) == 2:
file = sys.argv[1]
else:
p
> Another approach would be to stuff the static values in the function's
> __dict__.
That's how I did it when I wanted something similar.
I created this decorator:
def static(**kw):
'''
Used to create a decorator function that will add an
attribute to a function and initialize it.
"ADVERTISED JOBS IN TEXAS" "jobs in texas" "jobs in texas usa" "jobs
in texas houston" "jobs in texas city" "jobs in texas government"
"jobs in texas austin" "texas jobs" "texas jobs online" texas job
search" http://jobsintexas-usa.blogspot.com/ "ADVERTISED JOBS IN
TEXAS" "jobs in texas" "jobs in
Ethan Furman wrote:
Steven D'Aprano wrote:
On Fri, 02 Apr 2010 19:48:59 -0700, Ethan Furman wrote:
The heuristic I use is, if I expect the try block to raise an exception
more than about one time in ten, I change to an explicit test. In this
case, since the exception should only be raised onc
On Apr 5, 6:50 pm, Ethan Furman wrote:
(Posted some code with a timeit...)
Well, I'm not going to debug this, but with the *original* thing you
posted, and the thing I posted, with a call and everything (more
realistic scenario), the exception version seems slower on my machine:
#!/usr/bin/env
I want to show what commands have been executed when I run a python
script. Is there an option which can instruct python to print the
commands automatically?
(If you are familiar with R, what I am asking is essentially
options(echo=T) in R.)
--
Regards,
Peng
--
http://mail.python.org/mailman/li
On 04/06/10 02:38, ejetzer wrote:
> On 5 avr, 12:36, ejetzer wrote:
>> For a school project, I'm trying to make a minimalist web browser, and
>> I chose to use Tk as the rendering toolkit. I made my parser classes
>> into Tkinter canvases, so that I would only have to call pack and
>> mainloop fun
On 04/06/10 12:38, Peng Yu wrote:
> I want to show what commands have been executed when I run a python
> script. Is there an option which can instruct python to print the
> commands automatically?
>
> (If you are familiar with R, what I am asking is essentially
> options(echo=T) in R.)
>
It's n
You need a debugger here.
On Tue, Apr 6, 2010 at 8:41 AM, Lie Ryan wrote:
> On 04/06/10 12:38, Peng Yu wrote:
> > I want to show what commands have been executed when I run a python
> > script. Is there an option which can instruct python to print the
> > commands automatically?
> >
> > (If you
[Click the star to watch this topic] "ADVERTISED JOBS IN TEXAS"
"jobs in texas" "jobs in texas usa" "jobs in texas houston" "jobs in
texas city" "jobs in texas government" "jobs in texas austin" "texas
jobs" "texas jobs online" texas job search" http://jobsintexas-usa.blogspot.com/
[Click the s
On Apr 5, 11:49 am, kj wrote:
> In <4bb802f7$0$8827$c3e8...@news.astraweb.com> Steven D'Aprano
> writes:
>
> >On Sat, 03 Apr 2010 22:58:43 +, kj wrote:
> >> Suppose I have a function with the following signature:
>
> >> def spam(x, y, z):
> >> # etc.
>
> >> Is there a way to refer, withi
On 4 abr, 00:09, Steven D'Aprano wrote:
> On Sat, 03 Apr 2010 22:58:43 +, kj wrote:
> > Suppose I have a function with the following signature:
>
> > def spam(x, y, z):
> > # etc.
>
> > Is there a way to refer, within the function, to all its arguments as a
> > single list? (I.e. I'm look
On 4 abr, 00:09, Steven D'Aprano wrote:
> On Sat, 03 Apr 2010 22:58:43 +, kj wrote:
> > Suppose I have a function with the following signature:
> > def spam(x, y, z):
> > # etc.
> > Is there a way to refer, within the function, to all its arguments as a
> > single list? (I.e. I'm looking
This post gave me an idea:
http://groups.google.com/group/comp.lang.python/msg/5d75080707104b76
What if I write a simple decorator to figure out the types of every
function, and then we use it as a base for a simple method-jit
compiler for python?
example:
def typer(f):
def wrap(*args):
2010/4/5 Luis M. González :
> This post gave me an idea:
> http://groups.google.com/group/comp.lang.python/msg/5d75080707104b76
>
> What if I write a simple decorator to figure out the types of every
> function, and then we use it as a base for a simple method-jit
> compiler for python?
>
> exampl
48 matches
Mail list logo