Mark <[EMAIL PROTECTED]> writes:
> Of course I realise the modern mantra that "premature optimisation is
> the root of all evil" but I don't subscribe to it. Programmers have been
> "encouraged" to not give a toss about efficiency and the outcome is all
> too apparent - most software today looks
On Mar 24, 5:37 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 23 Mar 2007 16:34:22 -0300, Gabriel Genellina
> <[EMAIL PROTECTED]> escribió:
>
> >> What about calling mscvrt_get_osfhandle from inside the SWIG wrapper?
> >> I tried this but it seemed that the function was not exported
On Mar 25, 2:46 am, Mark <[EMAIL PROTECTED]> wrote:
> On Sat, 24 Mar 2007 07:21:21 -0700, irstas wrote:
> > A simple implementation that "works":
>
> Not quite irstas BTW ..
I was expecting this, hence the quotes around 'works' :P.
Another known issue is that globals() dictionary is somewhat
diffe
On Sat, 24 Mar 2007 23:43:10 -0700, bullockbefriending bard wrote:
> z_list = [Z(y.var1, y.var2,..) for y in list_of_objects_of_class_Y]
>
> Of course this just gives me a plain list and no access to the
> methodsof z_list.
List comprehensions give you a list. If you want to convert that list in
On Mar 25, 9:13 am, "7stud" <[EMAIL PROTECTED]> wrote:
> MyClass.someFunc
>
> Is there some other way to retrieve a user-defined function object
> from a class other than using the class name or an instance?
What Steven B. already said, MyClass.__dict__['someFunc'], is a
different way than MyClass
Thanks! I went with extend and generator expression as I *am* dealing
with rather a lot of data. Now I think I'm going to go on a little
hunt through my code looking for more places where I should replace
list comprehensions with generator expressions - bit of a newbie here.
On Mar 25, 3:57 pm, St
On Sun, 25 Mar 2007 07:10:23 +, Mark wrote:
> On Sun, 25 Mar 2007 13:40:33 +1000, Steven D'Aprano wrote:
>> Because this is entirely a trivial saving. Who cares? Sheesh.
>> ...
>> Saving 18ms on a script that takes 50ms to execute *might* be
>> worthwhile, ...
>
> I don't understand your atti
Here's a simple class-factory function that returns a sub-class of the
old-style class it is passed.
def verbosify_oclass(klass):
"""Returns a verbose sub-class of old-style klass."""
class VClass(klass):
def __init__(self, *args, **kwargs):
Steven D'Aprano wrote:
> Here's a simple class-factory function that returns a sub-class of the
> old-style class it is passed.
>
> def verbosify_oclass(klass):
> """Returns a verbose sub-class of old-style klass."""
> class VClass(klass):
> def __init__(self, *args, **kwargs):
> print "Calling i
Mark <[EMAIL PROTECTED]> writes:
> Of course I realise the modern mantra that "premature optimisation is
> the root of all evil" but I don't subscribe to it.
Note the first word - premature. It's an important distinction, and you've
entirely missed it.
Optimization is premature if you haven't ye
On 24 Mar, 18:55, "7stud" <[EMAIL PROTECTED]> wrote:
> I don't know if there is a framework install for 2.5.
http://www.python.org/ftp/python/2.5/python-2.5-macosx.dmg
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html
On 25 Mar, 06:11, "7stud" <[EMAIL PROTECTED]> wrote:
> There it is. I notice there is a directory: /Python.framework/
> Versions/2.3/Mac/Tools/IDE
> which has a bunch of files in it. Do Macs have some kind of pre-
> installed Python IDE? There's no read me file, so I can't tell what
> all th
I have a simple page that I want to display a menu and toolbar. I
have followed the tutorials and have made some customizations to the
basic code snippet found at
http://www.pygtk.org/pygtk2tutorial/examples/uimanager.py
However my customized code does not display the menu bar. It displays
the
Hello,
when I execute the following code (python 2.5)
def f(x):
def g():
return x
return g
print f(1)
print f(2)
I get an output like
So according to print I get the same function object returned at both
calls.
That's surprising, I would expect to get two distinct function o
On 25 Mar 2007 03:59:52 -0700, [EMAIL PROTECTED] wrote:
>Hello,
>
>when I execute the following code (python 2.5)
>
>def f(x):
>def g():
>return x
>return g
>
>print f(1)
>print f(2)
>
>I get an output like
>
>
>
>
>So according to print I get the same function object returned at
[EMAIL PROTECTED] writes:
> Is there any possible way that I can place a .py file on the internet,
> and use that source code in an .py file on my computer?
Besides Alex suggestion, you can also check Pyro.
--
Jorge Godoy <[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo/pyt
On 24 Mar, 18:30, "Robert Hicks" <[EMAIL PROTECTED]> wrote:
> I want to upgrade to 2.5 but I don't see any unistall instructions
> anywhere.
To repeat what others have said: don't uninstall existing
Python.framework builds. Frameworks support multiple versions quite
happily, and removing them is m
Facundo Batista wrote:
> "not line" and "len(line) == 0" is the same as long as "line" is a
> string.
>
> He's checking ok, 'cause a "blank line" has a lenght > 0 (because
> of newline).
Ah, K. Normally, I strip the read line and then test "if not line".
His check /is/ okay, but IMHO it's a litt
Felipe Almeida Lessa wrote:
> Could you tell me what in Python isn't an object?
Difficult ;) All data structures are (CMIIW). Functions and Types
are objects, too.
> Are you counting old-style classes and instances as "not object"s?
No, both are.
Regards,
Björn
--
BOFH excuse #366:
ATM c
On Mar 25, 1:04 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On 25 Mar 2007 03:59:52 -0700, [EMAIL PROTECTED] wrote:
>
>
>
> >Hello,
>
> >when I execute the following code (python 2.5)
>
> >def f(x):
> >def g():
> >return x
> >return g
>
> >print f(1)
> >print f(2)
>
> >I ge
Chris wrote:
> Hi,
>
> If a user resizes a Toplevel window, or I set a Toplevel's geometry
> using the geometry() method*, is there any way to have the geometry
> reset to that required for all the widgets?
>
> I think I found what I'm looking for in tk itself:
> """
> 13.3. How can I clear the g
On Sun, 25 Mar 2007 03:59:52 -0700, dartsch wrote:
> I get an output like
>
>
>
>
> So according to print I get the same function object returned at both
> calls.
Not the same function object. The first object is printed, then deleted
by the garbage collector because it goes out of scope. Th
On Sun, 25 Mar 2007 11:58:00 +0200, Peter Otten wrote:
>> But it doesn't work:
>>
> vint = verbosify_nclass(int)
> vint(42)
>> Calling constructor __new__ ...
>> Traceback (most recent call last):
>> File "", line 1, in
>> File "", line 6, in __new__
>> TypeError: object.__new__(VCla
James Stroud wrote:
> Chris wrote:
>> Hi,
>>
>> If a user resizes a Toplevel window, or I set a Toplevel's geometry
>> using the geometry() method*, is there any way to have the geometry
>> reset to that required for all the widgets?
>>
>> I think I found what I'm looking for in tk itself:
>> """
>
James Stroud wrote:
> James Stroud wrote:
>> Chris wrote:
>>> Hi,
>>>
>>> If a user resizes a Toplevel window, or I set a Toplevel's geometry
>>> using the geometry() method*, is there any way to have the geometry
>>> reset to that required for all the widgets?
>>>
>>> I think I found what I'm look
> After playing with this an inordinate amount of time, I found that one
> does need to supply parameters, namely the null parameter of an empty
> string. Try:
>
>sometop.geometry('')
>
> This repacks according to the widgets. Not quite clear from the
> miserable docs, is it?
Wow, that does
Shane,
I figured it out... Pycron does not work with mapped drives. My
script was supposed to copy files from a mapped drive to a local
folder... I had set up my batch command as copy M:\foldername\*.*,
where M: is a mapped drive pointing to the network share; M: is
defined on the PC running th
Anastasios Hatzis wrote:
> I'm working on a tool which is totally command-line based and consisting of
> multiple scripts. The user can execute a Python script in the shell, this
> script does some basic verification before delegating a call into my tool's
> package and depending on some argumen
Hi!
Can an instance of a class in a module, in any simple way find out which
other classes that exists in said module ?
-- Roland
--
http://mail.python.org/mailman/listinfo/python-list
hi
i want to ask about the algorithm's steps of saving games(sudoku,battleship)?
thank you
-
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.--
http://mail.python.org/mailman/listinfo/python-list
Roland Hedberg wrote:
> Can an instance of a class in a module, in any simple way find out which
> other classes that exists in said module ?
set(v for v in globals().values() if inspect.isclass(v) and v.__module__ ==
__name__)
Peter
--
http://mail.python.org/mailman/listinfo/python-list
> Can an instance of a class in a module, in any simple way find out which
> other classes that exists in said module ?
# module x ##
class c1:
pass
class c2:
pass
###
Python 2.5 (r25:51908, Nov 1 2006, 11:42:37)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3
En Sun, 25 Mar 2007 10:17:47 -0300, Al <[EMAIL PROTECTED]> escribió:
>I figured it out... Pycron does not work with mapped drives. My
> script was supposed to copy files from a mapped drive to a local
> folder... I had set up my batch command as copy M:\foldername\*.*,
> where M: is a mapped d
I have a bunch of small modules that I use within my application. Most
of these modules are single file modules. Currently, I have them set up
as stand-alone modules but because it's a royal pain to fetch five or 10
of these modules for each application and tracking whether or not they
are al
En Fri, 23 Mar 2007 20:42:33 -0300, mona bin jubair <[EMAIL PROTECTED]>
escribió:
> i want to ask about the algorithm's steps of saving
> games(sudoku,battleship)?
First determine what goes into the game "state" (that is, what defines the
current state of the game). Perhaps you also want
Hi All,
Apologies for the newbie question but I've searched and tried all
sorts for a few days and I'm pulling my hair out ;[
I have a 'reference' HTML file and a 'test' HTML file from which I
need to pull 10 strings, all of which are contained within tags,
e.g.:
http://www.someplace.com/";>Go S
Announcing argparse 0.7
---
The argparse module is an optparse-inspired command line parser that
improves on optparse by supporting:
* positional arguments
* sub-commands
* required options
* options with a variable number of args
* better usage messages
* a much simpler exten
In article <[EMAIL PROTECTED]>,
Chris <[EMAIL PROTECTED]> wrote:
>
>> After playing with this an inordinate amount of time, I found that one
>> does need to supply parameters, namely the null parameter of an empty
>> string. Try:
>>
>>sometop.geometry('')
>>
>> This repacks according to the wid
En Sun, 25 Mar 2007 04:06:21 -0300, Shane Geiger <[EMAIL PROTECTED]>
escribió:
> I see that you aren't using ihooks. Below is an example I found that
> uses ihooks. I think it would be worth comparing and contrasting both
> approaches (though I am not familar enough with this aspect of Python
Hi all,
I'm looking at building an interactive session in front of some
rdfobj instances. I've used cmd and just found code.Interactive*.
Protocol doesn't matter, I'm looking at the UI possibilities.
History is nice to have and my intention is to write output of
the session to stdin/stderr.
H
Dustan escreveu:
> On Mar 24, 7:16 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>> Dustan escreveu:
>>
>>
>>
>>> On Mar 23, 1:30 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
Mike Kent escreveu:
...
> New way:
> l=['a','b','c']
> jl=','.join(l)
I thank you all.
Almo
"Eric S. Johansson" <[EMAIL PROTECTED]> writes:
> I have a bunch of small modules that I use within my application. Most of
> these modules are single file modules. Currently, I have them set up as
> stand-alone modules but because it's a royal pain to fetch five or 10 of these
> modules for eac
On Mar 25, 2007, at 12:04 PM, [EMAIL PROTECTED] wrote:
> don't even get me
> started on python docs.. ayaa ;]
ok, try getting started with this then: http://www.crummy.com/
software/BeautifulSoup/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> Hi All,
>
> Apologies for the newbie question but I've searched and tried all
> sorts for a few days and I'm pulling my hair out ;[
>
> I have a 'reference' HTML file and a 'test' HTML file from which I
> need to pull 10 strings, all of which are contained within tags,
On Mar 25, 12:30 am, "Paul McGuire" <[EMAIL PROTECTED]> wrote:
> On Mar 24, 6:52 pm, "mkppk" <[EMAIL PROTECTED]> wrote:
>
> > Its just that I would rather not reinvent the wheel (or read old C
> > code)..
>
> Wouldn't we all!
>
> Here is the basic structure of a pyparsing solution. The parsing par
Hi!
I'm too new on phyton.I have installed phyton.But when I write phyton
command, unfortunately, i can't run.I suppose that it is bacause of
setting path.But i can't solve.
Can you help?
Another thing is, when i double click the .py file, there are the
project form and the command line.How can i
Hi!
I want to do a calendar where pictures on.Can you have any free
example like this which can help me ?
Regards...
--
http://mail.python.org/mailman/listinfo/python-list
gslm wrote:
> Hi!
> I'm too new on phyton.I have installed phyton.But when I write phyton
> command, unfortunately, i can't run.I suppose that it is bacause of
> setting path.But i can't solve.
> Can you help?
It's "python" you should be typing, of course. If that doesn't work
then it may be a PAT
En Sun, 25 Mar 2007 13:44:54 -0300, Eric S. Johansson <[EMAIL PROTECTED]>
escribió:
> I have a bunch of small modules that I use within my application. Most
> of these modules are single file modules. Currently, I have them set up
> as stand-alone modules but because it's a royal pain to fetch
John Machin escreveu:
> On Mar 25, 12:32 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>> John Machin escreveu:
..
> What was not obvious was (1) if you have been using Python for a
> while, how you managed to be unaware of str methods (2) if you are a
> newbie, how you managed to find out about t
On 25 Mart, 20:16, "Paul Boddie" <[EMAIL PROTECTED]> wrote:
> gslm wrote:
> > Hi!
> > I'm too new on phyton.I have installed phyton.But when I write phyton
> > command, unfortunately, i can't run.I suppose that it is bacause of
> > setting path.But i can't solve.
> > Can you help?
>
> It's "python"
On Mar 24, 11:53 pm, "js " <[EMAIL PROTECTED]> wrote:
> The only way you can do is rermove python2.4.4's files manually.
>
> I suggest you to use MacPorts or Fink.
>
> With MacPort, you can uninstall python2.4 by doing
> $ port uninstall python24
>
> And Installation is
> $ port install python25
>
On Mar 25, 7:08 am, "has" <[EMAIL PROTECTED]> wrote:
> On 24 Mar, 18:30, "Robert Hicks" <[EMAIL PROTECTED]> wrote:
>
> > I want to upgrade to 2.5 but I don't see any unistall instructions
> > anywhere.
>
> To repeat what others have said: don't uninstall existing
> Python.framework builds. Framewor
En Sun, 25 Mar 2007 15:31:46 -0300, Paulo da Silva
<[EMAIL PROTECTED]> escribió:
> John Machin escreveu:
>> On Mar 25, 12:32 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>>> John Machin escreveu:
>> [e.g. it's easy to miss the one line in the
>> "official" Python tutorial that refers to them]
En Sun, 25 Mar 2007 15:40:14 -0300, gslm <[EMAIL PROTECTED]> escribió:
> But I'm sorry.I haven't understood what i must do for ruunnig phyton
> command.I delete path from proportiesof my computer.Then i open
> command line of phyton.But when i write phyton these view below:
> Traceback:
> File "";
On Mar 25, 1:06 pm, "gslm" <[EMAIL PROTECTED]> wrote:
> Hi!
> I'm too new on phyton.I have installed phyton.But when I write phyton
> command, unfortunately, i can't run.I suppose that it is bacause of
> setting path.But i can't solve.
> Can you help?
You need to set what is called your PATH envir
En Sun, 25 Mar 2007 14:04:09 -0300, Berend van Berkum <[EMAIL PROTECTED]>
escribió:
> I'm looking at building an interactive session in front of some
> rdfobj instances. I've used cmd and just found code.Interactive*.
>
> However, my question, can I change the "prompt" string in respond
> to use
gslm schrieb:
> First, thaks a lot.
> But I'm sorry.I haven't understood what i must do for ruunnig phyton
> command.I delete path from proportiesof my computer.Then i open
> command line of phyton.But when i write phyton these view below:
> Traceback:
> File ""; line 1 in
> NameError: name phyton
Hello,
I am working with a netcdf file and trying to remove a long string
from it e.g.
"KAST BLAH BLAH BLAH BLAH DATA BLAH DATA BLAH BLAH BLAH BLAH BLAH DATA
BLAH DATA BLAH"
Right now what I have works, but takes a long time to run... I think
this could be cut down to a quick 2 second run, but no
--|||--
Request Management System - Time Inc.
---
To confirm this message was intended to be created as a request
in the Internet Technology Group's Request Management System,
please
En Sun, 25 Mar 2007 17:22:36 -0300, 7stud <[EMAIL PROTECTED]>
escribió:
> On Mar 25, 3:00 am, [EMAIL PROTECTED] wrote:
>> On Mar 25, 9:13 am, "7stud" <[EMAIL PROTECTED]> wrote:
>>
>> > Is there some other way to retrieve a user-defined function object
>> > from a class other than using the class
On Mar 25, 3:00 am, [EMAIL PROTECTED] wrote:
> On Mar 25, 9:13 am, "7stud" <[EMAIL PROTECTED]> wrote:
>
> > MyClass.someFunc
>
> > Is there some other way to retrieve a user-defined function object
> > from a class other than using the class name or an instance?
>
> What Steven B. already said, MyC
On Mar 25, 9:13 am, "7stud" <[EMAIL PROTECTED]> wrote:
> Is there some other way to retrieve a user-defined function object
> from a class other than using the class name or an instance?
On Mar 25, 3:00 am, [EMAIL PROTECTED] wrote:
> What Steven B. already said, MyClass.__dict__['someFunc'], is
Steven D'Aprano wrote:
> On Fri, 23 Mar 2007 19:39:53 -0700, Paul McGuire wrote:
>
>> (and I'm glad I'm not the only one who uses 'l' for a scratch list
>> variable...)
>
> Yes, and come the revolution, every last one of you will be down the salt
> mines.
>
Better that than up against the wall,
Please, can you read again?
Yes, I understand that in phyton interpreter, i can't call phyton
command.Thanks...
But how can i run '.py' files from this command line?I wanted to use
the phyton command for this.
When i click a py extended file, for example calendar.py in lib
directory, file opens,
On Mar 25, 6:23 pm, "gslm" <[EMAIL PROTECTED]> wrote:
> Please, can you read again?
> Yes, I understand that in phyton interpreter, i can't call phyton
> command.Thanks...
>
> But how can i run '.py' files from this command line?I wanted to use
> the phyton command for this.
>
> When i click a py e
gslm wrote:
> Please, can you read again?
> Yes, I understand that in phyton interpreter, i can't call phyton
> command.Thanks...
>
> But how can i run '.py' files from this command line?I wanted to use
> the phyton command for this.
>
> When i click a py extended file, for example calendar.py in
gslm wrote:
> Please, can you read again?
> Yes, I understand that in phyton interpreter, i can't call phyton
> command.Thanks...
>
> But how can i run '.py' files from this command line?I wanted to use
> the phyton command for this.
Once you are in the Python interpreter you can run Python files,
On Sun, 25 Mar 2007 11:09:54 -0700, gslm wrote:
> Hi!
> I want to do a calendar where pictures on.Can you have any free
> example like this which can help me ?
> Regards...
These websites can help you:
http://search.yahoo.com/
http://www.google.com/
--
Steven.
--
http://mail.python.org/ma
Anton Vredegoor <[EMAIL PROTECTED]> writes:
[...]
> Most web pages I visit lately are taking so much room for ads (even
> with adblocker installed) that the mere 20 columns of text that are
> available for reading are slowing me down unacceptably. I have tried
[...]
http://webcleaner.sourceforge.n
Book Monday 9th July to Wednesday 11th July 2007 in your calendar!
EuroPython 2007, the European Python and Zope Conference, will be held in
Vilnius, Lithuania. Last year's conference was a great success, featuring
a variety of tracks, amazing lightning talks and inspiring keynotes. With
your par
yeah the subject doesn't really make sense does it?
anyway want I want to do is this:
if n == 1:
self.operations.insert(pos, operations.Replace.Panel(self, main))
elif n == 2:
self.operations.insert(pos, operations.ChangeCase.Panel(self,
main))
elif n == 3:
self.operations.insert(
Great, thanks so much for posting that. It's worked a treat and I'm
getting HTML files with the list of h2 tags I was looking for. Here's
the code just to share, what a relief :) :
...
from BeautifulSoup import BeautifulSoup
import re
page = open("soup_test/tomatoandc
ianaré wrote:
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
> self.operations.insert(pos, operations.Replace.Panel(self, main))
>
> elif n == 2:
>
> self.operations.insert(pos, operations.ChangeCase.Panel(self,
> main))
>
> e
ianaré wrote:
> like this:
>
>
> list = ["Replace", "ChangeCase", "Move"]
> textVariable = list[n]
> self.operations.insert(pos, operations.[textVariable].Panel(self,
> main))
>
> Is something sort of like that possible?
Yes:
self.operations.insert(
pos,
getattr(operations, tex
En Sun, 25 Mar 2007 19:36:26 -0300, ianaré <[EMAIL PROTECTED]> escribió:
> list = ["Replace", "ChangeCase", "Move"]
> textVariable = list[n]
> self.operations.insert(pos, operations.[textVariable].Panel(self,
> main))
>
> Is something sort of like that possible?
Try getattr:
textVariable = "Repla
On Mar 25, 3:36 pm, "ianaré" <[EMAIL PROTECTED]> wrote:
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
> self.operations.insert(pos, operations.Replace.Panel(self, main))
>
> elif n == 2:
>
> self.operations.insert(pos, operations.
Paulo da Silva escreveu:
> John Machin escreveu:
>> On Mar 25, 12:32 am, Paulo da Silva <[EMAIL PROTECTED]> wrote:
>>> John Machin escreveu:
> ...
...
> knowledge. If you feel that it is a question that deserves the
> honour of your response, just do it. Write it on the stones and
> send them down
Hi,
try this:
func = getattr(operations, ["Replace", "ChangeCase", "Move"][n])
HTH,
Jan
"ianaré" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> yeah the subject doesn't really make sense does it?
>
> anyway want I want to do is this:
> if n == 1:
>
>self.operations.insert(p
Cool now I can run it through the translator.
ops = (_("Directory"), _("Replace"), _("ChangeCase"),
_("Move"), _("Swap"), _("Insert"), _("ChangeLength"))
self.operations.insert(pos, getattr(operations, ops[n]).Panel(self,
main))
Thanks guys!
--
http://mail.python.org/mailman/listinfo/p
En Sun, 25 Mar 2007 19:44:17 -0300, <[EMAIL PROTECTED]> escribió:
> from BeautifulSoup import BeautifulSoup
> import re
>
> page = open("soup_test/tomatoandcream.html", 'r')
> soup = BeautifulSoup(page)
>
> myTagSearch = str(soup.findAll('h2'))
>
> myFile = open('Soup_Results.html', 'w')
> myFile.
On Mar 25, 7:01 pm, "ianaré" <[EMAIL PROTECTED]> wrote:
> Cool now I can run it through the translator.
>
> ops = (_("Directory"), _("Replace"), _("ChangeCase"),
>_("Move"), _("Swap"), _("Insert"), _("ChangeLength"))
>
> self.operations.insert(pos, getattr(operations, ops[n]).Panel(self,
>
I am trying to write a script that reads an XML file (using the
minidom module), makes an edit to a few attributes, then saves it
back. If I use minidom.Document() to create the xml file, then write
it with toprettyprint, it looks fine.
However, if I use xml.minidom.parse to parse the xml document
On 2007-03-25, dashawn888 <[EMAIL PROTECTED]> wrote:
> gui.py:79: GtkWarning: Quit: missing action
> menubar = uimanager.get_widget('/MenuBar')
>
This should probably be action="Quit".
Dave Cook
--
http://mail.python.org/mailman/listinfo/python-list
Yep, I agree! once I've got this done I'll be back to trawling the
tutorials.
Life never gives you the convenience of learning something fully
before having to apply what you have learnt ;]
Thanks for the feedback and links, I'll be sure to check those out.
Mark.
On Mar 26, 12:05 am, "Gabriel Ge
[EMAIL PROTECTED] wrote:
> Great, thanks so much for posting that. It's worked a treat and I'm
> getting HTML files with the list of h2 tags I was looking for. Here's
> the code just to share, what a relief :) :
> ...
> from BeautifulSoup import BeautifulSoup
> import
Paul Kozik wrote:
> However, if I use xml.minidom.parse to parse the xml document, change
> a few attributes with setAttribute, then write back with toprettyxml,
> my XML file gets loaded up with spaces between many of the elements.
Use 'toxml' method, that writes XML document without any modifica
Hi,
I'm not sure why this doesn't work:
>>>dic_myinstances={}
>>>class MyClass(object):
def __init__(self, id):
global dic_myinstances
if dic_myinstances.has_key(id):
self = dic_myinstances[id]
else:
dic_myinstances[id] = self
>>>ins1 =
Hi,
I solved it myself! I realised that __new__ creates self prior to
init, so this works:
>>>dic_myinstances={}
>>>class MyClass(object):
def __new__(self,id):
global dic_myinstances
if dic_myinstances.has_key(id):
return dic_myinstances[id]
else:
Hi, yet again to myself!
I've realised after further testing and reading that I actually need
to do this:
>>>dic_myinstances={}
>>>class MyClass(object):
def __new__(cls,id):
global dic_myinstances
if dic_myinstances.has_key(id):
return dic_myinstances[id]
En Sun, 25 Mar 2007 23:34:51 -0300, manstey <[EMAIL PROTECTED]> escribió:
> I've realised after further testing and reading that I actually need
> to do this:
>
dic_myinstances={}
class MyClass(object):
> def __new__(cls,id):
> global dic_myinstances
> if dic_myinstan
Jorge Godoy wrote:
> "Eric S. Johansson" <[EMAIL PROTECTED]> writes:
>
>> I have a bunch of small modules that I use within my application. Most of
>> these modules are single file modules. Currently, I have them set up as
>> stand-alone modules but because it's a royal pain to fetch five or 10
In article <[EMAIL PROTECTED]>,
Jan Schilleman <[EMAIL PROTECTED]> wrote:
>Hi,
>
>try this:
>func = getattr(operations, ["Replace", "ChangeCase", "Move"][n])
>
>HTH,
>Jan
>
>"ianaré" <[EMAIL PROTECTED]> schreef in bericht
>news:[EMAIL PROTECTED]
>> yeah the subject doesn't really make sense does i
Announcing Urwid 0.9.8
--
Urwid home page:
http://excess.org/urwid/
Tarball:
http://excess.org/urwid/urwid-0.9.8.tar.gz
About this release:
===
This release improves Urwid's performance by 70% to 450% (reducing
running time by 41% to 82%)[1] for some
When looking at other peoples code (to learn from it) I keep seeing an
empty file named "__init__.py". What's the purpose of this?
Thanks
Tina
--
http://mail.python.org/mailman/listinfo/python-list
Tina I wrote:
> When looking at other peoples code (to learn from it) I keep seeing an
> empty file named "__init__.py". What's the purpose of this?
>
> Thanks
> Tina
Duh! Never mind... found it.
Kinda neat actually :)
T
--
http://mail.python.org/mailman/listinfo/python-list
Hi, I've writing a python application in which I'd like to have a small
"ping label", to always tell the current ping time to the server.
It seems however that I have to be root to send those imcp packages, but
I guess there must be a workaround since I can easily use the "ping"
command as ordi
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Jan Schilleman <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> try this:
>> func = getattr(operations, ["Replace", "ChangeCase", "Move"][n])
>>
>> HTH,
>> Jan
>>
>> "ianaré" <[EMAIL PROTECTED]> schreef in bericht
>> news:[EMAIL PROTECTED]
>>> yeah t
Hi!
As I experienced in the year 2006, the Python's zip module is not
unicode-safe.
With the hungarian filenames I got wrong result.
I need to convert iso-8859-2 to cp852 chset to get good result.
As I see, this module is "a command line tool" imported as extension.
Now I search for something th
Hi Christian,
I have seen your well-solved cgi-python answers. That's why I think you
would be able to answer my query related to the same.
I am writing a cgi program and placing it in cgi-bin folder of Apache
Server. Now I have written a python script in the same folder to
generate a graph 'gene
1 - 100 of 101 matches
Mail list logo