Robert Kern skrev:
> Sheldon wrote:
> > Hi,
> >
> > I am trying to build a large array using concatenate function in
> > python.
> > So as I loop over the number of arrays, of which there are 12 (4 down
> > and 3 across), I create 3 long arrays by concatenating them at the
> > bottom and then con
ive been trying to do a test for type with wxpython objects
like
passing in a wx.TextCtrl into
def XXX(obj)
if type(obj) is type(self.Button)
I have to make an object self.Button to get its type.
as I tried is type("wx.Button") which didnt work.
trouble is the button must have a parent, whi
greenflame wrote:
> Jason wrote:
> >
> > There /are/ a few hacks which will do what you want. However, if you
> > really need it, then you probably need to rethink your program design.
> > Remember, you can't change a string since a string is immutable! You
> > can change a variable to bind to an
placid wrote:
> quick hack
>
> def thefunc(s):
> return s = "||" + s + ">>"
>>> def thefunc(s):
return s = "||" + s + ">>"
SyntaxError: invalid syntax
--
http://mail.python.org/mailman/listinfo/python-list
Chris Smith wrote:
>
> [...] static typing does ... doesn't imply any constraints on the kind
> of behavioral property that's being checked; but only on the way that
> the check occurs.
Nice post.
Marshall
--
http://mail.python.org/mailman/listinfo/python-list
George Neuner wrote:
> Now this is getting ridiculous.
It's not at all ridiculous. The fact that it seems ridiculous is a good
reason to educate people about what static typing does (and doesn't)
mean, and specifically that it doesn't imply any constraints on the kind
of behavioral property t
I am currently working a program that was intended to be purely JS and
AJAX. Due to the cross domain access problems i have defaulted to a
language I enjoy more, Python. My project consists of a web service
that provides information from a site that can only be accessed through
a portal type system
Steven Bethard wrote:
> The advantage of a functional form over a method shows up when you write
> a function that works on a variety of different types. Below are
> implementations of "list()", "sorted()" and "join()" that work on any
> iterable and only need to be defined once::
>
> def
hi...
it appears that i'm running into a possible problem with
mechanize/browser/python rgarding the "select_form" method. i've tried the
following and get the error listed:
br.select_form(nr = 1)
br.select_form(name="foo")
br.select_form(name=foo)
br.select_form(name="foo")
here's a short
Good point, thanks.
But if (as I proposed..!) the user interface is better if presented as a
method. one could porovide convenience methods which would then
interface to these underlying library functions; yes?
So the main datatype classes could support such a method style, and just
layer on t
Jason wrote:
>
> You cannot do what you are trying to do directly. Strings are
> immutable objects. Once a string is created, that string cannot be
> modified. When you operate on a string, you produce a different
> string. Functions which operate on a string should return their value:
>
> >>>
Gregory Piñero wrote:
> Shane Wrote:
>> Ah, so you also want to distribute untrusted Python code. That's fairly
>> hard. There's a discussion about it on Python-Dev right now.
>
> Well, I want to write a game in Pygame, and people can just go to my
> website and play it within their browser. I
On Mon, 26 Jun 2006 11:49:51 -0600, Chris Smith <[EMAIL PROTECTED]>
wrote:
>Pascal Costanza <[EMAIL PROTECTED]> wrote:
>
>> This is maybe better understandable in user-level code. Consider the
>> following class definition:
>>
>> class Person {
>>String name;
>>int age;
>>
>>void bu
Many thanks; great information.
Best,
Gregory
Steven Bethard wrote:
> guthrie wrote:
>
>> Steven Bethard wrote:
>>
>>> Why would ``x.len()`` be any more convenient than ``len(x)``? Your
>>> preference here seems pretty arbitrary.
>>
>> -- Perhaps;
>> but having all standard operations as a m
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How can I add a method to the int class?
You can't. The closest is to subclass int and add your method.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> How can I add a method to the int class?
sub class it
>>> class MyInt(int):
>>>def times(self,multiple):
>>> return self * multiple
>>>
>>> a = 2
>>> print a
2
>>> a = MyInt(2)
>>> print a
>>> 2
>>> print a.times(2)
4
--Cheers
--
h
Terry Reedy wrote:
> "Gregory Guthrie" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> - why is len() not a member function of strings? Instead one says
>> len(w).
>
> Consider
map(len, ('abc', (1,2,3), [1,2], {1:2}))
> [3, 3, 2, 1]
>
> Now try to rewrite this using meth
greenflame wrote:
> I want to make a function that does the following. I will call it
> thefunc for short.
>
> >>> s = "Char"
> >>> thefunc(s)
> >>> s
> '||Char>>'
>
> I tried the following
>
> def thefunc(s):
> s = "||" + s + ">>"
>
> The problem is that if I look at the string after I apply
guthrie wrote:
> Steven Bethard wrote:
>> Why would ``x.len()`` be any more convenient than ``len(x)``? Your
>> preference here seems pretty arbitrary.
> -- Perhaps;
> but having all standard operations as a method seems more regular (to
> me), and allows a simple chained operation format of a se
How can I add a method to the int class?
--
http://mail.python.org/mailman/listinfo/python-list
greenflame wrote:
> I want to make a function that does the following. I will call it
> thefunc for short.
>
> >>> s = "Char"
> >>> thefunc(s)
> >>> s
> '||Char>>'
>
> I tried the following
>
> def thefunc(s):
> s = "||" + s + ">>"
>
> The problem is that if I look at the string after I apply t
"OKB (not okblacke)" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Terry Reedy wrote:
>
>> Consider
> map(len, ('abc', (1,2,3), [1,2], {1:2}))
>> [3, 3, 2, 1]
>>
>> Now try to rewrite this using methods (member functions).
>
> [a.len() for a in ('abc', (1,2,3), [1,2], {1:2})]
Steven Bethard wrote:
> Gregory Guthrie wrote:
>
>> For example,
>>- why is len() not a member function of strings? Instead one says
>> len(w).
>
> Why would ``x.len()`` be any more convenient than ``len(x)``? Your
> preference here seems pretty arbitrary.
-- Perhaps;
but having all standa
I want to make a function that does the following. I will call it
thefunc for short.
>>> s = "Char"
>>> thefunc(s)
>>> s
'||Char>>'
I tried the following
def thefunc(s):
s = "||" + s + ">>"
The problem is that if I look at the string after I apply the function
to it, it is not modified. I r
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
...
> > This would allow things like:
> > key = '',join( list(word.lower().strip()).sort() )
>
> key = ''.join(list(sorted(word.lower().strip()))
No need to make yet another list here (also, I think each of you omitted
a needed closed-
IOANNIS MANOLOUDIS wrote:
> I want to learn python.
> I plan to buy a book. I always find printed material more convenient than
> reading on-line tutorials.
> I don't know PERL or any other scripting language. I only know some BASH
> programming. I am looking for a book which will help me get star
I guess it's better to wait for the for dummies book.
I should focus instead in taking the LPIC-2 exams in September.
Ioannis
--
http://mail.python.org/mailman/listinfo/python-list
update.
out of curiosity, i fetched the latest mechanize from svn.. i get the same
error with the parse...
i've also tried to do:
br.select_form(nr = 1)
br.select_form(name="foo")
br.select_form(name=foo)
br.select_form(name="foo")
etc same err occurs...
-bruce
hi john...
not s
Luis P. Mendes wrote:
> Gregory Piñero escreveu:
> > On 7/7/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> I know that pyExelerator is the supported project now, but I can't use
> >> it because I'd need it to generate files from a web platform. Since I
> >> can not save a file to
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> Length is an obvious property of any one-dimensional non-scalar, not just
> strings. As such, it makes sense to have a length function that takes an
> argument. As a design decision, it could go either way, but early
> Python wasn't fully object-oriente
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> >> Now try to rewrite this using methods (member functions).
> > [a.len() for a in ('abc', (1,2,3), [1,2], {1:2})]
>
> Did you actually try that?
No of course not. It's in a hypothetical python where .len() is a
class operation instead of a global fu
Steven D'Aprano wrote:
> On Sun, 09 Jul 2006 22:45:53 +, OKB (not okblacke) wrote:
>
>> Terry Reedy wrote:
>>
>>> Consider
>> map(len, ('abc', (1,2,3), [1,2], {1:2}))
>>> [3, 3, 2, 1]
>>>
>>> Now try to rewrite this using methods (member functions).
>> [a.len() for a in ('abc', (1,2,3), [
hi..
i'm trying to figure out how to uninstall "mechanize". i don't see an
"unistall" from the "python --help-commands" function...
i'm looking to rebuild/reinstall mechanize from the svn repos to try to see
if an apparent parsing issue that i mentioned is fixed...
thanks
-bruce
--
http://m
Gregory Piñero escreveu:
> On 7/7/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I know that pyExelerator is the supported project now, but I can't use
>> it because I'd need it to generate files from a web platform. Since I
>> can not save a file to a file-like object, I have to use py
Hi,
I already have a couple of newbie books on Python itself, but would
rather get started with a nice to use IDE and I am therefore looking
for a good IDE to learn Python. On my computer I have installed eric
(http://ericide.python-hosting.com/) but it lacks any kind of useful
documentation on i
On Sun, 09 Jul 2006 22:45:53 +, OKB (not okblacke) wrote:
> Terry Reedy wrote:
>
>> Consider
> map(len, ('abc', (1,2,3), [1,2], {1:2}))
>> [3, 3, 2, 1]
>>
>> Now try to rewrite this using methods (member functions).
>
> [a.len() for a in ('abc', (1,2,3), [1,2], {1:2})]
Did you actually
Hello,
I am trying to validate the following .py webpage as HTML (through
W3C).
I put:
-
print "Content-type: text/html; charset=utf-8"
import time
print
print """
Current Time
Current Time"""
print "Right now
On Sun, 09 Jul 2006 12:19:13 -0500, Gregory Guthrie wrote:
> I am comparing Python to a few other scripting languages, and used a simple
> anagrams program as a sample.
>
> I was surprised ast a few python features that did not work as I would
> expect/wish; which caused less compact/expressive
Rune Strand wrote:
> My wil guess is that it is a firewall problem. Perhaps you'll have to
> specify that python.exe is trusted.
Tried that - it didn't work. I also tried turning off the User Account
Control and ran as full administrator - that didn't work too.
--
http://mail.python.org/mailman
"Terry Reedy" <[EMAIL PROTECTED]> writes:
> Consider
> >>> map(len, ('abc', (1,2,3), [1,2], {1:2}))
> [3, 3, 2, 1]
>
> Now try to rewrite this using methods (member functions).
[x.len() for x in ('abc', (1,2,3), [1,2], {1:2})]
> > - Why doesn't sort() return a value?
>
> Because it is an in-pl
Terry Reedy wrote:
> Consider
map(len, ('abc', (1,2,3), [1,2], {1:2}))
> [3, 3, 2, 1]
>
> Now try to rewrite this using methods (member functions).
[a.len() for a in ('abc', (1,2,3), [1,2], {1:2})]
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, inste
"Gregory Guthrie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> - why is len() not a member function of strings? Instead one says
> len(w).
Consider
>>> map(len, ('abc', (1,2,3), [1,2], {1:2}))
[3, 3, 2, 1]
Now try to rewrite this using methods (member functions).
> - Why d
Tim Golden wrote:
> Claudio Grondi wrote:
>
>> I am aware, that it is maybe the wrong group to ask this question, but
>> as I would like to know the history of past file operations from
>> within a Python script I see a chance, that someone in this group was
>> into it already and is so kind to
"homeprice maps" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>dear python ,
Python is a language, not a person that can act in in this universe.
>as a result of the following posting we are receiving emails from >people
>regarding services and websites we have no relation to.
Dennis Lee Bieber wrote:
> On 9 Jul 2006 11:14:25 -0700, "John Hicken" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
> > Anyway, there are two sorts of functions that could be useful.
> > 1) A function that gives the size of a hard drive (or other drive, in
> > this case t
faulkner wrote:
> you want a directory watching daemon. it isn't hard at all to build
> from scratch.
> first, determine which directories should be watched.
> then, os.walk each directory, building a mapping from filename to mtime
> [modified time; os.path.getmtime].
> next is your main event loop
Thanks Marc, that was very helpful.
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, manstey wrote:
>
> > I often have code like this:
> >
> > data='asdfbasdf'
> > find = (('a','f')('s','g'),('x','y'))
> > for i in find:
> >if i[0] in data:
> >data = data.replace(i[0],i[1])
>
> Here's a thought: comment out every attribute in your class, and then try
> pickling it. If it succeeds, uncomment just *one* attribute, and try
> pickling again. Repeat until pickling fails.
Was trying to avoid that but you motivated me to do so and now I found
the probem.
In a utility routine
Bruno Desthuilliers wrote:
Ta.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Paddy wrote:
>
> > ... irrelevant as in 'although only mutable objects can have their
> > state modified; if n has a mutable value but the assignment statement
> > changed n to refer to another object, then the name would be tagged as
> > local'?
> >
> > Oh bosh, can anyone
Paddy a écrit :
> Dennis Lee Bieber wrote:
>
>>On 9 Jul 2006 11:30:06 -0700, "Paddy" <[EMAIL PROTECTED]> declaimed
>>the following in comp.lang.python:
>>
>>
>>>So,
>>>An assignment statement may assign an object to a name, in which case
>>>the name is 'tagged' as being local,
>>
>> Reverse..
Thanks Paul,
that's what I suspected.
-a-
On 9 Jul 2006, at 19:22, Paul Rubin wrote:
> andrea valle <[EMAIL PROTECTED]> writes:
>> In order to have sequencing I have to send at precise timing messages
>> from Python to SC. Obviously, being a musical application, I need
>> millisecond time accu
Dennis Lee Bieber wrote:
> On 9 Jul 2006 11:30:06 -0700, "Paddy" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> > So,
> > An assignment statement may assign an object to a name, in which case
> > the name is 'tagged' as being local,
>
> Reverse... Python does not "assi
Use nested list comprehensions:
matrix = [[0.0 for x in xrange(n)] for y in xrange(m)]
This is similar to "float matrix[m][n]" in C.
All cells are independent of each other in doing this.
--
http://mail.python.org/mailman/listinfo/python-list
Schüle Daniel schrieb:
> [EMAIL PROTECTED] schrieb:
>> i used C too much and haven't used Python for a while...
>>
>> like in C, if we want an array of array of float, we use
>>
>> float a[200][500];
>>
>> now in Python, seems like we have to do something like
>>
>> a = [ [ ] ] * 200
>>
>> and then
Bruno Desthuilliers wrote:
> Paddy a écrit :
> > Bruno Desthuilliers wrote:
> >
> >>Frank Millman a écrit :
> >>
> >>>Paddy wrote:
> >>>
> >>>
> Hi,
> I am trying to work out why I get UnboundLocalError when accessing an
> int from a function where the int is at the global scope, witho
[EMAIL PROTECTED] schrieb:
> i used C too much and haven't used Python for a while...
>
> like in C, if we want an array of array of float, we use
>
> float a[200][500];
>
> now in Python, seems like we have to do something like
>
> a = [ [ ] ] * 200
>
> and then just use
>
> a[1].append(12.3
Sheldon wrote:
> Hi,
>
> I am trying to build a large array using concatenate function in
> python.
> So as I loop over the number of arrays, of which there are 12 (4 down
> and 3 across), I create 3 long arrays by concatenating them at the
> bottom and then concatenating them side by side:
[snip
hi john...
not sure exactly who i should talk to tabout this..but here goes...
i have the following piece of code... i'm trying to do a select form, and my
test throws an error...
i have the actual form "main" in the html, so it should find it... as far as
i can tell, i've followed the docs.. bu
Patch / Bug Summary
___
Patches : 393 open (+15) / 3315 closed (+17) / 3708 total (+32)
Bugs: 908 open (+22) / 5975 closed (+49) / 6883 total (+71)
RFE : 223 open ( -1) / 229 closed ( +2) / 452 total ( +1)
New / Reopened Patches
__
test_grp.
The following behavior surprised me. I have a Tk window and launch a
file save dialog from it. When the filesave dialog is finished, it
calls callbacks bound to the destroy event on the main window. Is
this expected, and can I avoid this?
To expose the problem, run this script and click the mo
Gregory Guthrie wrote:
> I am comparing Python to a few other scripting languages, and used a simple
> anagrams program as a sample.
>
> I was surprised ast a few python features that did not work as I would
> expect/wish; which caused less compact/expressive program styles that I
> wanted - rever
Paddy a écrit :
> Bruno Desthuilliers wrote:
>
>>Frank Millman a écrit :
>>
>>>Paddy wrote:
>>>
>>>
Hi,
I am trying to work out why I get UnboundLocalError when accessing an
int from a function where the int is at the global scope, without
explicitly declaring it as global but not
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> When someone gets confused over the difference between rebinding or
>AP> mutating a variable on an intermediate scope, the explanation he
>AP> mostly seems to get boils down to: one is rebinding, the other is
>AP> mutation, this is a fundame
Bruno Desthuilliers wrote:
> hdixon a écrit :
> > Ive spent a few days going thru a couple of Python tutorials. No
> > problem until I got to classes. I guess my java mindset is blocking my
> > vision.
>
> Then http://dirtsimple.org/2004/12/python-is-not-java.html
>
> > I've borrowed another threa
[EMAIL PROTECTED] wrote:
> i used C too much and haven't used Python for a while...
>
> like in C, if we want an array of array of float, we use
>
> float a[200][500];
>
> now in Python, seems like we have to do something like
>
> a = [ [ ] ] * 200
>
> and then just use
>
> a[1].append(12.34)
Paddy wrote:
> ... irrelevant as in 'although only mutable objects can have their
> state modified; if n has a mutable value but the assignment statement
> changed n to refer to another object, then the name would be tagged as
> local'?
>
> Oh bosh, can anyone come at it from a different tack?
l
Paddy wrote:
>
> So,
> An assignment statement may assign an object to a name, in which case
> the name is 'tagged' as being local,
> An assignment statement may mutate a mutable object already bound to a
> name, in which case the assignment will not 'tag' the name as being
> local.
>
> I guess
Bruno Desthuilliers wrote:
> Frank Millman a écrit :
> > Paddy wrote:
> >
> >>Hi,
> >>I am trying to work out why I get UnboundLocalError when accessing an
> >>int from a function where the int is at the global scope, without
> >>explicitly declaring it as global but not when accessing a list in
>
I'm creating a Python program to pick a random set of mp3s, to copy to
my mp3 player, so I can regularly get a new set to listen to.
Anyway, there are two sorts of functions that could be useful.
1) A function that gives the size of a hard drive (or other drive, in
this case the mp3 player itself)
"faulkner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> you want a directory watching daemon. it isn't hard at all to build
> from scratch.
> first, determine which directories should be watched.
> then, os.walk each directory, building a mapping from filename to mtime
> [modified
[EMAIL PROTECTED] wrote:
> i used C too much and haven't used Python for a while...
>
> like in C, if we want an array of array of float, we use
>
> float a[200][500];
>
> now in Python, seems like we have to do something like
>
> a = [ [ ] ] * 200
>
> and then just use
>
> a[1].append(12.34
i used C too much and haven't used Python for a while...
like in C, if we want an array of array of float, we use
float a[200][500];
now in Python, seems like we have to do something like
a = [ [ ] ] * 200
and then just use
a[1].append(12.34) etc
but it turns out that all 200 elements poin
"faulkner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> you want a directory watching daemon. it isn't hard at all to build
> from scratch.
> first, determine which directories should be watched.
> then, os.walk each directory, building a mapping from filename to mtime
> [modified
Gregory Guthrie a écrit :
> I am comparing Python to a few other scripting languages, and used a simple
> anagrams program as a sample.
>
> I was surprised ast a few python features that did not work as I would
> expect/wish; which caused less compact/expressive program styles that I
> wanted -
Gregory Guthrie wrote:
> For example,
>- why is len() not a member function of strings? Instead one says len(w).
Why would ``x.len()`` be any more convenient than ``len(x)``? Your
preference here seems pretty arbitrary.
> - Why doesn't sort() return a value?
>
> This would allow thing
andrea valle <[EMAIL PROTECTED]> writes:
> In order to have sequencing I have to send at precise timing messages
> from Python to SC. Obviously, being a musical application, I need
> millisecond time accuracy, with less latency as possible or at least a
> fixed (short) latency. More, I need to have
[EMAIL PROTECTED] (Alex Martelli) writes:
> Yes, Perl IS harder to learn, BUT -- if you've already decided to learn
> both languages, starting with the harder one need not be a bad idea (the
> Romans' legions, back when they were the best soldiers in the world,
"Learning Perl" is actually a very w
I am comparing Python to a few other scripting languages, and used a simple
anagrams program as a sample.
I was surprised ast a few python features that did not work as I would
expect/wish; which caused less compact/expressive program styles that I
wanted - reverting to a FORTRAN like series of
[EMAIL PROTECTED] writes:
> Hi !
> I'm trying to add the HTTP basic authentification to my web spider but
> it doesn't work...
> The HTTPBasicAuthHandler don't send the headers for authentification
> :-(
Hi
Several bugs were fixed with Basic auth in Python 2.5. I'd be most
grateful if you can v
Claudio Grondi wrote:
> I am aware, that it is maybe the wrong group to ask this question, but
> as I would like to know the history of past file operations from within
> a Python script I see a chance, that someone in this group was into it
> already and is so kind to share here his experience.
"BJörn Lindqvist" <[EMAIL PROTECTED]> writes:
> I have some very serious trouble getting cookes to work. After a lot
> of work (urllib2 is severly underdocumented, arcane and overengineerd
> btw) I'm finally able to accept cookes from a server. But I'm still
And a good day to you too ;-)
In pass
IOANNIS MANOLOUDIS <[EMAIL PROTECTED]> wrote:
> I thank everybody for your replies.
> I think I'll get Hertland's book since it's newer than O'reillys.
> I don't want to become a programmer. Neither Python is part of my studies.
> I've finished with my studies. I want to become a Unix/Linux admin
Aahz <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> IOANNIS MANOLOUDIS <[EMAIL PROTECTED]> wrote:
> >
> >I want to learn python.
> >I plan to buy a book. I always find printed material more convenient than
> >reading on-line tutorials.
> >I don't know PERL or any other scripting l
Gerard Flanagan wrote:
> kepioo wrote:
> > Hi all,
> >
> > I am trying to write an xml aggregator, but so far, i've been failing
> > miserably.
> >
> > what i want to do :
> >
> > i have entries, in a list format :[[key1,value],[key2,value],[
> > key3,value]], value]
> >
> > example :
> > [["route
On Sun, 09 Jul 2006 08:39:29 -0700, Jim Lewis wrote:
>> I'd suggest that "pop" could be your culprit. ...What is pop? A function or
>> an instance method?
>
> Neither. pop is an instance of a class, like:
> class X:
>...
> pop = X ()
>
> pop surely is the culprit but it has arrays of object
On 2006-07-08, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On 8 Jul 2006 18:52:56 GMT, Antoon Pardon <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>>
>> I'm not fooled by that phrase. I just think the mutate vs rebind
>> explanation is not complete.
>>
>> If we have tw
you want a directory watching daemon. it isn't hard at all to build
from scratch.
first, determine which directories should be watched.
then, os.walk each directory, building a mapping from filename to mtime
[modified time; os.path.getmtime].
next is your main event loop. this while loop consists o
hdixon a écrit :
> Ive spent a few days going thru a couple of Python tutorials. No
> problem until I got to classes. I guess my java mindset is blocking my
> vision.
Then http://dirtsimple.org/2004/12/python-is-not-java.html
> I've borrowed another thread's code snippet and cannot explain
> the
On 2006-07-09, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>
>>AP> It is conceptually different. In the line 'a = b' you don't need to
>>AP> search for the scope of a. You know it is the current scope, if you
>
> Except when it has been declared
> I'd suggest that "pop" could be your culprit. ...What is pop? A function or
> an instance method?
Neither. pop is an instance of a class, like:
class X:
...
pop = X ()
pop surely is the culprit but it has arrays of objects, etc., and I
don't know what to look for.
--
http://mail.python.or
Ive spent a few days going thru a couple of Python tutorials. No
problem until I got to classes. I guess my java mindset is blocking my
vision. I've borrowed another thread's code snippet and cannot explain
the results:
class MyClass:
list = []
myvar = 10
def add(self, x):
self
[EMAIL PROTECTED] writes:
> > Untestetd, but I'm pretty sure something like this will do.
> > If you need more control, and on windows, try pywinauto
>
> I do need it to run on Windows. I'll check out pywinauto. Thanks.
Note he didn't say you *need* pywinauto to run on Windows.
John
--
http:/
On Sun, 09 Jul 2006 07:06:25 -0700, Jim Lewis wrote:
>> How about you post the complete stack trace of the exception?
>
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "C:\program files\python\lib\lib-tk\Tkinter.py", line 1345, in
> __call__
> return self.func(*a
"bruce" <[EMAIL PROTECTED]> writes:
> i'm trying to get the pages from a site "axess.stanford.edu", and i'm
> running into problems. i've got some test code that allows me to get the 1st
> few pages. i'm having an issue when i run into a page that somehow
> interprets a url from a src of a framese
"bruce" <[EMAIL PROTECTED]> writes:
> i have the following section of test code where i'm trying to get the
> attribute of a frame
>
>
> i'm trying to print/get the src value. the xpath query that i have displays
> the "src" attribute in the Xpather/Firefox plugin. however, i can't quite
> fi
kepioo wrote:
> Hi all,
>
> I am trying to write an xml aggregator, but so far, i've been failing
> miserably.
>
> what i want to do :
>
> i have entries, in a list format :[[key1,value],[key2,value],[
> key3,value]], value]
>
> example :
> [["route","23"],["equip","jr2"],["time","3pm"]],"my first
I'd like to make code.InteractiveConsole function just like the normal
Python console. However, when I try to use the arrow keys to recall
command history, all I get is ^[[A^[[B. I've seen the example at
http://docs.python.org/lib/readline-example.html
but this doesn't seem to work at all, altho
I thank everybody for your replies.
I think I'll get Hertland's book since it's newer than O'reillys.
I don't want to become a programmer. Neither Python is part of my studies.
I've finished with my studies. I want to become a Unix/Linux admin and
knowledge of either Python or Perl is an asset.
Do
Stefan Behnel <[EMAIL PROTECTED]> writes:
[...]
> I'm not quite sure how this is supposed to be related to Python, but if you're
> trying to find a sibling, what about using the "sibling" axis in XPath?
There's no "sibling" axis in XPath. I'm sure you meant
"following-sibling" and/or "preceding-
1 - 100 of 126 matches
Mail list logo