A portion of this thread seems to be focusing on what key word args parameters
actually mean, in the Python sense. There is documentation for that, and a
modicum of experience with Python makes this a relatively simple question and
answer. However, when docs for a specific function or method
On Friday, May 12, 2017 at 6:02:58 AM UTC-4, Steve D'Aprano wrote:
> One of the more controversial aspects of the Python ecosystem is the Python
> docs. Some people love them, and some people hate them and describe them as
> horrible.
>
[...]
One thing I would love to see in any function or
awhile since I last installed ez_install, and I remember it
being a pain, but I don't remember this issue. What am I doing wrong?
On a possibly related note, is there a specific place that ez_setup.py
is expected to be in when this is run?
--
rzed
--
https://mail.python.org/mailman/listinfo
there's some obvious thing I'm not seeing
here. Does anyone have any suggestions?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
steve+comp.lang.pyt...@pearwood.info wrote in
news:4e074768$0$29982$c3e8da3$54964...@news.astraweb.com:
rzed wrote:
I've tried to install PySVG in a Python 3 setting, and I get a
few errors on the build. Most are easy to fix, but this one I
can't explain or fix:
error
Traceback (most
: No module named distutils_extensions
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
responses. As is so
often the case with Python, there are many options, and many possible
approaches to solutions for the same problem. I have some reading to
do, I see.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
points of interest.
I much prefer Python as a language, but Rebol View's layout
specifications are wonderfully concise, and the support code seems to
be fairly straightforward as well. Has anyone tried to mimic their
approach in Python?
--
rzed
--
http://mail.python.org/mailman/listinfo
= ''
What the program does with the results is up to it, of course.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Anssi Saari a...@sci.fi wrote in
news:vg3tyf75eq1@pepper.modeemi.fi:
rzed rzan...@gmail.com writes:
Did you say was? The last time I did any programming on a VMS
system was ... about 5 1/2 hours ago. Our shop runs OpenVMS now,
programs mostly in C and BASIC. I've quietly insinuated
. Our shop runs OpenVMS now, programs
mostly in C and BASIC. I've quietly insinuated Python into the mix
over the last few months, and that has helped my sanity considerably.
I did use the curses library with Vax C years ago, though online data
entry programs used the SMG library.
--
rzed
. Folder Options . View you should see a checkbox for
the Hide extensions for known file types option. Uncheck it, and the
disappearing program will return to view.
This is a separate issue for why snowball.py executes when you enter
snowball at the command line.
--
rzed
--
http
and then translated from octal
to get to x08. That's just strange. I'm sure it's documented
somewhere, but it's not easy to search for.
Oh, and this:
'\7'
'\x07'
'\70'
'8'
... is realy odd.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
to signal such an
event? Is that a QT or PyQt limitation?
--
rzed
Groping nearsightedly through the MiaSma...
--
http://mail.python.org/mailman/listinfo/python-list
David Robinow drobi...@gmail.com wrote in
news:mailman.4403.1240449918.11746.python-l...@python.org:
On Wed, Apr 22, 2009 at 8:50 PM, rzed rzan...@gmail.com wrote:
Greg Ewing greg.ew...@canterbury.ac.nz wrote in
news:49edb69f.7070...@canterbury.ac.nz:
PyGUI 2.0.4 is available:
http
like me that I
want to see it work. I really don't want to have to spend more than a
few minutes investigating the nuances of a windowing system. I just
want to be able to put up a convenient front end for a program.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
in Py2.6 and Py3.0:
http://docs.python.org/library/string.html#formatspec
[...]
Comments and suggestions are welcome but I draw the line at
supporting Mayan numbering conventions ;-)
Is that inclusive or exclusive?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
'list_name[x]', where x is an index into the list. If your plan was
instead to have predefined names of variables, what would they be
called? How many would you have? With list variables, you will have
enough, and you will know their names.
--
rzed
--
http://mail.python.org/mailman/listinfo/python
you're running, and will be
available for multiple versions, if you run more than one.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
that
on a functioning demo that uses the exact same line.
I guess that the vec2d I've got is not the one it wants. How do
I tell the difference? I'll go look at all the imports.
Are you passing the class or an instance of the class? I'd bet the
former, but it should be the latter.
--
rzed
of the string. Not surprisingly, it did remove
.torrent, but also the trailing 'e' from 'exe'. Since 'x' is not
in that set of characters, the function stopped there.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
really
have the same view of what Python actually is? Or what it could
be?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
of Python, which can lead to
confusion at times. Much of the crowdedness of the group has to do
with discussion related to the batteries-included features and to
the other packages written to run in the Python environment.
Hope that helps.
--
rzed
--
http://mail.python.org/mailman/listinfo/python
: 0.514 usec per loop
100 loops, best of 3: 0.515 usec per loop
In other words, the shorter name did seem to affect the timings,
but in a negative way. Why it would actually change at all is
beyond me, but it is consistently this way on my machine.
Can anyone explain this?
--
rzed
[EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
The puzzle is: p is the perimeter of a right angle triangle with
integral length sides, {a,b,c}. which value of p 1000, is the
number of solutions {a,b,c} maximised?
Here's my python code:
#!/usr/local/bin/python
solutions = [0] *
understanding of the
underlying concept.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Database. Because once you start building an app, you commit to
the syntax of the package and you are no longer (in my view)
coding in Python, but in that subset that includes the GUI Package
of your choice.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Tim Williams [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
[...]
maybe this: (on Win32, don't know about *nix)
for x in range(10):
print '.\b',
better:
print '\b.',
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
(but would have to test to confirm) that
tuples occupy less space for the same data. I don't know whether any
differences in, say, iteration speed would be terribly significant,
but I would expect tuples to be marginally faster.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
!
Maybe something like:
httpMonths = dict((k,%02d % (x+1))
for x,k in enumerate(months[1:]) )
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
applying the replacements. From what I've seen so far,
that would be all the OP needs for this task. It might take a half-
dozen lines of code, plus the from/to table definition.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
()),fromlist,tolist)
/code
If the question is about efficiency or robustness or generality,
then that's another set of issues, but that's for the 1.1 version
to handle.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
or chr in sight:
# Inclusive character range.
def pycrange(lo,hi):
import string
chars = string.letters +
rstr = ''
lp = chars.find(lo)
hp = chars.find(hi)
if lp hp:
rstr = chars[lp:hp+1]
return rstr
print pycrange('c','n')
Lame code, though.
--
rzed
[EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
lialie:
The formated file may be very popularly, but the module
ConfigPaser doesn't handle it. Is there a way to process it
freely?
First try, assuming the input file can be read whole. The code
isn't much readable, it needs better
super(Stats, self).__getitem__(name)
... except KeyError:
... return None
... __getattr__ = __getitem__
... __setattr__ = __setitem__
...
m = dict(a=1,b=22,c=(1,2,3))
p = Stats(m,x=4,y=[5,9,11])
p.y
[5, 9, 11]
p['y']
[5, 9, 11]
--
rzed
--
http://mail.python.org
then.
Remember the PEP 8 module name standards.
from __future__ import lottery_numbers
[1, 16, 19, 20, 21, 39]
My Python version is so old that I only get three numbers. I guess
I'll have to upgrade.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
)
ValueError: invalid literal for int(): None
i wanna know what the hell is going on... first i tried to test
using is not None, but it makes no difference.
It appears that ims is the string 'None', so it fails the test, but
is an invalid literal.
--
rzed
--
http://mail.python.org
lines. Does your application emit
output to a plotter, an ink-jet printer, or a color laser printer? Is
it a drawing program? An editor in which you want lines colored to
highlight context? It might be useful to know what system you are
running as well. Just a little detail here.
--
rzed
[EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
On Feb 2, 1:16 pm, rzed [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote
innews:[EMAIL PROTECTED]:
Hi,
I'm interested in printing out coloured lines of my
application and
I don't know what to use. Can anybody give me an idea
Explorer. This will execute the installer, and the entire
pywin32 package will be installed, including win32com.
Try those steps, then try importing win32com again.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
, then, as Gary has told you:
You want the python for windows extension, available from
http://sourceforge.net/projects/pywin32/;
I think the ActiveState distro includes it as part of its package.
I don't know if any of this applies if you are using Linux, VMS, etc.
--
rzed
--
http
questions? [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
Are there any sprintf in Python?
I know you can print to files(or redefine sys.stout) and later
open the file content.
Are there similar function to sprintf in C?
Something like this?
x = 9
vbl = One digit: %d, four digits:
?),
if anything.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Jm lists [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
hello members,
See my script piece below:
def testB(shift,**argv):
print first argument is %s %shift
print all other arguments are:,argv
testB('mails','Jen','[EMAIL PROTECTED]','Joe','[EMAIL PROTECTED]')
It can't
--
rzed
A sandwich is a sandwich, but a Manwich is a meal.
--
http://mail.python.org/mailman/listinfo/python-list
specially.
(Fiddling around) Ah! If you want to invoke the interactive python
shell, you will probably want to add the root location to your
path, so you can type
python
... to invoke it, rather than
c:\python25\python
... and something similar may be true for the Scripts
subdirectory.
--
rzed
Stef Mientki [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
In the example below, pin is an object with a number of
properties. Now I want
1- an easy way to create objects that contains a number of these
pin 2- an multiple way to access these pin, i.e.
device.pin[some_index]
.__dict__[self.pin[k]['Name']] = self.pin[k]
thanks rzed ?,
that is exactly what I was looking for:
self.__dict__[self.pinlist[k][0]] = self.pin[k]
I'm glad it helped.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers [EMAIL PROTECTED] wrote
in news:[EMAIL PROTECTED]:
rzed a écrit :
(snip)
for k in self.pin.keys():
self.__dict__[self.pin[k]['Name']] = self.pin[k]
for pin self.pin.values():
self.__dict__[pin['name']] = pin
D'oh! Of course! Thank you
the function, if you
were using Python. Functions are objects that, for example, can be
passed to other functions. The way to refer to the functions
themselves is to omit the arguments and parentheses. So by simply
stating the name of a function, that's all you've done.
--
rzed
--
http
,
replacing the original file.
--
rzed
... for some value of better off...
--
http://mail.python.org/mailman/listinfo/python-list
,'')
diff -= 1
eix += 2
if eix = 1+len(ls)/2: eix = 1
line = ' '.join(ls)
return line
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
with task_to_remove.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
. What is it? How would it be used
(or, I guess, how should the __new__() method be used)? Any hints?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Stéphane Muller [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
rzed a écrit :
Has anyone generated an aggdraw installer or aggdraw.pyd for
Python 2.5 (WinXP)? If so, could it be made available for those
of us who don't have a working compiler?
Hello,
You can try
http
Has anyone generated an aggdraw installer or aggdraw.pyd for Python
2.5 (WinXP)? If so, could it be made available for those of us who
don't have a working compiler?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
and commenting out lines, I can't readily suppress them. As it
stands now, I can't trust PythonTidy to do the right thing on
unfamiliar code, and I can't readily try out various options by
simply activating or deactivating them; if I could, it would be
much more useful to me.
--
rzed
--
http
) in a]
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
taken Anthony's usage (there's
countless other people I know...) less than literally.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
encoding? I haven't found (WinXP Firefox)
that displays that city in Sweden without a paragraph symbol or
worse.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
2.2.3 version that came pre-
installed, though I've not used it directly. (checking) It's help
seems to work now, but then so does my 2.4.2 help, now.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
file's contents.
Has anyone else observed this? If not, is there something in the
code that I should change to permit XP to view the contents?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
out for?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
that the program is executable. Add .PY and
.PYW to this list and you will be good to go.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
myNeatProgram.py and proceeds to run it. So if
you have a myNeatProgram.bat that appears earlier in your path than
myNeatProgram.py does, the bat file is what gets run.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
:
line = f.next()
outf.write('%s' % line)
f.close()
for k,v in outfs.items():
v.close()
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
,
particularly if the tests occur in several places.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
change
'a' ---
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Bartkus [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
rzed [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
snip
So what do you think? What's wrong with the picture? Why isn't
there a greater priority to work in this direction?
What's wrong with the picture
with the picture? Why isn't
there a greater priority to work in this direction?
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
rzed [EMAIL PROTECTED] wrote:
if you have 1.1.5, you can use the width option to control
the line width. see:
I'm glad to see that addition. I was surprised to see that
'width' is actually doubled in the resulting line
for any replies,
tip: you may get quicker/better responses if you use the
image-sig mailing list (if you're using a newsreader, point
it to gmane.comp.python.image)
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
rzed wrote:
I'm using PIL to generate some images which may be rotated at
the user's option. When they are rotated, the original image is
cropped in the new image (which is fine), and the corners are
black (which
[Following up]
- Original Message -
From: rzed [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Sunday, May 01, 2005 1:17 PM
Subject: Setting the corner color in rotated PIL images
I'm using PIL to generate some images which may be rotated
suppose it's more trouble than it's
worth for Fredrik, or nobody else has been bothered by it, or by
the lack of a flood-fill function. To me, these are
uncharacteristically odd omissions from PIL.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
that there wouldn't be some way to change the
black to another color, or (maybe just as good) to transparent. PIL
is so useful that it strikes me as an aberrant oversight. More
likely, there *is* a better way, but I just don't know it and can't
find it in the docs.
--
rzed
--
http://mail.python.org
is that they be a solid color, the
same color they were before being rotated.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
gargonx [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Even if i put it in exactly the way you did:
import re
charmatcher = re.compile(r' [A-Z] [\d]?')
ext = dict(D=V1, O=M1, G=S1)
std = dict(S=H)
decode_replacements ={}
decode_replacements.update([(std[key], key) for
/namespace arguments and return values.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
could happily give
up some features as long as the functionality is still available
and presuming I intended the code for public consumption, and for
that, Namespace would be most useful.
Though I'd like it to have a shorter name. I'm lazy.
--
rzed
--
http://mail.python.org/mailman/listinfo
/
But this one is still forbidden, at least for me:
http://flangy.com/dev/python/curses/files/wcurses-0.1-py2.4.zip
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
if I ever have
reason to distribute the app elsewhere.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
applications also
... though that's not what I'm talking about in this instance.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
! exec!
Anyway, for those who use lambdas, this approach is likely to be
unappealing. For those who find lambdas puzzling, it may be an
alternative, at least for a way to handle the switch equivalent.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
timeframe. Thomas Wouters' patch for the interpreter would also
need to be resurrected and brought up-to-date. I not longer
remember why the PEP stalled.
It seems to me that it was regarded as misguidod.
--
rzed
--
http://mail.python.org/mailman/listinfo/python-list
Jp Calderone [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
On Thu, 23 Dec 2004 13:36:08 GMT, rzed [EMAIL PROTECTED] wrote:
Stephen Thorne [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
[snip]
{
'one': lambda x:x.blat(),
'two': lambda x:x.blah(),
}.get(someValue, lambda
86 matches
Mail list logo