Raymond Hettinger writes:
> I'm considering a nested mapping class for the collections module and
> would like to solicit feedback from people here on comp.lang.python:
>
>
> http://code.activestate.com/recipes/577434-nested-contexts-a-chain-of-mapping-objects/
>
Django has such contexts in
Announcing
--
The 2.9.1.1 release of wxPython is now available for download at
http://wxpython.org/download.php. This is the first official release
in the 2.9 development release series. There are lots and lots of new
widgets and other awesome stuff that have been added since the 2.8
se
Dear All,
It will be very kind of you, if you can let me know (Or point to some
links), how to use HASP Hardware Lock using Python ?
I am trying to handle Hardware Lock authentication for our project, but cant
find any clear cut solution.
I am using python 2.5 on windows XP platform.
With Warm R
On 10/21/2010 7:55 PM, Baba wrote:
the bit i'm having difficulties with in constructing my loops is:
"whose small sides are no larger than n"
from math import sqrt
def py_trips(n):
for b in range(4,n+1):
for a in range(3,b+1):
cf = sqrt(a*a+b*b)
c = int(cf)
if c == cf
http://www.mail-archive.com/python-list@python.org/msg175722.html
hello could you remove above post... off topic and spam
thank you --
http://mail.python.org/mailman/listinfo/python-list
On Thu, 21 Oct 2010 19:53:53 -0700 John Nagle wrote:
> On 10/21/2010 2:51 PM, Chris Rebert wrote:
> > On Thu, Oct 21, 2010 at 2:36 PM, Sean Choi wrote:
> >> I found two similar questions in the mailing list, but I didn't
> >> understand the explanations.
> >> I ran this code on Ubuntu 10.04 with
On 10/21/2010 2:51 PM, Chris Rebert wrote:
On Thu, Oct 21, 2010 at 2:36 PM, Sean Choi wrote:
I found two similar questions in the mailing list, but I didn't understand
the explanations.
I ran this code on Ubuntu 10.04 with Python 2.6.5.
Why do the functions g and behave differently? If cal
On 2010-10-22, chad wrote:
> Let's say there is a site that uses javascript to generate menus. More
> or less what happens is when a person clicks on url, a pop up menu
> appears asking the users for some data. How would I go about
> automating this? Just curious because the web spider doesn't act
Let's say there is a site that uses javascript to generate menus. More
or less what happens is when a person clicks on url, a pop up menu
appears asking the users for some data. How would I go about
automating this? Just curious because the web spider doesn't actually
pick up the urls that generate
Additional income resources - Fresher or experience candidate can grow
career
http://managementjobs.webs.com/pm.htm
Get careers in Management work. Careers recruitments.
http://topcareer.webs.com/businessmanagement.htm
Work from home genuine bulk data entry, home and government jobs
sources.
http
Raymond Hettinger writes:
> The c.parent.parent.parent chain finds successive enclosing contexts:
I was asking about finding the child contexts, not the parents. This is
analogous to how you can find the keys in a dict with dict.keys().
>> One question: what should
>>
>> c["foo"] = 7
>> d
On Oct 21, 5:18 pm, Paul Rubin wrote:
> The API you suggested looks reasonable although you should also say how
> to delete a context, how to find the inner contexts of a context, etc.
The c.parent.parent.parent chain finds successive enclosing contexts:
while c.parent is not None:
pri
Raymond Hettinger writes:
> Hopefully, that discussion can be in a separate thread.
> This is really about keeping all the nice O(1) characteristics
> of dicts and keeping their straight-forward API while adding
> the ability to support nested lookups.
Are you saying the O(1) characteristics are
On Oct 21, 10:18 pm, Terry Reedy wrote:
> On 10/21/2010 6:55 AM, Baba wrote:
>
> > Hi everyone
>
> > i need a hint regarding the following exercise question:
>
> > "Write a program that generates all Pythagorean triples whose small
> > sides are no larger than n.
>
> This is not well worded. I tak
On Oct 21, 4:28 pm, Paul Rubin wrote:
> Raymond Hettinger writes:
> What I really want is a Haskell-like persistent (i.e. purely functional)
> dictionary implemented as an AVL tree or something like that.
Hopefully, that discussion can be in a separate thread.
This is really about keeping all th
Raymond Hettinger writes:
> I would appreciate any feedback on the API and on how well it fits
> with various use cases that you've found in the wild.
What I really want is a Haskell-like persistent (i.e. purely functional)
dictionary implemented as an AVL tree or something like that. It means
t
I'm considering a nested mapping class for the collections module and
would like to solicit feedback from people here on comp.lang.python:
http://code.activestate.com/recipes/577434-nested-contexts-a-chain-of-mapping-objects/
The class is an attempt to generalize from existing use cases (i.e.
On 21/10/2010 21:05, Todd Walter wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 17:03:58 +0100
MRAB wrote:
On 21/10/2010 15:57, Todd Walter wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 00:07:58 +0100
MRAB wrote:
[snip]
The docs fo
I notice sometimes when I follow a thread on the mailing list archives, the
thread will not be all together. To see what I mean, look at the thread
"splitting comp.lang.python" as shown here:
http://mail.python.org/pipermail/python-list/2000-March/thread.html#639685.
You can see one large chunk of
On Wed, 20 Oct 2010 16:18:57 +, kj wrote:
> I tried to fix the problem by applying the equivalent of "stty -echo"
> within a python interactive session, but discovered that this setting is
> immediately (and silently) overwritten.
FWIW, I don't see this behaviour with Python 2.6.5 on Linux. I
On Thu, Oct 21, 2010 at 2:36 PM, Sean Choi wrote:
> I found two similar questions in the mailing list, but I didn't understand
> the explanations.
> I ran this code on Ubuntu 10.04 with Python 2.6.5.
> Why do the functions g and behave differently? If calls (3) and
> g(3) both exit their
just sending out a late thank you for the response
--
http://mail.python.org/mailman/listinfo/python-list
I found two similar questions in the mailing list, but I didn't understand
the explanations.
I ran this code on Ubuntu 10.04 with Python 2.6.5.
Why do the functions g and behave differently? If calls (3) and
g(3) both exit their functions in the same state, why do they not enter in
the s
On 10/21/2010 6:55 AM, Baba wrote:
Hi everyone
i need a hint regarding the following exercise question:
"Write a program that generates all Pythagorean triples whose small
sides are no larger than n.
This is not well worded. I take 'small sides' (plural) to mean the two
smaller, non-hypotenu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 17:03:58 +0100
MRAB wrote:
> On 21/10/2010 15:57, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 00:07:58 +0100
> > MRAB wrote:
> >
> >>>
> >> [snip]
> >>
> >> The docs for 's
dmytro starosud writes:
> Hello,
> I'm Python beginner (from Ukraine).
> I may have found the way to really hide attributes in Python class.
> The whole control on this attribute is implemented inside of the
> class.
> *(code is below, Python 3)
> You see that we can't get the reference to instan
Thanks for answer,
Attribute accessing inside the class is implemented by getters and
setters: "min_set", "min_get", "max_set" and "max_get".
You can put your logic to this functions and parameter "prop" is the
direct reference to this property.
I can create a "really read-only attribute", and oth
On 10/21/10 2:12 PM, Brendan wrote:
On Oct 21, 3:56 pm, Ethan Furman wrote:
Jonas H. wrote:
On 10/21/2010 08:09 PM, Brendan wrote:
Two modules:
x.py:
class x(object):
pass
y.py:
from x import x
class y(x):
pass
Now from the python command line:
import y
dir(y)
['__builtins
On Oct 21, 11:53 am, Brendan wrote:
> On Oct 21, 3:47 pm, Carl Banks wrote:
> > On Oct 21, 11:09 am, Brendan wrote:
>
> > > Two modules:
> > > x.py:
> > > class x(object):
> > > pass
>
> > > y.py:
> > > from x import x
> > > class y(x):
> > > pass
>
> > > Now from the python command line
On Oct 21, 3:56 pm, Ethan Furman wrote:
> Jonas H. wrote:
> > On 10/21/2010 08:09 PM, Brendan wrote:
> >> Two modules:
> >> x.py:
> >> class x(object):
> >> pass
>
> >> y.py:
> >> from x import x
> >> class y(x):
> >> pass
>
> >> Now from the python command line:
> > import y
> >
On Oct 21, 12:53 pm, Brendan wrote:
> So it must never make sense to put subclasses in separate modules?
It doesn't matter to Python whether the subclass is in the same module
or imported. Do it whichever way makes the most sense to you from a
code organization perspective.
--
http://mail.pytho
Steven D'Aprano writes:
> On Thu, 21 Oct 2010 11:37:36 +0200, Jean-Michel Pichavant wrote:
> By the way:
>
>> xCoordinate, yCoordinate, zCoordinate = polygon.nextPointCoordinates()
>
> Coordinates are pairs or triples of *ordinates* (no "co"). You can't have
> an "x coordinate" -- that would be
On 10/21/10 1:53 PM, Brendan wrote:
On Oct 21, 3:47 pm, Carl Banks wrote:
On Oct 21, 11:09 am, Brendan wrote:
Two modules:
x.py:
class x(object):
pass
y.py:
from x import x
class y(x):
pass
Now from the python command line:>>> import y
dir(y)
['__builtins__', '__doc_
On Thu, Oct 21, 2010 at 11:53 AM, Brendan wrote:
> On Oct 21, 3:47 pm, Carl Banks wrote:
>> On Oct 21, 11:09 am, Brendan wrote:
>> > Two modules:
>> > x.py:
>> > class x(object):
>> > pass
>>
>> > y.py:
>> > from x import x
>> > class y(x):
>> > pass
>>
>> > Now from the python command l
In Lawrence D'Oliveiro
writes:
>In message , kj wrote:
>> I tried to fix the problem by applying the equivalent of "stty
>> -echo" within a python interactive session, but discovered that
>> this setting is immediately (and silently) overwritten.
>That seems reasonable behaviour; the command
Jonas H. wrote:
On 10/21/2010 08:09 PM, Brendan wrote:
Two modules:
x.py:
class x(object):
pass
y.py:
from x import x
class y(x):
pass
Now from the python command line:
import y
dir(y)
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'x', 'y']
I do not understand
On Oct 21, 3:47 pm, Carl Banks wrote:
> On Oct 21, 11:09 am, Brendan wrote:
>
>
>
>
>
> > Two modules:
> > x.py:
> > class x(object):
> > pass
>
> > y.py:
> > from x import x
> > class y(x):
> > pass
>
> > Now from the python command line:>>> import y
> > >>> dir(y)
>
> > ['__builtins__',
On Oct 21, 11:09 am, Brendan wrote:
> Two modules:
> x.py:
> class x(object):
> pass
>
> y.py:
> from x import x
> class y(x):
> pass
>
> Now from the python command line:>>> import y
> >>> dir(y)
>
> ['__builtins__', '__doc__', '__file__', '__name__', '__package__',
> 'x', 'y']
>
> I do n
Florian Weimer wrote:
Are there libraries which implement some form of spreadsheet-style
dependency tracking?
The first that come to mind (I have very limited experience with them):
trellis http://peak.telecommunity.com/DevCenter/Trellis
pycells http://pycells.pdxcb.net/
Best regards,
Stefaa
On Oct 21, 9:49 am, dmytro starosud wrote:
> Hello,
> I'm Python beginner (from Ukraine).
> I may have found the way to really hide attributes in Python class.
> The whole control on this attribute is implemented inside of the
> class.
> *(code is below, Python 3)
> You see that we can't get the r
On 10/21/2010 08:09 PM, Brendan wrote:
Two modules:
x.py:
class x(object):
pass
y.py:
from x import x
class y(x):
pass
Now from the python command line:
import y
dir(y)
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'x', 'y']
I do not understand why class 'x' sh
On 2010-10-21, Jean-Michel Pichavant wrote:
> It can be short if descriptive:
> for o, c in cars:
> park(o)
> phone(c)
> for owner, car in cars: # by just using meaningful names you give the
> info to the reader that you expect cars to be a list of tuple (owner, car)
> park(owner)
>
On 2010-10-21, Jean-Michel Pichavant wrote:
> Let me quote the paper I linked in the previous post:
>
> list1 = []
> for x in theList:
> if x[0] == 4:
> list1 += x;
> return list1
>
> compare it to:
>
> flaggedCells = []
> for cell in theBoard:
> if cell[STATUS_VALUE] == FLAGGED:
Two modules:
x.py:
class x(object):
pass
y.py:
from x import x
class y(x):
pass
Now from the python command line:
>>> import y
>>> dir(y)
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'x', 'y']
I do not understand why class 'x' shows up here.
--
http://mail.python.o
On 2010-10-21, Jean-Michel Pichavant wrote:
> In the middle of thousand lines of code, when you are reviewing or
> debugging, the later is better TMO, the point is that x, y, z = is only
> easy to read during the assignement.
Bull.
> x, y, z = p.nextpoint()
> [snip a dozen of code line]
> ...
On 2010-10-21, Martin P. Hellwig wrote:
> Although intuitively I would say the shorthand, however that is
> depending on the context being me knowing at least the basics of 3d
> spaces and having the pre-warning that you are going to mention
> something with either coordinates or colours.
> Ta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 17:03:58 +0100
MRAB wrote:
> On 21/10/2010 15:57, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 00:07:58 +0100
> > MRAB wrote:
> >
> >>>
> >> [snip]
> >>
> >> The docs for 's
Hello,
I'm Python beginner (from Ukraine).
I may have found the way to really hide attributes in Python class.
The whole control on this attribute is implemented inside of the
class.
*(code is below, Python 3)
You see that we can't get the reference to instance of class
"en_property" outside the cl
On 10/20/2010 9:32 PM, Phlip wrote:
Not Hyp:
def _scrunch(**dict):
result = {}
for key, value in dict.items():
if value is not None: result[key] = value
return result
That says "throw away every item in a dict if the Value is None".
Are there any tighter or smarmier
Am 20.10.2010 14:32, schrieb Justin Ezequiel:
> On Oct 20, 12:47 am, Johannes Bauer wrote:
>>
> from urllib import request; request.URLopener().open("http://google.de";)
>
> aren't you supposed to call read on the return value of open?
> i.e.,
> request.URLopener().open("http://google.de";).re
On 21/10/2010 15:57, Todd Walter wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 00:07:58 +0100
MRAB wrote:
[snip]
The docs for 'sendto' say:
"""The socket should not be connected to a remote socket, since
the destination socket is specified by address."""
On Thu, 21 Oct 2010 02:34:15 -0700, Jon Clements wrote:
> I'm after something that says: "I want 512mb of physical RAM, I don't
> want you to page/swap it, if you can't do that, don't bother at all".
> Now I'm guessing, that an OS might be able to grant that, but later on
> have to kill the proces
On 2010-10-21, Jean-Michel Pichavant wrote:
> So If I get you right, because comments can lie, we should stop
> using comments?
No, but use comment judiciously. Kernighan and Pike (_The
Practice of Programming_) recommend writing your code to require
as little comment as possible. They provide ty
Richard Gibbs wrote:
> If my python script is called with stdout (or stdin or stderr)
> redirected to a file, how can I find the filename under Linux? Under
> Windows?
On Linux, you can read the /proc/self/fd/* symlinks, e.g.:
stdin_filename = os.readlink('/proc/self/fd/0')
This isn't
Mel wrote:
Steven D'Aprano wrote:
On Thu, 21 Oct 2010 12:49:47 +, Neil Cerutti wrote:
_The Practice of Programming_ has this right. In general the bigger the
scope of a variable, the longer and more descriptive should be its name.
In a small scope, a big name is mostly noise.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 00:07:58 +0100
MRAB wrote:
> >
> [snip]
>
> The docs for 'sendto' say:
>
> """The socket should not be connected to a remote socket, since
> the destination socket is specified by address."""
>
> Could your problem be caus
What you want is to realize that all integer Pythagorean triples can be
generated by a pair of integers, (i,j), j < i. The values are just (* =
multiply, ^ = exponentiation)
a = 2*i*j
b = i^2 - j^2
c = i^2 + j^2 (hypotenuse)
So yes indeed a^2 + b^2 = c^2. This is a very ancient result, btw and
Steven D'Aprano wrote:
> On Thu, 21 Oct 2010 12:49:47 +, Neil Cerutti wrote:
>
>> _The Practice of Programming_ has this right. In general the bigger the
>> scope of a variable, the longer and more descriptive should be its name.
>> In a small scope, a big name is mostly noise.
>
> Thank you
Joost Molenaar writes:
> Using a 2.7/3.x dictionary comprehension, since you don't seem to mind
> creating a new dictionary:
>
> def _scrunched(d):
> return { key: value for (key, value) in d.items() if value is not None }
Note that a dict comprehension, while convenient, is not necessary fo
You
won't be that happy everyone wrote their mail in this list like a mobile
text message, if u c what I mean.
I never suggested that. What I am trying to get across is that long names
are not automatically better than short names, and even one letter names
can be as good or better than
Hi all,
I'm working with glite grid middleware. This is the server-side
program which allows to calculate exe or sh files using languages like
python, c++ and so on.
No matter, my question is following: I need to make my python script
executable to be able to run it under the glite. I have found
Kelson Zawack writes:
> Since an iterator having an end is not actually an exceptional case...
There's no requirement on iterators to be finite, so in a sense it is.
In general it may be impractical to know whether an iterator has reached
the end without calling next().
--
http://mail.python
> for k in [k for k, v in d.items() if v is None]:
> del d[k]
Tx everyone!
And I forgot about shadowing dict(), I forgot about del d[k], and I
didn't know Python had "dict comprehensions" yet.
Anyway this one might become the winner.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 21 Oct 2010 11:27:57 +0200, Jean-Michel Pichavant wrote:
> There is another important point: the time where code size matters is
> over.
That's ridiculous. Which would you rather write?
import os
if os.path.exists("myfile"):
print open("myfile").read()
or this?
import the modul
On Thu, 21 Oct 2010 12:49:47 +, Neil Cerutti wrote:
> _The Practice of Programming_ has this right. In general the bigger the
> scope of a variable, the longer and more descriptive should be its name.
> In a small scope, a big name is mostly noise.
Thank you! The scope of the variable is an i
On Thu, 21 Oct 2010 11:37:36 +0200, Jean-Michel Pichavant wrote:
> In the middle of thousand lines of code,
If you have a function that is a thousand lines of code long, I don't
care what you name the variables, you won't be able to keep it straight
in your head.
This is one of the reasons wh
On Oct 19, 9:02 pm, Tobiah wrote:
> I've been reading about the Unicode today.
> I'm only vaguely understanding what it is
> and how it works.
>
...
> Thanks,
>
> Tobiah
Hi,
A good advice,
read this presentation,
http://farmdev.com/talks/unicode/
Explanation and advices for coding.
Olivier
--
On 2010-10-21, Jean-Michel Pichavant wrote:
> In the middle of thousand lines of code, when you are reviewing
> or debugging, the later is better TMO, the point is that x, y,
> z = is only easy to read during the assignement. Consider this:
>
> x, y, z = p.nextpoint()
> [snip a dozen of code line]
On 2010-10-21, James Mills wrote:
> Rather than creating a new dict why don't you just do:
>
> def _scrunch(d):
>for k, v in d.items():
> if v is None:
> del d[k]
In Python 3, where items returns an iterator, modifying the
dictionary in this way may lead to cirrhossis of the di
Using a 2.7/3.x dictionary comprehension, since you don't seem to mind
creating a new dictionary:
def _scrunched(d):
return { key: value for (key, value) in d.items() if value is not None }
Joost
On 21 October 2010 06:32, Phlip wrote:
>
> Not Hyp:
>
> def _scrunch(**dict):
> result = {}
On Thu, 21 Oct 2010 19:08:00 +0800, Kelson Zawack wrote:
> I have been programing in python for a while now and by in large love
> it. One thing I don't love though is that as far as I know iterators
> have no has_next type functionality. As a result if I want to iterate
> until an element that
Jon Clements writes:
> Is there a cross-platform way using Python to guarantee that an object
> will never be swapped/paged to disk? I'll be honest and say I'm really
> not sure if this is a particular language question or rather specific
> to an OS.
>
> Under linux it appears I could create a r
On Thu, 21 Oct 2010 09:36:41 -0200, Felipe Bastos Nunes wrote:
> Looking in the documentation, only the StopIteration raises. I'd like a
> hasNext() too. I'll see if it is easy to implement,
Iterators can be unpredictable. In general, you can't tell whether an
iterator is finished or not until
On 10/21/10, Baba wrote:
> Hi everyone
>
> i need a hint regarding the following exercise question:
>
> "Write a program that generates all Pythagorean triples whose small
> sides are no larger than n.
> Try it with n <= 200."
>
> what is "n" ? i am guessing that it is a way to give a bound to the
Kelson Zawack writes:
> […] if I want to iterate until an element that might or might not be
> present is found I either wrap the while loop in a try block or break
> out of a for loop.
I'm not sure what exception you would catch, but that could be a good
solution.
The general solution would b
Looking in the documentation, only the StopIteration raises. I'd like
a hasNext() too. I'll see if it is easy to implement, but maybe it'sn
ot yet there coz for does the work greatly.
2010/10/21, Kelson Zawack :
> I have been programing in python for a while now and by in large love
> it. One thi
I have been programing in python for a while now and by in large love
it. One thing I don't love though is that as far as I know iterators
have no has_next type functionality. As a result if I want to iterate
until an element that might or might not be present is found I either
wrap the while
Hi everyone
i need a hint regarding the following exercise question:
"Write a program that generates all Pythagorean triples whose small
sides are no larger than n.
Try it with n <= 200."
what is "n" ? i am guessing that it is a way to give a bound to the
triples to be returned but i can't figur
Hi everyone
i need a hint regarding the following exercise question:
"Write a program that generates all Pythagorean triples whose small
sides are no larger than n.
Try it with n <= 200."
what is "n" ? i am guessing that it is a way to give a bound to the
triples to be returned but i can't figu
On Oct 21, 5:40 am, Paul Rubin wrote:
> Phlip writes:
> > def _scrunch(**dict):
> > result = {}
>
> > for key, value in dict.items():
> > if value is not None: result[key] = value
>
> > return result
>
> > That says "throw away every item in a dict if the Value is None".
> >
Boštjan Mejak wrote:
> The locale.setlocale(category=locale.LC_NUMERIC, locale="Slovenian")
> works like a charm in my application. Now the 'n format specifier works as
> I want. But tell me whether the 'n' forma specifier can be forced to round
> the float to just one decimal place. I know that
On Oct 20, 12:11 pm, dex wrote:
> On Oct 20, 12:25 pm, Jonathan Hartley wrote:
>
>
>
> > On Oct 18, 8:28 am, dex wrote:
>
> > > I'm building a turn based RPG game as a hobby. The design is becoming
> > > increasingly complicated and confusing, and I think I may have
> > > tendency to over-engine
On Oct 20, 12:11 pm, dex wrote:
> On Oct 20, 12:25 pm, Jonathan Hartley wrote:
>
>
>
> > On Oct 18, 8:28 am, dex wrote:
>
> > > I'm building a turn based RPG game as a hobby. The design is becoming
> > > increasingly complicated and confusing, and I think I may have
> > > tendency to over-engine
On Oct 20, 12:11 pm, dex wrote:
> On Oct 20, 12:25 pm, Jonathan Hartley wrote:
>
>
>
> > On Oct 18, 8:28 am, dex wrote:
>
> > > I'm building a turn based RPG game as a hobby. The design is becoming
> > > increasingly complicated and confusing, and I think I may have
> > > tendency to over-engine
gb345 wrote:
> I have a handy Python script, which takes a few command-line
> arguments, and accepts a few options. [...]
> I want to adapt my script, with the minimum amount of
> work, so that it can have a double-clickable icon that brings up
> a small GUI to accept command-line options (includin
Martin P. Hellwig wrote:
On 10/20/10 22:09, Seebs wrote:
On 2010-10-20, Matteo Landi wrote:
Another situation in which I needed to disable such kind of warnings
is while working with graphics modules.
I often use variable names such as x, y, z for coordinates, or r,g,b
for colors.
Would long
Hi all,
Is there a cross-platform way using Python to guarantee that an object
will never be swapped/paged to disk? I'll be honest and say I'm really
not sure if this is a particular language question or rather specific
to an OS.
Under linux it appears I could create a ramfs and mmap a file under
Steven D'Aprano wrote:
On Wed, 20 Oct 2010 12:47:02 +0200, Jean-Michel Pichavant wrote:
except ValueError, e:
Use meaningful names, this is so important. 'e' is not meaningful.
'exception' would be slighly better.
While I agree with everything else you had to say, I have to take
exc
On 21/10/2010 09:34, Jon Clements wrote:
Only just noticed this thread, and had something similar. I took the
following approach:-
(I'm thinking this might be relevant as you mentioned checking whether
your client's Outlook could export .EML directly, which indicates (to
me at least) that you ha
On 20 Oct, 18:13, John Henry wrote:
> On Oct 20, 9:01 am, John Henry wrote:
>
>
>
> > On Oct 20, 1:41 am, Tim Golden wrote:
>
> > > On 19/10/2010 22:48, John Henry wrote:
>
> > > > Looks like this flag is valid only if you are getting messages
> > > > directly from Outlook. When reading the msg
The locale.setlocale(category=locale.LC_NUMERIC, locale="Slovenian") works
like a charm in my application. Now the 'n format specifier works as I want.
But tell me whether the 'n' forma specifier can be forced to round the float
to just one decimal place. I know that the 'f' format specifier does
On 20/10/2010 18:38, gb345 wrote:
I have a handy Python script, which takes a few command-line
arguments, and accepts a few options. I developed it on Unix, with
very much of a Unix-mindset. Some Windows-using colleagues have
asked me to make the script "easy to use under Windows 7". I.e.:
no
On 10/20/10 22:09, Seebs wrote:
On 2010-10-20, Matteo Landi wrote:
Another situation in which I needed to disable such kind of warnings
is while working with graphics modules.
I often use variable names such as x, y, z for coordinates, or r,g,b for colors.
Would longer names make the reader's l
In article ,
Shawn Milochik wrote:
> Also, wxPython automatically looks native Mac, Windows, and Linux.
And so do the recent versions of Tkinter/tcl-tk... In Python, you just
have to use the widgets in the new ttk module. These widgets also have
fewer options than their equivalent in Tkinter,
94 matches
Mail list logo