wild guess as 50%.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
becomes an alias for the actual parameter,
so that assigning to the formal parameter has the same
effect as assigning to the actual parameter.
Seems to me that (1) describes exactly how parameter passing
works in Python. So why insist that it's *not* call by value?
--
Greg
--
http://
value, other.value)
Unfortunately, the __cmp__ method has been eliminated from
3.0 as well, so this won't work as-is. You would need to
override __lt__, __eq__, etc.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
inery tells that the attribute wasn't found. So when
your property raises an AttributeError, this is
indistinguishable from the case where the property wasn't
there at all.
To avoid this you would have to raise some exception
that doesn't derive from AttributeError.
--
Greg
--
http://mai
ects, and any object reachable from them, are shared as well.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
e? It becomes visible to other
threads using the same type object. If it's not safe
for sharing, bad things happen.
Python's data model is not conducive to making a clear
distinction between "private" and "shared" objects,
except at the level of an entire interpreter.
en you can dump
the big lump of data to be transferred in there, and send
a short message through a pipe to the other process to
let it know it's there.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
e you to have a separate thread for
each interpreter, which you mightn't always want.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ve to create its
own versions of all the builtin constants and type objects,
and import its own copy of all the modules it uses.
One wonders if it wouldn't be cheaper just to fork the
process. Shared memory can be used to transfer large lumps
of data if needed.
--
Greg
--
http://mail.python.o
hese extra
pointers around everywhere is bound to have some effect
on performance. The idea mightn't go down too well if it
slows things significantly in the case where you're only
using one interpreter.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ard about what should and shouldn't be done in multi-
threaded apps
No, it's there because it's necessary for acceptable performance
when multiple threads are running in one interpreter. Independent
interpreters wouldn't mean the absence of a GIL; it would only
mean each int
James Mills wrote:
Directly importing a bash function into python is not
possible.
Well, you could write a bash interpreter in Python...
but that's probably more work than it's worth
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
f you need to go fast,
but good for a lot of every day tasks.
The neat thing about Python is that you can strap
on a jet engine (C extension) when you really need
a burst of speed.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
n't
say it's useless. The main problem is that its nature
needs to be much more clearly spelled out in the
docs -- it's something of an attractive nuisance the
way it is.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
mmand line into arguments, it's
the program being run. So you need to avoid any kind of
exec or spawn operation, whether it goes through the shell
or not, unless you know the program being run isn't going
to interpret '/' as an option.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ould have a go at rolling your own based
on a View.
Anyway, glad you're finding it useful. Feel free to ask if
you have any more questions.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
or an
event to get scheduled while in the midst of a sleep. It
also doesn't take any measures to protect its data structures
from concurrent access.
The documentation could make this clearer, especially since
it confusingly talks about "allowing other threads to run".
--
Greg
--
ht
ing a "Can't contact
LDAP server" error when running in iPython, but I can hit the LDAP server
using PHP.
Do I need to run a bind statement of some sort after initialize()?
Thanks,
--greg
--
http://mail.python.org/mailman/listinfo/python-list
epare your class and PyCon will compensate instructors US$1,500 per
tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009 (US)
--
http://mail.python.org/mailman/listinfo/python-list
ed.
In my experience, either it's sufficient to just
resize one pane and keep the others a fixed size, or
you really want user control over the size of each
pane individually. Proportional resizing is a
compromise that just ends up annoying me.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Humerus 2.0 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.0.0.tar.gz
Online documentation:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.0.0/doc/
This version of Humerus has been extensively revised from the previous one.
Instea
other functions.
Although Guido has defended it on the grounds that it can
be inconvenient having a function that returns different
types under different circumstances. Also it discourages
making the mistake of treating the return value as a
boolean.
--
Greg
--
http://mail.python.org/mailman/lis
James Mills wrote:
I've just checked out the darcs repository and converted
it to Mercurial. I'm going to have a bit of a play wiht it...
Anyone interested in this ?
I'll be interested to hear of any developments.
--
http://mail.python.org/mailman/listinfo/python-list
ALBOW - A Little Bit of Widgetry for PyGame
Version 2.0 is now available.
This version incorporates substantial additions and improvements.
New widgets include TabPanel, TableView, CheckBox, RadioButton and
an enhanced set of TextField-based controls.
http://www.cosc.canterbury.ac.nz/greg.ewi
prescribes that because it's useful
behaviour, not because it has anything to do with
recursion.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
nerate the .pyc after I've changed
something.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Marc 'BlackJack' Rintsch wrote:
On Fri, 03 Oct 2008 19:10:27 +1200, greg wrote:
(BTW, try doing that with the x.len() notation!)
def size(obj):
return obj.len()
or
size = operator.methodcaller('len')
No, what I meant was that if the normal way of getting
the l
the shiny baubles you want and hiding them away in
your own nest).
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
aks out of the scope
of the loop is regarded as a feature, so anything
which changes that seems to be a non-starter.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ctional
languages is that there are *no* side effects.
The confusing thing is that in everyday English the term
implies something bad or unwanted (e.g. side effects of
a drug). That's not necessarily true of the technical
meaning -- often the side effect is exactly what we want,
as in the c
has namespaces, they don't have any defined
relationship to source files, so they don't help you
find which file something is defined in.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Aaron "Castironpi" Brady wrote:
How do you have a yellow dog,
It's not a yellow dog, it's a dog yellow. Attention pay! :-)
--
Ewing Gregory
--
http://mail.python.org/mailman/listinfo/python-list
= len
:-)
(BTW, try doing that with the x.len() notation!)
--
Greg
But it's too late to change things.
--
http://mail.python.org/mailman/listinfo/python-list
elements
involved are transitive, and leave the semantics in other
cases undefined.
Then in the Decimal module it could be warned that the
equality relations between int-float and int-Decimal are
not transitive, perhaps noting that this can cause
problems with sets and dicts.
--
Greg
--
http
would be
rather hackish, and wouldn't do anything for any
other incomparable types that might come along.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ource and replace it with the following".
Then you're effectively distributing the modified source in
its entirety, just with a funny header at the top of each
source file that serves no useful purpose.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
how copyrights work either. As far as
I know, whether something is deemed a derivative work is
judged on the basis of how similar it is to another work,
not whether its author had knowledge of the other work.
As long as you express an idea in an original way, it
shouldn't matter whe
epare your class and PyCon will compensate instructors US$1,500 per
tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009 (US)
--
http://mail.python.org/mailman/listinfo/python-list
h time you want to start iterating
again.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
This is a *FREE* event (we have GREAT sponsors), so all you need to bring is
yourself. We have over 45 people -- from 4 States -- registered and tons of
great swag and giveaways lined up.
See our wiki (http://pycamp.python.org/Arkansas/HomePage) for more details
and registration info.
Greg Lindst
ed in early December to give you time to
prepare your class.
PyCon will compensate instructors US$1,500 per tutorial.
If you have any questions, please contact [EMAIL PROTECTED]
Greg Lindstrom
Tutorial Coordinator, PyCon 2009
--
http://mail.python.org/mailman/listinfo/python-list
ty_path, "w").write(my_naughty_data)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Arnaud Delobelle wrote:
Or:
import ModuleName as this_module
Or:
this_module = __import__(__name__)
then you don't have to change anything.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
n application that access Microsoft Excel and creates
reports for work, but would like to create an Open Source version using Open
Office and release it to the community (and maybe get a talk at PyCon :-).
Is there someone here who can help me out, or is there an appropriate
mailing list for me to join
the reasons
I mentioned above, I'm reluctant to forge ahead with
too many new features until a native Windows version
exists.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
d swag.
Due to limitations of physical space we must close registration at 100
participants (in honor of my first OS, SunOS, we may go to 110). Check out
our wiki at http://pycamp.python.org/Arkansas/HomePage. There's no
registration fee, so if you're in the area stop on by...we are looking
forw
Pyrex 0.9.8.5 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Various minor bug fixes and improvements.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you freely mix operations on Python and C data, with
all Python
eporting system (ala Crystal Reports) would keep
me from having to write this. I've looked at Jasper and DataVision;
Thanks,
--greg
--
http://mail.python.org/mailman/listinfo/python-list
rmation.
Another possibility might be to crawl the site and
build your own index based on the information you're
interested in.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Avinash Vora wrote:
(Greg: You only sent the email to me: you probably wanted to add the
mailing list to the recipients.)
I replied to the newsgroup as well, so it should
turn up in the list.
Right, but I meant if there is an Apple-sanctioned way. I guess not?
Not that I'm aware of
on
it)
I've very rarely had any problem with maintaining my
own Python installation, but as I said, I always install
packages using "python setup.py".
Python itself copes very well with having multiple
versions installed, on all platforms, but you have to
do things the Python w
. use Python to run a setup.py file. This
ensures that the package will be installed into whichever
Python is being used to run the setup.py.
Apart from the initial installation of Python itself, I
never use an installer to install a Python package if I
can avoid it. I wouldn't trust it to install into the right
Python version.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
Paul Rubin wrote:
>
> use contextlib.nexted().
You mean contextlib.nested I guess.
Although "nexted" is an intriguing-sounding word. I wonder
what it could mean?
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
uot;look but don't touch" rule.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window. Is there any way to
capture the entire window? specifically the scrolled portion of a
window that is not visible o
Pyrex 0.9.8.4 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
This version fixes a bug introduced by the last change
to unsigned integer indexing.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you freely mix opera
Pyrex 0.9.8.3 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Compiling multiple .pyx files in one go works properly now, and
can be substantially faster if you have a lot of modules that
cimport from each other. I had to rearrange various things to
make this work,
On May 25, 9:50 pm, [EMAIL PROTECTED] wrote:
> On May 24, 9:41 am, Sh4wn <[EMAIL PROTECTED]> wrote:
>
> > Python advertises himself as a full OOP language, but why does it miss
> > one of the basic principles of OOP? Will it ever be added to python?
>
> Others have already answered this directly, b
still spent
far more time and effort developing the compiler than
writing the tests.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Pyrex 0.9.8.2 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
A block of external functions can now be declared nogil at once.
cdef extern from "somewhere.h" nogil:
...
Also some minor nogil-related bugs have been fixed.
What is Pyrex?
--
Pyre
Pyrex 0.9.8.1 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Base classes no longer need to be specified in a forward
declaration of an extension type, or in the implementation
part of an extension type defined in a .pxd file.
Also, I've come up with an even bette
Pyrex 0.9.8 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
This version has a number of new features:
* In-place operators (+= etc.) are now supported.
* The Pyrex compiler now has built-in facilities for
automatically tracking down and compiling all the
modu
Pyrex 0.9.7.2 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Seems I didn't quite eradicate all of the integer
indexing bugs. Here's a fix for the other half.
What is Pyrex?
--
Pyrex is a language for writing Python extension modules.
It lets you free
Pyrex 0.9.7.1 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
This version fixes a bug in the new integer indexing
optimisation which causes indexing of a non-sequence type
with a C int to fail with a TypeError.
What is Pyrex?
--
Pyrex is a language fo
Pyrex 0.9.7 is now available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
Highlights of this version:
* I have streamlined the integer for-loop syntax. Instead
of the loop variable redundantly appearing in two places,
it's now just
for x < i < y:
...
* If you dec
hat the
Phunky Phrisbee, Mojo Mallet and Supa Slice can be manufactured and sold at a
profit, but I don't know about the others yet.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
is what
python-ideas and pytho-dev are for).
Posting to many groups at once tends to annoy people,
because the readerships of related groups often overlap
considerably, so many people get multiple copies of the
message.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 24, 12:08 am, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Apr 23, 11:51 pm, Greg J <[EMAIL PROTECTED]> wrote:
>
> > I was reading the programming Reddit tonight and came across this
> > (http://reddit.com/info/6gwk1/comments/):
>
> > >>> ([1]&
I was reading the programming Reddit tonight and came across this
(http://reddit.com/info/6gwk1/comments/):
>>> ([1]>2)==True
True
>>> [1]>(2==True)
True
>>> [1]>2==True
False
Odd, no?
So, can anyone here shed light on this one?
--
http://mail.python.org/mailman/listinfo/python-list
Id'a like to raise an issue that was partially discussed in
2006 (
http://groups.google.co.uk/group/comp.lang.python/browse_thread/thread/1811df36f2a131fd/435ba1cae670aecf?lnk=st&q=python+iterators+duck+typing#435ba1cae670aecf
) with the half-promise that it would be revisited before Python 3000
ime putting
the book together; why not *buy* it (~$29.00 on Amazon) to help support the
effort? It's not that much and a great way to say "thanks".
--greg
--
http://mail.python.org/mailman/listinfo/python-list
cts, pivot tables and
stored procedures. You can do a lot of processing "inside" the database
which cuts down on data running over the wire.
SQL is one of the areas I wish I had mastered (much) earlier in my career
--greg.
--
http://mail.python.org/mailman/listinfo/python-list
data in its
buffer waiting to be read.
When using select(), you really need to deal with the
socket directly, with no buffering in the way.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ramming at all but are just as important (food, swag, etc.).
Click on over to http://www.python.org/community/pycon/ and introduce
yourself. You'll get a lot more than a groovy tee shirt out of it!
--greg
--
http://mail.python.org/mailman/listinfo/python-list
pped') # The secret -- run out.
Another way is to make your object iterable -- read
up about the "iterator protocol".
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
ed to the argument list rather than passed as a
single object?
ie. class T:
def __init__(self, foo, bar):
self.foo = foo
self.bar = bar
argspec = inspect.argspec(T.__init__)
args = (1, 2)
??? how do you call T(args)?
Thanks.
Greg
--
http://mail.pytho
ause he was writing code while up in
front of the room. "Here's how to do this" and then he would tweak various
aspects and show the results. I can appreciate the need for slides, but I
also like seeing "code in action".
--greg
--
http://mail.python.org/mailman/listinfo/python-list
# Unzip password protected zipfile to _temp
os.chdir('_temp')
os.popen("unzip -P%s ../%s" % (self.password, self.zipfile), "r")
return True
While this is not ideal, i could not find any other alternatives.
Hope that helps.
--
Greg Armer
Entropy has us outnumbered.
--
http://mail.python.org/mailman/listinfo/python-list
pes such as tuples also don't need to
be on it, even though they contain references, because it's
impossible to create a cycle consisting entirely of such
objects. There has to be at least one mutable object in the
cycle, and the GC will be able to find the cycle via that
object.
--
block
of memory, that can be moved when its size changes.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
pletely
different. E.g. in C, if you can describe the table
entirely with static data, it'll be very fast to
load and incur no overhead for code to create it at
all. Also, with demand-paging out of the executable
file, and infrequent lookups, only parts of the
table will actually get loaded
you'd think that
rocket engineers, of all people, would be acutely
aware of the need to avoid confusing force and
mass!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
#x27;s correct. E.g. they will likely expect a 2kg hammer
to fall to the floor twice as fast as a 1kg hammer, which
isn't anywhere near to being true.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
rs in the code it's trying to compile!
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
, if one process is forked from the other, the parent
can mmap an anonymous block and the child will inherit that
mapping.
(I suppose if both processes had sufficient privileges they
could map physical memory out of /dev/mem, but that would be
*really* dangerous!)
--
Greg
--
http://mail.python.o
of view, a *low* hit rate on the Python
web site could be seen as a good sign. :-)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
division
traps turned on, and when one occurs, consult the state to
determine whether to raise an exception or re-try that
operation with trapping turned off.
That would only incur the overhead of changing the hardware
setting when a zero division occurs, which presumably is a
relatively rare occurre
real division
// --> mathematical integer division
/// --> IEEE floating point division (where supported)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
nding
out how long it takes them to notice they're being fed a load
of bull.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
hing.
So to get back to the original topic, it doesn't really matter
whether you talk about light travelling or propagating. Take
your pick.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
dits or vice versa.
If you really want to generate code, find a way of
separating out the generated code into another .py
file that never needs to be edited by hand.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Registration for PyCon 2008 is now open. Held in Chicago March 14-16 with
"Tutorial Thursday" on March 13 and sprints afterwards, it is expected that
nearly 800 Python enthusiasts will attend at least part of the conference.
It is totally run by volunteers and is affordable for just about anyone.
Thanks John. I now see it
John Machin wrote:
>
> On Jan 30, 3:27 am, Greg Corradini <[EMAIL PROTECTED]> wrote:
>> Hello,
>> I've never gotten this traceback error before using mx.ODBC.
>
> "traceback error"?? I see no problem with the traceback.
other program that is looking for matches.
I dunno. Maybe it was the familiar compulsion with Perl to
attempt to cram everything into a single pattern.
Greg
--
What light is to the eyes -- what air is to the lungs -- what love is to
the heart, liberty is to the soul of man.
-- Robert Gr
00010'")
Traceback (most recent call last):
File "", line 1, in ?
curse.execute("Insert into FHWA_StandSamp_2008(LRS_ID_NEW) values
('040210') where LRS_ID = '0403700010'")
ProgrammingError: ('37000', -3516, '[Microsoft][ODBC Mi
The code below at least passes your tests.
Hope it helps,
Greg
#! /usr/bin/perl
use warnings;
use strict;
use constant {
MATCH=> 1,
NO_MATCH => 0,
};
my @tests = (
[ "winter tire",=> MATCH ],
[ "tire",
On Jan 21, 5:44 pm, Greg Johnston <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I'm a relative newbie to Python (switched over from Scheme fairly
> recently) but I've been usingPyGTKand Glade to create an interface,
> which is a combo I'm very impressed with.
>
&
e to modify ComboBoxEntry choice options on the fly--at
least with append_text(), etc--because they were not created with
gtk.combo_box_entry_new_text(). Basically, I'm wondering if there's
any way around this.
Thank you,
Greg Johnston
--
http://mail.python.org/mailman/listinfo/python-list
Hello Everyone-
I'd like to announce the tutorials sessions for PyCon 2008 (US). As you may
know, this year PyCon is being held in Chicago, Illinois March 14-16 with
the Thursday before (the 13th) being "Tutorial Thursday". We are expecting
nearly 600 Python enthusiasts to meet up for the confer
> > As a time signature 1/4 has no sense,
You've never played and Grainger, have you? :-)
--greg
--
http://mail.python.org/mailman/listinfo/python-list
601 - 700 of 1190 matches
Mail list logo