Colin Mcphail wrote:
> On 2008-03-09 18:57:00 +, Gerhard Häring <[EMAIL PROTECTED]> said:
>
> Gerhard Häring wrote:
[...] APSW
web:http://oss.itsystementwicklung.de/trac/apsw/
scm:Subversion: http://initd.org/svn/pysqlite/apsw/trunk/
>
> That should have
Daniel Fetchinson wrote:
> Since you seem to know quite a bit about this topic, what is your
> opinion on the apparently 'generic' algorithm described here:
> http://grail.cs.washington.edu/projects/query/ ?
> So far it seems to me that it does what I'm asking for, it does even
> more because it ca
The following code has me mystified:
In [4]: class A(object):
...: def show(self):
...: print 'hello'
...:
...:
In [5]: a = A()
In [6]:
In [7]: x = a.show
In [8]: y = getattr(a, 'show')
In [9]: x
Out[9]: >
In [10]: y
Out[10]: >
In [11]:
In [12]: id(x)
Out[12]: 12419552
In [
Hi,
I have some code in which I have to change some path names to get it to
work. The original code seems to have assumed that path names would not have
any embedded spaces.
I am not sure how to write the following line so when used in my script the
path will be found.
ANT_CMD = r'C:\Program
Dave Kuhlman wrote:
> The following code has me mystified:
>
> In [4]: class A(object):
>...: def show(self):
>...: print 'hello'
>...:
>...:
> In [5]: a = A()
> In [6]:
> In [7]: x = a.show
> In [8]: y = getattr(a, 'show')
> In [9]: x
> Out[9]: >
> In [10]: y
> Out[10
hi
I am new to python programming..I would like to call a function that
returns an integer value and a filename string as a tuple.I coded it
like this below...I want to know if this can be coded more compactly
and efficiently..(i am from java background and thus code often
becomes bulky ..)
de
On Mar 13, 3:16 pm, [EMAIL PROTECTED] wrote:
> not self.believe
> programming.screw()
>
> self.serious; this.works
>
> make_money(EASY)
> anyone.can_do(this)
you.screw()
self.thank(God, encapsulation)
not self.want_to_know(you.screw.func_code)
programming.is_good
--
http://mail.python.org/mailma
I'm trying to parallise with python. Specifically I'm sending code to
the processes and let them exec this code (in ascii form). However I
ran into a problem with Namespaces (I think) which I do not understand.
Here's what I do first:
---
bash-3.2$ cat execB
On Mar 13, 10:06 pm, Dave Kuhlman <[EMAIL PROTECTED]> wrote:
> The following code has me mystified:
>
> In [4]: class A(object):
> ...: def show(self):
> ...: print 'hello'
> ...:
> ...:
> In [5]: a = A()
> In [6]:
> In [7]: x = a.show
> In [8]: y = getattr(a, 'show')
> In [
Just some FYI options.
> if not matchfilename:
May return positive if you someday return an object that holds a 'not'
value.
> resultname="""
That starts a string literal.
> if (matchdistance < threshold):
Parentheses optional.
> return (matchdistance,resultname)
Parentheses opt
On 14/03/2008, Dustan <[EMAIL PROTECTED]> wrote:
> you.screw()
Ah, you are pushing sex pills.
> self.thank(God, encapsulation)
And bibles? Interesting combination.
> not self.want_to_know(you.screw.func_code)
Unsubscribe? I know better...
Dotan Cohen
http://what-is-what.com
http://gibberi
> On Behalf Of John Machin
> > '\xce\xde\xd0\xa7\xb5\xc4\xc0\xe0\xb1\xf0\xd7\xd6\xb7\xfb\xb4\xae',
> > None, None)
>
> Googling for 2147221005 gives some clues.
>
> That string of hex stuff appears where an error message is
> expected -- it's not utf8, and makes no sense when I attempt
> to dec
Chris wrote:
> No output because x is a NoneType...
That's behavior of the interactive interpreter when printing results of
expressions, not of print. It will print None.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!
Arnaud Delobelle wrote:
>
> 4. Both points above follow from the fact that foo.bar is really a
> function call that returns a (potentially) new object: in fact what
> really happens is something like
Arnaud and Imri, too -
No. foo.bar is *not* really a function/method call.
>
> Foo.__di
Dave Kuhlman wrote:
> Basically, the above code is saying that foo.foobar is not the same as
> getattr(foo, 'foobar').
Python promises that the behavior is the same. It does not promise that
the _objects_ will be the same, which is what `is` determines. That is,
you're not doing a useful test
On Mar 13, 5:16 pm, "David S" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have some code in which I have to change some path names to get it to
> work. The original code seems to have assumed that path names would not have
> any embedded spaces.
>
> I am not sure how to write the following line so when
The website you list regarding 9-letter scrambled words doesn't exist any
longer. Is there another way that I can access it to see your program you
designed? I have a nine letter work I need to unscramble. I will send it just
in case you can figure it out for me and let me know.
KAEOSYBR
> My understanding is that foo.bar does *not* create a new object.
Your understanding is not correct.
> All it
> does is return the value of the bar attribute of object foo. What new
> object is being created?
A bound method. This happens through the descriptor-protocol. Please see
this examp
> > Basically, the above code is saying that foo.foobar is not the same as
> > getattr(foo, 'foobar').
>
> > What gives? This breaks my understanding of id(), the is operator, and
> > getattr().
>
> 4. Both points above follow from the fact that foo.bar is really a
> function call that returns a
On Mar 13, 11:29 pm, Dave Kuhlman <[EMAIL PROTECTED]> wrote:
> Arnaud Delobelle wrote:
>
> > 4. Both points above follow from the fact that foo.bar is really a
> > function call that returns a (potentially) new object: in fact what
> > really happens is something like
>
> Arnaud and Imri, too -
>
Andrew Rekdal < wrote:
> I hope posting is ok here for this question...
>
> I am attempting to extract the text from a CSS comment using 're' such as...
>
> string = "/* CSS comment /*"
> exp = "[^(/*)].*[^(*/)] "
>
> p = re.compile(exp)
> q = p.search(string)
> r = q.group()
>
> print r
>
>>>
Diez B. Roggisch wrote:
>> My understanding is that foo.bar does *not* create a new object.
>
> Your understanding is not correct.
>
>> All it
>> does is return the value of the bar attribute of object foo. What new
>> object is being created?
>
> A bound method. This happens through the descr
I checked out the array module today. It claims that
arrays are 'efficient'. I figured that this must mean
that they are faster than lists, but this doesn't seem
to be the case:
one.py ##
import array
a = array.array('i')
for x in xrange(1000):
a.append
Hi!
Only under Windows, you can use PHPscript. It's the "active-scripting"
release of PHP.
With it, you can send PHP's functions (source), and call these functions
(with parameters).
With the same method, you can also use, from Python, VBscript, Jscript,
PerlScript, RubyScript.
@-salutations
This year, the EuroPython conference will take up residence for the
second time in Vilnius, Lithuania with the main programme of talks and
events taking place on Monday 7th, Tuesday 8th and Wednesday 9th July,
and with sprints continuing after the main programme until and
including Saturday 12th Ju
Mark Dickinson wrote:
> Sorting tuples, where the second item in the tuple should
> have the opposite ordering to the first is going to be
> a bit of a pain. Or even worse, where the ordering of the
> second item depends on the value of the first item in the
> tuple.
This is like some
On Mar 13, 7:18 pm, Mel <[EMAIL PROTECTED]> wrote:
> Diez B. Roggisch wrote:
> >> My understanding is that foo.bar does *not* create a new object.
>
> > Your understanding is not correct.
>
> >> All it
> >> does is return the value of the bar attribute of object foo. What new
> >> object is being
On Mar 13, 7:45 pm, [EMAIL PROTECTED] wrote:
> On Mar 13, 7:18 pm, Mel <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Diez B. Roggisch wrote:
> > >> My understanding is that foo.bar does *not* create a new object.
>
> > > Your understanding is not correct.
>
> > >> All it
> > >> does is return the value
On Mar 13, 8:15 pm, [EMAIL PROTECTED] wrote:
> On Mar 13, 7:45 pm, [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > On Mar 13, 7:18 pm, Mel <[EMAIL PROTECTED]> wrote:
>
> > > Diez B. Roggisch wrote:
> > > >> My understanding is that foo.bar does *not* create a new object.
>
> > > > Your understanding is not
On Mar 13, 7:38 pm, Alan Isaac <[EMAIL PROTECTED]> wrote:
> Mark Dickinson wrote:
> > Sorting tuples, where the second item in the tuple should
> > have the opposite ordering to the first is going to be
> > a bit of a pain. Or even worse, where the ordering of the
> > second item depends on the va
What is the fastest way to select N items at a time from a dictionary?
I'm iterating over a dictionary of many thousands of items.
I want to operate on only 100 items at a time.
I want to avoid copying items using any sort of slicing.
Does itertools copy items?
This works, but is ugly:
>>> from i
On Mar 13, 8:38 pm, Alan Isaac <[EMAIL PROTECTED]> wrote:
> Does this do it? ::
>
> key= lambda x: (-x[1],int(x2))
>
> Here I am depending on the lexicographic sorting of tuples.
> Without that there would be real trouble.
Close. :-)
I think it needs to be something like:
key = lambda x: (-x
> > Since you seem to know quite a bit about this topic, what is your
> > opinion on the apparently 'generic' algorithm described here:
> > http://grail.cs.washington.edu/projects/query/ ?
> > So far it seems to me that it does what I'm asking for, it does even
> > more because it can take a hand d
On Behalf Of John Machin
> > > '\xce\xde\xd0\xa7\xb5\xc4\xc0\xe0\xb1\xf0\xd7\xd6\xb7\xfb\xb4\xae',
> > > None, None)
>
>
> Googling for 2147221005 gives some clues.
>
> That string of hex stuff appears where an error message is
> expected -- it'
Noah <[EMAIL PROTECTED]> writes:
> What is the fastest way to select N items at a time from a dictionary?
> I'm iterating over a dictionary of many thousands of items.
> I want to operate on only 100 items at a time.
> I want to avoid copying items using any sort of slicing.
I'd do something like
Hi Patty,
That's easy solved, the word is keyboards.
I just did a google search for 'anagram solver' and got lucky with Andy's
free online anagram solver at http://www.ssynth.co.uk/~gay/anagram.html
:)
I know it's not a python script, though are you actually working on a python
program to de
On Mar 13, 6:34 pm, Noah <[EMAIL PROTECTED]> wrote:
> What is the fastest way to select N items at a time from a dictionary?
> I'm iterating over a dictionary of many thousands of items.
> I want to operate on only 100 items at a time.
> I want to avoid copying items using any sort of slicing.
> Do
On Mar 12, 8:32 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> On Wed, 2008-03-12 at 18:18 -0700, [EMAIL PROTECTED] wrote:
> > These pieces of text may have single and double quotes in
> > them, I tried escaping them using re module and string module and
> > either I did something wrong, or they e
Seems 'KEYBOARDS' works nicely
--
-- Andrew
"jcnbp8k" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi Patty,
>
> That's easy solved, the word is keyboards.
>
> I just did a google search for 'anagram solver' and got lucky with Andy's
> free online anagram solver at http://www
On Mar 14, 9:47 am, Justus Schwabedal <[EMAIL PROTECTED]>
wrote:
[snipped]
> However when I do this:
>
> bash-3.2$ cat execBug2.py
> #! /usr/bin/python
> header="""
> from scipy import randn
> def f():
> return randn()
> """
> def g():
> exec header
> return f()
> print "
hi frenz I Need a Python Script For read multiple files(.txt) from a
folder and write it in a single text file
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Dan Bishop wrote:
> Even assuming you meant (-x[0], int(x[1])), that sorts negative
> numbers in the wrong order. You want
> key = lambda x: (-1 if x[0] else 1) * int(x[1])
Sorry, was speed typing (very badly) and the question
actually had two different problem descriptions.
As you su
Hi,
I get
ERROR: ""C:\Program Files\apache-ant-1.7.0\bin\ant"" does not exist
If I cut the path statement here and paste it next to a windows XP command
prompt ant is invoked.
The python code here is
if not os.path.isfile(ANT_CMD):
error('"%s" does not exist' % ANT_CMD)
David
"Me
John Machin wrote:
> On Mar 14, 5:38 am, John Nagle <[EMAIL PROTECTED]> wrote:
>>Just noticed, again, that getattr/setattr are ASCII-only, and don't
>> support
>> Unicode.
>>
>>SGMLlib blows up because of this when faced with a Unicode end tag:
>>
>> File "/usr/local/lib/python2.5/
Aaron
thanx for the input
> > resultname="""
> > That starts a string literal.
i am not sure if this is the right way..i used it in case
matchdistance < threshold return False.then the filename will not be
taken from the filenameslist and so returns as an empty string.
> > return (mat
On Mar 14, 6:28 am, jai_python <[EMAIL PROTECTED]> wrote:
> hi frenz I Need a Python Script For read multiple files(.txt) from a
> folder and write it in a single text file
>
> Thanks
Take a look at the OS Module for the listdir funtion, you can use it
to build a list of all files in the give
On Mar 14, 1:53 am, John Nagle <[EMAIL PROTECTED]> wrote:
> John Machin wrote:
> > On Mar 14, 5:38 am, John Nagle <[EMAIL PROTECTED]> wrote:
> >>Just noticed, again, that getattr/setattr are ASCII-only, and don't
> >> support
> >> Unicode.
>
> >>SGMLlib blows up because of this when faced
Hello
I'd like to monitor connections to a remote SSH and web server. Does
someone have some code handy that would try to connect every 5mn, and
print an error if the script can't connect?
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
> > > resultname="""
> > > That starts a string literal.
>
> i am not sure if this is the right way..i used it in case
> matchdistance < threshold return False.then the filename will not be
> taken from the filenameslist and so returns as an empty string.
>a one-tuple
why not use None instea
101 - 149 of 149 matches
Mail list logo