On 2007-03-20, Alex Martelli <[EMAIL PROTECTED]> wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>...
>> There are plenty of reasons for preferring new style classes. If those
>> reasons hold for you, then of course you should use new style classes.
>>
>> But that's not the same thing as s
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
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
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, 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
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
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
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
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
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
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]
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,
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 =
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
[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
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
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
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 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,
>
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.
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
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
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
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.
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
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
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
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
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(
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
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
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
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,
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
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
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,
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,
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
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
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
--|||--
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
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
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
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
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 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 "";
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]
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
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 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"
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
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
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
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
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
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
[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, 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
"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
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
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
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
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
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
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
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
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 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
> 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
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
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
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
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
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
> 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
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
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:
>> """
>
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
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
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 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
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
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
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
[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 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
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
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
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
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
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
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
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):
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
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 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
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, 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 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
1 - 100 of 101 matches
Mail list logo