On Thu, 03 Mar 2011 06:19:41 -0800, Westley Martínez wrote:
> On Wed, 2011-03-02 at 19:45 -0800, Yingjie Lan wrote:
>> Hi everyone,
>>
>> Variables in Python are resolved dynamically at runtime, which comes at
>> a performance cost. However, a lot of times we don't need that feature.
>> Variables
On Thu, 03 Mar 2011 08:52:16 -0800, Rafe Kettler wrote:
>> Finally, Python 3 introduced type annotations, which are currently a
>> feature looking for a reason.
>
> By type annotations, do you mean function annotations (see PEP 3107,
> http://www.python.org/dev/peps/pep-3107/)? Or is this some ot
http://www.nga.gov/search/index.shtm
http://deyoung.famsf.org/search-collections
etc
Seems they all offer search only by keywords and this kind.
What about to submit e.g. roses2.jpg (copy) and to find its
original? Assume we don't know its author neither its title
--
http://mail.python.org/mailman
On Mar 5, 7:46 pm, Corey Richardson wrote:
> On 03/05/2011 10:23 PM, MRAB wrote:
>
> > Having a fixed binding could be useful elsewhere, for example, with
> > function definitions:
> > [..]
> > fixed PI = 3.1415926535897932384626433832795028841971693993751
>
> > fixed def squared(x):
> >
On Mar 6, 6:10 am, Mel wrote:
> n00m wrote:
> > As for using color info...
> > my current strong opinion is: the colors must be forgot for good.
> > Paradoxically but "profound" elaboration and detailization can/will
> > spoil/undermine the whole thing. Just my current imo.
>
> Yeah. I guess incl
Shouldn't this go to python-ideas?
Anyway, I'm partial to "static".
~/santa
On Sat, Mar 5, 2011 at 8:33 PM, Westley Martínez wrote:
> On Sat, 2011-03-05 at 18:37 -0800, John Nagle wrote:
> > On 3/2/2011 9:27 PM, Steven D'Aprano wrote:
> > > On Wed, 02 Mar 2011 19:45:16 -0800, Yingjie Lan wrot
On 3/5/2011 7:46 PM, Corey Richardson wrote:
On 03/05/2011 10:23 PM, MRAB wrote:
Having a fixed binding could be useful elsewhere, for example, with
function definitions:
[..]
fixed PI = 3.1415926535897932384626433832795028841971693993751
fixed def squared(x):
return x * x
On Sat, 2011-03-05 at 18:37 -0800, John Nagle wrote:
> On 3/2/2011 9:27 PM, Steven D'Aprano wrote:
> > On Wed, 02 Mar 2011 19:45:16 -0800, Yingjie Lan wrote:
> >
> >> Hi everyone,
> >>
> >> Variables in Python are resolved dynamically at runtime, which comes at
> >> a performance cost. However, a l
n00m wrote:
> As for using color info...
> my current strong opinion is: the colors must be forgot for good.
> Paradoxically but "profound" elaboration and detailization can/will
> spoil/undermine the whole thing. Just my current imo.
Yeah. I guess including color info cubes the complexity of th
A function object can get bound to a name, too:
def foo(x):
return x + 1
foo = lambda x: x - 1
assert foo(1) == 0
~/santa
On Sat, Mar 5, 2011 at 7:46 PM, Corey Richardson wrote:
> On 03/05/2011 10:23 PM, MRAB wrote:
> > Having a fixed binding could be useful elsewhere, for example, with
On 03/05/2011 10:23 PM, MRAB wrote:
> Having a fixed binding could be useful elsewhere, for example, with
> function definitions:
> [..]
> fixed PI = 3.1415926535897932384626433832795028841971693993751
>
> fixed def squared(x):
> return x * x
This question spawns from my ignora
On 06/03/2011 02:37, John Nagle wrote:
On 3/2/2011 9:27 PM, Steven D'Aprano wrote:
On Wed, 02 Mar 2011 19:45:16 -0800, Yingjie Lan wrote:
Hi everyone,
Variables in Python are resolved dynamically at runtime, which comes at
a performance cost. However, a lot of times we don't need that feature
> It's worth having some syntax for constants. I'd suggest
>using "let":
>let PI = 3.1415926535897932384626433832795028841971693993751
in to many languages, let is just a setter. why not just const pye = 3.14...
--
http://mail.python.org/mailman/listinfo/python-list
>ourEmail = '
myemaila...@gmail.com'
>ourEmail = '
q...@xxx.com'
You redefine this twice. You also don't define a variable down lower.
># to_address = ourEmail,
> from_address = ourEmail,
> to_address = emailText,
I could be wrong, but emailText isn't defined. Perhaps a better var
On 3/2/2011 9:27 PM, Steven D'Aprano wrote:
On Wed, 02 Mar 2011 19:45:16 -0800, Yingjie Lan wrote:
Hi everyone,
Variables in Python are resolved dynamically at runtime, which comes at
a performance cost. However, a lot of times we don't need that feature.
Variables can be determined at compile
One popular idea, for the christian louboutin salesfood family style.
In this type of party, all of the food is put on the table, in large
record transfer, rather than focusing on a waiter to all guest
personal plate of food. Family style service cannot be frowsty than
traditional plating dinners,
Hi;
I have this code:
#!/usr/bin/python
import sys, os, string
import cgitb; cgitb.enable()
import cgi
cwd = os.getcwd()
dirs = string.split(cwd, '/')
dirs = dirs[1:-1]
backLevel = '/' + string.join(dirs, '/')
sys.path.append(cwd)
sys.path.append(backLevel)
import string
form = cgi.FieldStorage()
BartC wrote:
I got the impression the OP was talking about simply pinning down
certain variables, so that a runtime name lookup (if that's in fact what
Python does) was not necessary.
A problem with this is that lexical name lookups are a
relatively small proportion of the looking up that goe
Martin v. Löwis wrote:
Whether a GUI library is application programming or systems programming,
I don't know.
Neither do I, but it doesn't really matter. In my case the
string is definitely text (although it will always be ascii)
and therefore unicode is the right representation to use
in 3.x.
On 3/5/2011 12:05 PM, Paul Rubin wrote:
Ravi writes:
I can extend dictionary to allow for the my own special look-up
tables. However now I want to be able to define multidimensional
dictionary which supports look-up like this:
d[1]['abc'][40] = 'dummy'
Why do that anyway? You can use a tupl
> Next time you need to extract some data from an xml file, please (for
> your own good) don't do whatever you did in that code -- note that the
> unicode equivalent of "<" is u"\u003c", NOT u"\u3c00"; I wasn't joking
> when I said it had been FU.
Is that perhaps the doing of going from littleEnd
On 3/5/2011 1:21 PM, tkp...@hotmail.com wrote:
Thanks for the pointer. Yes, it is a text file, but the mystery runs
deeper: I later found that it works perfectly as written when I run it
from IDLE or the Python shell, but it fails reliably when I run it
from PyScripter 2.4.1 (an open source Pytho
On 3/5/2011 10:21 AM, tkp...@hotmail.com wrote:
Question: how do I use f.tell() to
identify if an offset is legal or illegal?
Read backwards in binary mode, byte by byte,
until you reach a byte which is, in binary, either
0xxx
11xx
You are then at the beginning of a
Ravi writes:
> I can extend dictionary to allow for the my own special look-up
> tables. However now I want to be able to define multidimensional
> dictionary which supports look-up like this:
>
> d[1]['abc'][40] = 'dummy'
Why do that anyway? You can use a tuple as a subscript:
d[1,'abc',40]
On Sat, Mar 5, 2011 at 3:49 AM, ErichCart ErichCart wrote:
> Visual Python seems to be exactly what I want. But it doesn't seem
> very popular. Perhaps it means that there are not many people who will
> be able to help if I have problems with it. Also judging by the amount
> of ads at visualpython
Grumman wrote:
> On 3/4/2011 16:48, ErichCart ErichCart wrote:
>>
>> In fact this doesn't necessary need to be web application. For
>> example I have a friend who uses Delphi, and he can create all
>> sorts of windows applications easily, like he can see the window
>> on the screen and he can plac
PS
For some reason they don't update the link to the last version.
It's _20110306, here: http://sourceforge.net/projects/imsim/files/
I use Python 2.5 & PIL for Python 2.5
--
http://mail.python.org/mailman/listinfo/python-list
>
> Is it better than this?
> - scale each image to 100x100
> - go black&white in such a way that half the pixels are black
> - XOR the images and count the mismatches
It's *much* better but I'm not *much* about to prove it.
> I'm sure there are better,
> well-known algorithms.
The best well
Thanks for the pointer. Yes, it is a text file, but the mystery runs
deeper: I later found that it works perfectly as written when I run it
from IDLE or the Python shell, but it fails reliably when I run it
from PyScripter 2.4.1 (an open source Python IDE)! So I suspect
there's a PyScripter issue l
On Sat, 2011-03-05, Grigory Javadyan wrote:
> At least you could've tried to make the script more usable by adding
> the possibility to supply command line arguments, instead of editing
> the source every time you want to compare a couple of images.
>
> On Sat, Mar 5, 2011 at 11:23 AM, n00m wrote:
Ravi wrote:
> I found a solution here:
>
> http://parand.com/say/index.php/2007/07/13/simple-multi-dimensional-
dictionaries-in-python/
>
> Please tell how good is it?
Follow the link to the cookbook and read Andrew Dalke's comment ;)
To spell it out:
>>> class D(dict):
... def __missing_
I found a solution here:
http://parand.com/say/index.php/2007/07/13/simple-multi-dimensional-dictionaries-in-python/
Please tell how good is it?
--
http://mail.python.org/mailman/listinfo/python-list
I can extend dictionary to allow for the my own special look-up tables. However
now I want to be able to define multidimensional dictionary which supports
look-up like this:
d[1]['abc'][40] = 'dummy'
and if d[1] and d[1][abc] raise KeyError just create them.
for d[1] I can override __getitem__
On Mar 5, 7:10 pm, Mel wrote:
> n00m wrote:
>
> > I uploaded a new version of the subject with a
> > VERY MINOR correction in it. Namely, in line #55:
>
> > print '%12s %7.2f' % (db[k][1], db[k][0] / 3600.0,)
>
> > instead of
>
> > print '%12s %7.2f' % (db[k][1], db[k][0] * 0.001,)
>
> > I
n00m wrote:
>
> I uploaded a new version of the subject with a
> VERY MINOR correction in it. Namely, in line #55:
>
> print '%12s %7.2f' % (db[k][1], db[k][0] / 3600.0,)
>
> instead of
>
> print '%12s %7.2f' % (db[k][1], db[k][0] * 0.001,)
>
> I.e. I normalized it to base = 100.
> No
I uploaded a new version of the subject with a
VERY MINOR correction in it. Namely, in line #55:
print '%12s %7.2f' % (db[k][1], db[k][0] / 3600.0,)
instead of
print '%12s %7.2f' % (db[k][1], db[k][0] * 0.001,)
I.e. I normalized it to base = 100.
Now the values of similarity can't be g
On Mar 5, 6:49 am, ErichCart ErichCart wrote:
> Regarding Boa constructor, it is very old, isn't it? The latest news
> from this project date to the end of 2006. I don't expect it to
> support python 3 any time soon.
The website is incredibly out of date, but the last major update was
July 2007.
>In article <20110304161955.LI5T1.94538.root at cdptpa-web16-z02>,
> wrote:
>> Is anyone here using the Python XMP Toolkit? I'm trying to install
>> this and having problems.
>>
> I have no experience with either but I would guess that the two
> configure options are for building with Boost
On 03/05/2011 06:49 AM, ErichCart ErichCart wrote:
> So, "Glade", is this what everybody uses? I mean programmers don't
> just use text editors to make GUI applications, do they?
I usually see people using Qt and QtDesigner over Gtk and Glade. And
actually, yes, I'm sure lots of people besides me
Thank you for your answer Frank, I think I've found the problem. I was
calling modules from inside subpackages, and I need to use them from
outside, so I have package in PYTHONPATH. is that correct? But now I have
another question: Can I execute an script inside subpackage1 importig
modules from su
In article ,
Dotan Cohen wrote:
>You miss the canonical bad character reuse case: = vs ==.
>
>Had there been more meta keys, it might be nice to have a symbol for
>each key on the keyboard. I personally have experimented with putting
>the symbols as regular keys and the numbers as the Shifted ver
sathe...@e-ndicus.com wrote:
>I am using python's reportlab to print some unicode Tamil characters
> 'பே'. I added necessary unicode font to reportlab. But It
> prints the output as 'ேப' (in reverse order). This issue
> happens for multi-byte characters, whereas for character 'ப' is
> printed a
Visual Python seems to be exactly what I want. But it doesn't seem
very popular. Perhaps it means that there are not many people who will
be able to help if I have problems with it. Also judging by the amount
of ads at visualpython.org, it also doesn't seem very serious.
I looked into pyGTK, and I
On Mar 5, 8:57 am, JT wrote:
> On Mar 4, 9:30 pm, John Machin wrote:
>
> > Your data has been FUABARred (the first A being for Almost) -- the
> > "\u3c00" and "\u3e00" were once "<" and ">" respectively. You will
>
> Hi John,
>
> I realized that a few minutes after posting. I then realized th
On Mar 1, 3:40 pm, Chris Jones wrote:
> At first it looks like something MS (Morgan Stanley..) dumped into the
> OSS lap fifteen years ago and nobody ever used it or maintained it.. so
> it takes a bit of digging to make it.. sort of work in current GNU/linux
> distributions.. especially since it
Got it.
After putting commas, it works (The 'o' was a mistake when I posted,
sorry about it ).
Thanks to all of you :)
On Mar 5, 5:12 pm, Dennis Lee Bieber wrote:
> On Fri, 4 Mar 2011 20:08:21 -0800 (PST), Vincent Ren
> declaimed the following in
> gmane.comp.python.general:
>
> > Hello, every
On Mar 4, 6:40 pm, nn wrote:
> On Mar 4, 7:32 am, "Frank Millman" wrote:
>
> > Hi all
>
> > I want to create a cookie containing a session id. In python 2.6 I had the
> > following -
>
> > from __future__ import unicode_literals
> > session_id = b64encode(urandom(20))
> > response_headers.append(
At least you could've tried to make the script more usable by adding
the possibility to supply command line arguments, instead of editing
the source every time you want to compare a couple of images.
On Sat, Mar 5, 2011 at 11:23 AM, n00m wrote:
> Let me present my newborn project (in Python) ImSi
48 matches
Mail list logo