On Fri, 07 Jan 2005 12:15:48 -0500, Anand S Bisen wrote:
> Is there a simple way to extract words speerated by a space in python
> the way i do it in awk '{print $4 $5}' . I am sure there should be some
> but i dont know it.
i guess it depends on how faithfully you want to reproduce awk's behav
If the caller is meant to supply a namespace, get them to supply a namespace.
def f(ns1, ns2):
print ns1['a'], ns1['b'], ns2['a'], ns2['b']
f(ns1 = dict(a=1, b=2), ns2 = dict(a=3, b=4))
Hey, where's Steve? Maybe his generic objects should be called namespaces
instead of bunches. . .
def f(ns1,
Jeff Shannon wrote:
Agreed. I'd started typing before I realized that it'd provide a stable
sort, which pretty much answered my own question, but decided to send it
anyhow in case I'd missed anything else... :)
And it turns out we both missed the fact that it avoids comparing the
dictionaries w
Roy Smith wrote:
It's actually kind of neat, but boy does it play headgames with me when
I switch back and forth between that and Python.
Switching back and forth betwen C++ and Python plays headgames *anyway* }:>
Cheers,
Nick.
Hardware control with Python is nice. . .
--
Nick Coghlan | [EMAIL
Dan Valentine <[EMAIL PROTECTED]> wrote:
> On Fri, 07 Jan 2005 12:15:48 -0500, Anand S Bisen wrote:
>
> > Is there a simple way to extract words speerated by a space in python
> > the way i do it in awk '{print $4 $5}' . I am sure there should be some
> > but i dont know it.
>
> i guess it dep
Hello, I'm trying out a new auto poster, and dont know how to use it very
good, so if this end up in the wrong places, please forgive me,
and disreguard, sorry for your incovenience, but everyone else, ENJOY!!
KEEP READING TO GET YOUR $50.00 NOW!!!
This is not spam, it is a legi
On Sat, 2005-01-08 at 08:08, Baggs wrote:
> Tk calls did not work, the output from Python when running a program
> stated that I probably did not have TK installed. I got and installed
> TK 8.4 and the problem persisted (I know I should have written down the
> exact error, but I didn't... but
Roy Smith wrote:
> Hmmm. There's something going on here I don't understand. The ref
> manual (3.3.5 Emulating container types) says for __getitem__(),
"Note:
> for loops expect that an IndexError will be raised for illegal
indexes
> to allow proper detection of the end of the sequence." I expec
Andrey Tatarinov wrote:
Hi.
It would be great to be able to reverse usage/definition parts in
haskell-way with "where" keyword. Since Python 3 would miss lambda, that
would be extremly useful for creating readable sources.
Usage could be something like:
>>> res = [ f(i) for i in objects ] where
Jeff Shannon wrote:
> Jp Calderone wrote:
>
> > L2 = [(d[key], i, d) for (i, d) in enumerate(L)]
> > L2.sort()
> > L = [d for (v, i, d) in L2]
>
> Out of curiosity, any reason that you're including the index? I'd
> have expected to just do
>
> L2 = [(d[key], d) for d in L]
>
Hi
I am running a script which is
importing tkinter from "/usr/local/lib/python2.3/lib-tk/Tkinter.py"
and generating an error
" import _tkinter
ImportError: No module named _tkinter
"
can anybody tell me what is it? and how to get away
with it?
--
http://mail.python.org/mailman/listin
Nick Coghlan <[EMAIL PROTECTED]> writes:
> > Usage could be something like:
> > >>> res = [ f(i) for i in objects ] where:
> > >>> def f(x):
> > >>> #do something
>
> Hmm, this is actually a really interesting idea. Avoiding accidental
> namespace conflicts is certainly one of the a
Steven Bethard wrote:
I'd like to be able to have an instance variable that can sometimes be
accessed as a property, and sometimes as a regular value, e.g. something
like:
If you want the behaviour to be switchable per-instance, you have to go the
route of always running through the property mac
Nick Coghlan wrote:
It also allows the necessary but uninteresting setup for an expression
to be moved "out of the way", bringing the expression that does the real
work to prominence.
Killer app for this keyword:
class C(object):
x = property(get, set) where:
def get(self):
return "Si
Paul Rubin wrote:
the suite has its own scope so any variable created there is local to
the suite plus the following statement. The scope vanishes after the
statement.
The second part of the idea is to give the statement greater prominence and
'hide' the uninteresting setup (the contents of the w
Steven Bethard wrote:
where I also accept *args and **kwds when the default value is to be
called. It's certainly doable with a flag, but note that I have to
check the flag every time in both __getitem__ and setdefault.
Alternatively, always use a function for the default value, and set _func to
> But we're talking about the mythical/hypothetical Python 3, so maybe
> there's a chance of fixing the scoping rules, which it seems to me
are
> currently pretty badly broken.
I don't think the current scoping rules will be changed in Python 3.0.
I can't give you the link right now, but there ar
On Sat, 2005-01-08 at 14:30, Jatinder Singh wrote:
> Hi
> I am running a script which is importing tkinter from
> "/usr/local/lib/python2.3/lib-tk/Tkinter.py" and generating an error
> " import _tkinter
> ImportError: No module named _tkinter "
>
> can anybody tell me what is it? and how to get
First off, writing the blob. From what I gather on the internet, I'm
suppose to read the entire file into memory (a Python string), then create
a dbiRaw object with that string and use the dbiRaw object in an insert
statement?
That doesn't sound very efficient to me. What if my computer only has
Just thought I'd follow up to say that I'm using XML-RPC after all. Not
that I was intimidated when I finally learned that Fredrik had written
the thing. No, it was more the issue that we want to write a php
debugger next and XML-RPC plays well with php, too.
Thanks again,
--Matt
--
http://mail.p
Hi all,
Is there a way to display inbuilt function syntax as the user starts typing a
function name with 'Vi' editor in console mode?
tia,
KM
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
In article <[EMAIL PROTECTED]>,
Stephen Waterbury <[EMAIL PROTECTED]> wrote:
Aahz wrote:
In article <[EMAIL PROTECTED]>,
Stephen Waterbury <[EMAIL PROTECTED]> wrote:
Also see Python Success Stories: http://pythonology.org/success
A notable example is Verity's search engine -- see
htt
201 - 222 of 222 matches
Mail list logo