George Sakkis wrote:
Gary Wessle wrote:
Hi
the second argument in the functions below suppose to retain its value
between function calls, the first does, the second does not and I
would like to know why it doesn't? and how to make it so it does?
thanks
# it does
def f(a, L=[]):
Duncan Booth wrote:
Personally I'd just like to see 'python' a builtin shorthand for importing
a name you aren't going to use much
e.g.
python.pprint.pprint(x)
Would you settle for
import py
py.std.pprint.pprint(x) ?
http://codespeak.net/py/current/doc/misc.html#the-py-std-hook
Kent
Ronny Mandal wrote:
file front_ui.py:
class Front(object):
_images = [] # Holds image refs to prevent GC
def __init__(self, root):
# Widget Initialization
self._listbox_1 = Tkinter.Listbox(root,
height = 0,
width = 0,
...
)
softwindow wrote:
the re module is too large and difficult to study
i need a detaild introduction.
http://www.amk.ca/python/howto/regex/
Kent
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
hi.
I have a file with this kind of structure:
Hxxx
.
.
.
x
Hxxx
...
...
x
H
.
and so onlines starting with 'H' are headers.
Can anyone point me to a GUI program that allows viewing and browsing
the output of the profiler? I know I have used one in the past but I
can't seem to find it...
Thanks,
Kent
--
http://mail.python.org/mailman/listinfo/python-list
Chris_147 wrote:
but it seems to depend on from where I start the Python shell.
so I've got a module selfservicelabels.py with some variables defined,
like this:
BtnSave = link=label.save
DeliveryAutomaat= //[EMAIL PROTECTED]'deliveryMethod' and @value='AU']
This module is
manstey wrote:
Hi,
How do I convert a string like:
a={'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'}
into a dictionary:
b={'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'}
Try this recipe:
[EMAIL PROTECTED] wrote:
I'm trying to make a unicode friendly regexp to grab sentences
reasonably reliably for as many unicode languages as possible, focusing
on european languages first, hence it'd be useful to be able to refer
to any uppercase unicode character instead of just the typical
Zameer wrote:
I wonder where the else goes in try..except..finally...
try / except / else / finally
See the PEP:
http://www.python.org/dev/peps/pep-0341/
Kent
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'm creating a program to calculate all primes numbers in a range of 0
to n, where n is whatever the user wants it to be. I've worked out the
algorithm and it works perfectly and is pretty fast, but the one thing
seriously slowing down the program is the following
sandip desale wrote:
Hi,
We have some tools which are developed in Python and using python
dictionaries. Now for some new requirments we are using Java and want to
use the existing dictionaries as both the tools are executed on the same
platform. So we are trying to use the existing
Ron Garret wrote:
The reason I want to do this is that I want to implement a trace
facility that traces only specific class methods. I want to say:
trace(c1.m1)
and have c1.m1 be replaced with a wrapper that prints debugging info
before actually calling the old value of m1. The reason
Ron Garret wrote:
The reason I want to do this is that I want to implement a trace
facility that traces only specific class methods. I want to say:
trace(c1.m1)
and have c1.m1 be replaced with a wrapper that prints debugging info
before actually calling the old value of m1. The reason
Dustan wrote:
[EMAIL PROTECTED] wrote:
I'm using python.exe to execute my modules. I have a music.py module
which contains my classes and a main.py module which uses these
classes. In python.exe, I call import main to execute my program. The
problem is that I have to close python and reopen
Fredrik Lundh wrote:
Stephen Eilert wrote:
I do think that, if it is faster, Python should translate
x.has_key(y) to y in x.
http://svn.python.org/view/sandbox/trunk/2to3/fix_has_key.py?view=markup
Seems to have moved to here:
Carl Banks wrote:
Now, I think this is the best way to use modules, but you don't need to
use modules to do get higher-level organization; you could use packages
instead. It's a pain if you're working on two different classes in the
same system you have to keep switching files; but I guess
Carl Banks wrote:
Kent Johnson wrote:
Carl Banks wrote:
Now, I think this is the best way to use modules, but you don't need to
use modules to do get higher-level organization; you could use packages
instead. It's a pain if you're working on two different classes in the
same system you have
tac-tics wrote:
I have an application written in jython which has to process a number
of records. It runs fine until it gets to about 666 records (and maybe
that's a sign), and then, it's performance and responsiveness goes down
the toilet. It looks like it's running out of memory and is being
jonathan.beckett wrote:
I'm just finding it a bit weird that some of the built in functions are
static, rather than methods of objects (such as len() being used to
find the length of a list).
Another explanation here:
Bjoern Schliessmann wrote:
Demel, Jeff wrote:
Does anyone know if there's a plan in the works for a new edition
of Learning Python? The current edition (2nd) is a few years old
and looks like it only covers Python 2.3.
IIRC, differences to 2.4 are in it, too.
No, it is one version back
[EMAIL PROTECTED] wrote:
Matt In some instances I want to access just the function f, though,
Matt and catch the values before they've been decorated.
def f(x):
return x * x
@as_string
def fs(x):
return f(x)
or just
fs = as_string(f)
Kent
Call the one you want.
Bart Van Loon wrote:
Hi all,
I would like to find out of a good way to append an element to a list
without chaing that list in place, like the builtin list.append() does.
currently, I am using the following (for a list of integers, but it
could be anything, really)
[EMAIL PROTECTED] wrote:
Hi,
I´m trying desperately to tell the interpreter to put an 'á' in my
string, so here is the code snippet:
# -*- coding: utf-8 -*-
filename = uAtaris Aquáticos #2.txt
f = open(filename, 'w')
Then I save it with Windows Notepad, in the UTF-8 format. So:
1)
azrael wrote:
if you are new to python then this will be easier to understand. if
you change this a liitle bit (depending on syntax) it should work in
any language.
just copy and paste to a .py file
Yikes. If you are new to Python please ignore this un-Pythonic
abomination. Check(listItem,
[EMAIL PROTECTED] wrote:
Hi,
I am currently using the Cmd module for a mixed cli+gui application. I
am starting to refactor my code and it would be highly desirable if
many commands could be built as simple plugins.
My idea was:
- Load a list of plugin names (i.e. from the config file,
Jonathan Mark wrote:
Some languages, such as Scheme, permit you to make a transcript of an
interactive console session. Is there a way to do that in Python?
Maybe IPython's logging feature is what you want?
http://ipython.scipy.org/doc/manual/node6.html#SECTION00066000
Kent
--
On Nov 27, 11:33 pm, Benjamin Peterson benja...@python.org wrote:
On behalf of the Python development team, I'm happy as a clam to announce the
immediate availability of Python 2.7.1.
Will there be Mac binaries for 2.7.1 and 3.1.3? Currently the web site
shows only source and Windows binaries.
On Apr 21, 8:05 am, Greg Ewing greg.ew...@canterbury.ac.nz wrote:
PyGUI 2.0.4 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Fixes a few more bugs and hopefully improves things
on Windows, although I can't be sure it will fix all
the Windows problems people are
On Apr 8, 3:47 pm, r nbs.pub...@gmail.com wrote:
I'm already making something like this (that is, if I understand you
correctly). In the example below (an almost real code this time, I
made too many mistakes before) all the Expressions (including the
Error one) implement an 'eval' method that
Kent Johnson [EMAIL PROTECTED] added the comment:
This issue seems to have foundered on finding an explanation for the
finer points of super(). Perhaps the glaring errors could at least be
corrected, or the fine points could be omitted or glossed over? For
example change the first sentence
Kent Johnson k...@kentsjohnson.com added the comment:
Attached patch deletes the referenced sentence.
--
keywords: +patch
nosy: +kjohnson
Added file: http://bugs.python.org/file19536/issue10303.diff
___
Python tracker rep...@bugs.python.org
http
New submission from Kent Johnson [EMAIL PROTECTED]:
In the docs for AsyncResult
http://docs.python.org/dev/library/multiprocessing.html#multiprocessing.pool.AsyncResult
get([timeout) is missing a ]
In the example following, it refers to pool.applyAsync() in two places;
the docs spell
Kent Johnson [EMAIL PROTECTED] added the comment:
On Thu, Oct 2, 2008 at 1:07 PM, Jesse Noller [EMAIL PROTECTED] wrote:
Jesse Noller [EMAIL PROTECTED] added the comment:
Which examples are you talking about Georg?
I think you mean me, not Georg...I was referring to the example
Changes by Kent Johnson [EMAIL PROTECTED]:
--
nosy: +kjohnson
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4017
___
___
Python-bugs-list mailing list
New submission from Kent Johnson [EMAIL PROTECTED]:
In the docs for urllib2.BaseHandler previous to Python 2.6, the names of
the protocol_xxx() methods were spelled with 'protocol' in italics to
indicate that it is a placeholder; the actual method name is e.g.
http_opener().
http
New submission from Kent Johnson k...@kentsjohnson.com:
eval() is a known security hole. Since Python 2.6 ast.literal_eval() provides a
better alternative in many cases. literal_eval() is not as well known as eval()
and not easy to find even if you know it exists (but don't remember the name
New submission from Kent Johnson [EMAIL PROTECTED]:
The Reporting Bugs section of the Python 2.6b3 docs
http://docs.python.org/dev/bugs.html
says,
please use either the “Add a comment” or the “Suggest a change” features
of the relevant page in the most recent online documentation at
http
New submission from Kent Johnson [EMAIL PROTECTED]:
These are minor corrections to the What's New in Python 2.6[b3] doc.
Note: the PEP references are to the headers in What's New, not the
actual PEPs
- PEP 371: The multiprocessing Package
- apply() or apply_async, adding a single request
Kent Johnson [EMAIL PROTECTED] added the comment:
You should add something like the old About this document footer.
AFAICT there is no information in the new docs about how to report a
problem with the docs.
___
Python tracker [EMAIL PROTECTED]
http
Kent Johnson [EMAIL PROTECTED] added the comment:
For the itertools examples, perhaps you could remove the [ ] from the
result text so it doesn't look like a list. For example:
itertools.izip_longest([1,2,3], [1,2,3,4,5]) -
(1, 1), (2, 2), (3, 3), (None, 4), (None, 5
New submission from Kent Johnson [EMAIL PROTECTED]:
The library reference for int() says, If radix is zero, the proper
radix is guessed based on the contents of string; the interpretation is
the same as for integer literals. The use of the word 'guess' implies
that there is some heuristic used
New submission from Kent Johnson k...@kentsjohnson.com:
In Python 2.x, os.environ extends UserDict.IterableUserDict and
therefore os.environ.__repr__() shows the environment. This makes it
easy and intuitive to view the entire environment in the interactive
interpreter.
In Python 3.1
Kent Johnson added the comment:
issue17390_editor_title.patch is not correct, it changes the title on any
window that inherits from EditorWindow, including the shell window. Here is a
new patch that changes short_title() instead of saved_change_hook(), so it can
be overridden by derived
New submission from Kent Johnson:
The IDLE help text says, Running without a subprocess: (DEPRECATED in Python
3.5 see Issue 16123). According to the referenced issue, this feature is
scheduled to be deprecated in *3.4* and *removed* in 3.5. The attached patch
corrects the help text
Kent Johnson added the comment:
Note: this text does not appear in Doc/library/idle.rst so it does not have to
be corrected there.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17719
Changes by Kent Johnson k...@kentsjohnson.com:
--
nosy: -kjohnson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17390
___
___
Python-bugs-list
601 - 647 of 647 matches
Mail list logo