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
similar circumstances.
The documentation: http://docs.python.org/ref/naming.html does not g
For my day job I am forced to run RHEL3 (and Centos3 on my desktop). I
want to be able to use a few applications that require Python 2.4.X but
RHEL3 ships with Python 2.2.3. I have tried to install and upgrade
Python 2.4.X many ways like using PyVault and doing a source based
install but each way h
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
> similar circumstances.
>
There has just been a long thread about th
Dear All,
I'm currently working on a project that needs to collect the output of
the JHOVE application. More information about the application is
available at this website:
http://hul.harvard.edu/jhove/
The application is written in Java and is executed by a shell script.
There are occasions whe
Frank Millman wrote:
> 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
> > similar circumstances.
> >
>
> With
[EMAIL PROTECTED] wrote:
> Suppose a C extension locally built an array of PyObject* 's as
> follows...
>
> my_array = malloc(n * sizeof(PyObject*));
> for (i = 0; i < n; i++) {
>my_array[i] = PyList_New(0);
> }
>
> Q1: Must I do a Py_DECREF(my_array[i]) on all elements
> before ex
Frank Millman wrote:
> So it looks as if x += [] modifies the list in place, while x = x + []
> creates a new list.
objects can override the += operator (by defining the __iadd__ method),
and the list type maps __iadd__ to extend. other containers may treat
+= differently, but in-place behavi
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 value"]
[["route","23"],["equip",
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.
I have put already much eff
Il Sun, 09 Jul 2006 04:24:01 GMT, crystalattice ha scritto:
> I can't see why it's saying this because Character.__init__(self) not only
> has self.attrib_dict = {} but it also calls the setAttribute method
> explicitly for each attribute name. If I do a print out of the dictionary
> just fo
Luis M. González a écrit :
> Bruno Desthuilliers wrote:
>
>>def doIt(name=None):
>> global gname
>> if name is None:
>>name = gname
>> else:
>>gname = name
>>
>
>
> Sorry for this very basic question, but I don't understand why I should
> add the global into the function body before u
Luis M. González a écrit :
(snip)
> OK, so I should include the global only if I plan to modify it.
> Otherwise, I don't need to include it. Am I right?
s/modify/rebind/
--
http://mail.python.org/mailman/listinfo/python-list
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
>>similar circumstances.
>>
>
>
> There
Paddy a écrit :
> Frank Millman wrote:
>
>>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
>>>similar circumsta
Pickling an instance of a class, gives "can't pickle instancemethod
objects". What does this mean? How do I find the class method creating
the problem?
--
http://mail.python.org/mailman/listinfo/python-list
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 language. I only know some BASH
>programming. I
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
:-(
Here is the code : http://devloop.lyua.org/releases/lswww_urllib2.py
def
__init__(self,rooturl,firsturl=[],forbidden=[],proxy={},
> 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 global.
>AP> want to know the scope of b on the other hand, you n
On Sun, 09 Jul 2006 04:24:01 +, crystalattice wrote:
> I've finally figured out the basics of OOP; I've created a basic character
> creation class for my game and it works reasonably well. Now that I'm
> trying to build a subclass that has methods to determine the rank of a
> character b
Dear all,
I have created a large Python-based GUI project and I'd like to use it
as a GUI interface for real time audio sequencing (using the
SuperCollider -SC- synthesis server).
Python (the client) and SC (the server) can communicate via OSC
protocol (there are available implementations). SC
On Sun, 09 Jul 2006 05:45:27 -0700, Jim Lewis wrote:
> Pickling an instance of a class, gives "can't pickle instancemethod
> objects". What does this mean?
It means you can't pickle instance methods.
> How do I find the class method creating the problem?
How about you post the complete stack t
> 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(*args)
File "C:\Public\world.py", line 1832, in BtnGo
DoBtnGo()
bruce wrote:
> r2 = br.follow_link(url_regex=re.compile(r"\*"),nr=1) <<<
Seems to me your regex is buggy. You are using a "raw string" yet you
still escape the asterisk ('*') with a backslash? This will only match
a string which contains an asterisk, while I'm guessing you're trin
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:
for ind in range(num_arrays):
(Damn gmane's authorizor, I think I lost four postings because the
auth messages went to my work email address (and I thought the
authorization was supposed to be one-time only per group anyway??). I
deleted them as spam since I hadn't posted from there for days :-(
Grrr. At least I could reconst
Sheldon skrev:
> 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:
> for
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-
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
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
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
"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
"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
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
[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:/
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
> 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
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
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
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
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
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
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
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
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
"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
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.
[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
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] (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
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
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
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 -
"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
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
[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
"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
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)
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
>
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
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
[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)
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
> 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
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
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
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
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.
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
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
[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
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
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
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
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
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
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..
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
Bruno Desthuilliers wrote:
Ta.
--
http://mail.python.org/mailman/listinfo/python-list
> 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
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])
>
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
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
"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.
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
"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
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
"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
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
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
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 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
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
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'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
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), [
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 <[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
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
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
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
1 - 100 of 126 matches
Mail list logo