kath wrote:
> hi, Larry Bates thanks for the reply...
>
>> You might consider doing it the same way wx passes things around.
>> When you instantiate the subclass pass the parent class' instance
>> as first argument to __init__ method.
>
> Yes thats ab
Its just like
asking if you could have something automatically insert parenthesis
everywhere they are needed.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
z=Character('name', strength=10, dexterity=5, intelligence=3, luck=0)
Now you can easily introduce new keyword arguments.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
rm/thread/bcc...
>>
>> I doubt Microsoft will unleash their lawyers on you, but it is a
>> problem.
>
py2exe and py2app work extremely well. I'm not sure why you wouldn't want
to use them if you want to distribute to those platforms. Actually they
take the installed version of python out of the equation (at least I know
py2exe does).
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
d: (530, '5.7.0 Must issue a STARTTLS command first
> s1sm7666914uge', '[EMAIL PROTECTED]')
>
> What am I doing wrong ?
>
Under outgoing mail smtp server, use smtp.gmail.com. Since it requires SMTP
authorization, use your Gmail account as username (e.g. [EMAIL PRO
n't the case a couple of years ago). Hosting costs have
dropped so much during that time that getting Python doesn't
cost much (if any) extra.
I'd be surprised if there was more demand for PHP developers
than Python developers. Google lists 51 PHP jobs and 168
Python jobs in the
many_years_after wrote:
> Any solution?
>
> Thanks.
>
You can certainly make python program/function into a COM object
which can be called from other languages quite easily and I think
is the more preferred method in newer software. py2exe has
examples of creating COM objects.
-La
s" in your code, put them in
a function or class that can easily be rewritten for the
specific OS you are porting to. Don't spread them out all
through your code. It is much easier to rewrite a couple of
functions/classes that are OS-specific than it is to try to
find problems all over yo
es. Maybe you can
call via COM, but I just haven't ever done that. You should be able
to use ctypes to interface to them. The "tricky" part is passing
data back and forth. Building the proper data structures in Python
can take some work.
You should take a look at ctypes from:
http://sourceforge.net/project/showfiles.php?group_id=71702
COM sample is here:
http://starship.python.net/crew/theller/ctypes/sum_sample.html
HTH,
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
nt "Name", obj.name
print "Address1", obj.address1
print "Address2", obj.address2
print "City", obj.city
print "State...", obj.state
print "Zip.", obj.zip
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ReportLab Graphics can do 2D and pie charts, but I don't think it does
3D charts yet.
www.reporlab.org
Larry Bates
A.M wrote:
> Hi,
>
>
>
> I developed a HTML reporting tool that renders Oracle data to HTML and
> Oracle.
>
>
>
> At this point I have to
Ouch. I had a typo.
-Larry
Scott David Daniels wrote:
> Felipe Almeida Lessa wrote:
>> Em Sex, 2006-06-02 às 16:56 -0400, A.M escreveu:
>>> I can't browse to www.reporlab.org, but I found
>>> http://www.reportlab.com/ which has a commercial charting product.
&
Then just write HTML around your list. I would guess
you want them inside a table. Just write appropriate
HTML tags before/after the urls. If you want the URLs
to be clickable make them in into url lines.
-Larry Bates
Shani wrote:
> I have the following code which takes a list of urls
>
First: Always post cut-paste tracebacks so we can see actual
error message.
Second: print out self.ACphi, XPLMGetDataf(self.ACphi) and
math.radians(XPLMGetDataf(self.ACphi)) before this statement
and you will find the problem.
-Larry Bates
moonman wrote:
> Hello all,
>
> I've ju
verts client portions to Javascript (if I'm understanding how it
works).
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
asses that help
with the C structures that need to be passed back and forth. For that you
will probably also need to take a look at the Python struct module, but ctypes
has some built-in helper functions also.
ctypes can be located here: http://starship.python.net/crew/theller/ctypes/
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ts deeper and deeper into the class hierarchy.
It can simplify the argument lists quite a bit. Maybe others can
comment with their thoughts as well.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ecuted because i'm stuck on that TypeError since 2 hours
> :( (2) You have the weirdest system of choosing names that I have seen for
>> decades.
> :((
>> (3) Both of the above.
>>
>> Cheers,
>> John
>>
>
How about just inserting some pri
I intend to do this:
>
> mf.Navigate('www.groups.google.com.au/etc'')
>
> Will all of these functions work with Firefox or is it only Internet
> Explorer(I can use either but I prefer Firefox?)
>
This might help:
http://mail.python.org/pipermail/python-win32/2005-June/003413.html
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Might want to check out:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
k Hammond and Andy Robinson). It covers lots of Windows
"specific" things and has good examples of writing services and
COM objects.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
edge of Java? Or am I being even
> more newbie-ish than I thought I was? :)
Nope, no Java knowledge necessary. Jython just compiles Python code
to java bytecode instead of python bytecode. Once it is in java bytecode
the JVM doesn't know where it came from.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
d it, extract next
filename, increment the counter portion of the filename,
write it back out and unlock it. Now I have the name of the
file to write that is unique to my instance and I can write it
without worrying about other processes.
Hope this helps.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
d drive with
temp files or cached files from the browser. Clear out your
Temporary Internet files (if you haven't already) and change the
location of temporary Internet files to another drive. Also
check c:\windows\temp. That directory gets lots of crud that I
have to clean out.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-06-30, Luis M. González <[EMAIL PROTECTED]> wrote:
> Alok wrote:
>> While posting a comment on http://www.reddit.com I got an error
>> page with the following curious statement on it.
>>
>> "reddit broke (sorry)"
>> "looks like we shouldn't have stopped using lisp..."
>>
>> See screenshot a
; Greetings,
> Marco
>
>
If you are on Windows, you may find using COM interface to
actual Excel application easier.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
sions, so I could be missing something simple. Can anyone offer
> any suggestions?
>
> Thanks,
> Phil
>
I just tested on Windows XP with ActiveState Python 2.4.1 and it works
as expected.
>>> import os
>>> os.access(r'c:\output.txt', os.W_OK)
True
Ch
th blank space) I'm new to python
> and could use a little push in the right direction, any ideas on how to
> implement this?
>
> Thanks!
>
See Beautiful Soup: http://www.crummy.com/software/BeautifulSoup/
it will parse even badly formed HTML and allow you to extract/ch
Tom E H wrote:
> Larry Bates wrote:
>>> Well that's great, but how do you access the ini file portably?
>> From my original post:
>>
>> Then I use ConfigParser in my application...
>
> Thanks, but where in the directory structure do you put the ini file
fegge wrote:
> what is a lambda expression?
>
You really should try Google first (python lambda):
http://www.secnetix.de/~olli/Python/lambda_functions.hawk
http://diveintopython.org/power_of_introspection/lambda_functions.html
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
lug-in).
These represent both ends of the spectrum in editors.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
typed:
list[0]+['Five']
that gives you the error you showed.
What you meant to type was:
l = ['One','Two','Three','Four']
This is a list of four strings, what you entered was a list of one
string.
NOTE never call a variable 'list' as it will mask the built-in list
method (same goes for str, tuple, int, float, etc).
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
info.php) to create the actual
Windows installer (e.g. setup.exe). This does what you want
and was very easy to set up.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
mputers (Compaq/HP) as
some of their management software is written in Python. So "power-users"
need to be pretty careful removing it these days.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
uestion. Blocking ports is a function
of your firewall solution.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
; Python code, it is an interpreted
language. You can use an extension called py2exe that packages up
python code with a .exe file and a couple of support files and
that package can be installed on a computer with minimal or no
registry or system file modifications.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ered you can break out of the
loop you can optimize the loop by breaking out when you start getting
further away from value or you might be able to use the bisect module
to find it faster. If the lists are small it probably isn't worth
the extra effort. If they are large and sorted look at
uninstaller.
http://www.activestate.com/Products/ActivePython/
It does minimal registry changes and I know of no system file changes
(but I could be wrong). If you want to put a program written in python
on a workstation you don't have to put python on it. Use py2exe to
package it and create an installer with Inno Setup.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
and closest function that I
wrote may (or may not) return the correct answer.
-Larry
[EMAIL PROTECTED] wrote:
> Thanks all !
>
>> Question: what if two values are equidistant?
>
>>>> def closest(foo,v):
> ... intermed = [(abs(v), v) for v in foo]
> ... int
mistral wrote:
> Larry Bates писал(а):
>
>> mistral wrote:
>>> hg писал(а):
>
>>>> Grant Edwards wrote:
>
>>>>>> Will the msi installer modify registry or other system files?
>>>>>> Does it possible install Pytho
try: block, it then
executed what was in the except: block. Since all that
was in the except: block was pass, it just fell through
to the if statement. At that point strData is not
defined because the try block failed and never create
strData object.
It is doing EXACTLY what you told it to do.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ote machine. Works great and the traffic is
encrypted and I know who the user is because they can't connect until
they give me their pubkey and I put on the server and they must have
their private key AND passphrase to establish the SSH connection.
I use this to run pgAdmin III remotely through a firewall to my
database server.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
much easier to
> work with.
>
> Thanks again!
>
> Rob Richardson
> RAD-CON, Inc.
> Bay Village, OH
>
You shadowed the class attribute scanList by creating an instance
variable called self.scanList in the __init__ method:
self.scanList = []
Comment that line out and see what you get.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
oing what you
told it to. print "hello program" and exit (which closes the window).
If you want it to pause put something after the print like:
t=raw_input('Hit return to continue')
This way the program will pause until you hit return.
Good luck.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Omar wrote:
> thank you genteman.
>
> however, its not working :(
>
> I resaved it, but same thing.
>
Please post some code so we can actually do something more than
read your mind. You can also run the program from a shell
instead of from idle to see what happens.
-La
not None: port=int(port)
return [scheme, domain, username, password, rootfolder, port]
-Larry Bates
metaperl wrote:
> The urlparse with Python 2.4.3 includes the user and pass in the site
> aspect of its parse:
>
>>>> scheme, site, path, parms, query, fid =
>>
;t
have quotes around them. How are you creating the object p?
If you would just get it into a single string (with something
like:
x=urllib.urlopen(url)
p=x.read()
then you can use elementree, or beautiful soup to get your
prices quite easily.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
with titles and legends. I do need multi-platform for both Linux and
> Windows. The intended use is to create graphics for web pages on the fly.
>
> TIA,
>
> Roger
ReportLab Graphics works pretty well for me.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ndows services.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
re interested in keeping. I am assuming that /GEN= and /gb: data
doesn't have any spaces in them. If they do, you will need to use
regular expressions instead of split.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
pondingly.
>
> Is there any other way to do this?
> Please help...
>
> Sai krishna M
No "magic" way to insert lines. If file is small, read into
memory, insert line, write to disk. If it is large, read and
write lines to secondary file, insert line, read remaining lines,
dele
t place to store files, not as blobs in a
database.
The answer about which database depends on your target
platform but you could consider gadfly.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
x27;t manage to find a
> python example - does anyone have one?
>
> Ideally I'd like someone to tell me that PyQT, tkinter or PyGTK does
> it all for me, but from my searching on the subject I doubt it is
> going to be that easy!
>
> Thanks
Google turned this up.
h
t; Best regards,
> Stefaan.
>
Auto-upgrade from what to what?
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Blair P. Houghton wrote:
> Larry Bates wrote:
>> The filesystem is almost always the
>> most efficient place to store files, not as blobs in a
>> database.
>
> I could get all theoretical about why that's not so in most cases,
> but there are plenty of cases
Paul Rubin wrote:
> Larry Bates <[EMAIL PROTECTED]> writes:
>> As far as "rational extension" is concerned, I think I can relate.
>> As a developer of imaging systems that store multiple-millions of
>> scanned pieces of paper online for customers, I can pr
[EMAIL PROTECTED] wrote:
>> Auto-upgrade from what to what?
>> -Larry Bates
>
> Interesting question.
>
> In my case I want my program to check for (e.g.) bug-fix releases on
> some location (network drive or ftp), and if available, allow to
> automatically downlo
top, etc.) and get
installed into servicemanager on Windows workstation or
server. Their behavior could be dynamic, that is you could
change what they do by communicating with them via external
means.
I think you better back up and tell us what you are trying
to do at a higher level. Perhaps we can help more.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates wrote:
> kkt49 wrote:
>> under code service install => ok
>>
>> _svc_name_ = r'moin_service'
>> _svc_display_name_ = r'moin_service'
>> start_cmd = r"c:\mmde\moin.exe"
>> #info = ['
ract the data you
want to get.
Note: If the web page gets changed, it can break your program.
Hope information helps.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Ascher
Python programming on Win 32 by Mark Hammond & Andy Robinson
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
uld not have
a drive mapping Y:\. You can change the account that a service
runs under in the Service Manager-Log On tab. Normally you
wouldn't run services from mapped drives, they would be
installed on local machine and started from there. If services
need to access mapped drives, you need to put full UNC
pathnames to access them or run the services under an account
that has the drives mapped properly.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
endswith() string methods that are
> new and seem neat as well.
FYI- .startswith() and .endswith() string methods aren't new in 2.5.
They have been around since at least 2.3.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
>
> Thanks in advance,
> Martin
>
>
>
You can do this:
s1=s1.replace('x','y', 1) # Only replace the first x with y
or
s1l=list(s1)
s1l[1]='y'
s1=''.join(s1l)
or your method of using slices.
All depends on what you want to do. Quite often you use
.replace() method so you don't have to worry with the index.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Python's syntax. If someone gets
something wrong in a file that gets included, it is harder to take a sane
default or handle the error than with ConfigParser. Just a suggestion that
I hope helps.
-Larry Bates
or
--
http://mail.python.org/mailman/listinfo/python-list
=[myservice]
> )
>
> 'elp! Plz!
>
You may want to post this on gmane.comp.python.py2exe also.
I'm going to try to guess what the problem is, but it is a little hard to tell
from here. py2exe does its best to find all the modules required to create the
.exe. Sometimes modules do dynamic imports, etc. of modules that "fool" py2exe.
I'm guessing that this is the case and that you will need to manually include
the missing module. Most such errors seem to fall into this category. Hope
this at least points you in the correct direction.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
on, but on a more general note:
If you want directory information use os.listdir or glob.glob instead.
No reason to shell out to do a dir. If you were using dir as an example,
please disregard.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
e when
> I want it to stop, and can reload the data and continue to run from
> where it stops when the computer is free ?
>
> Regards,
>
> xiaojf
>
You can save the state of Python objects and reload them at a later time/date by
using Zope's ZODB.
http://www.z
= yes'.join(data.split('disable = no',1))
fp=open(filename, 'w')
fp.write(data)
fp.close()
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
lds'
>
>>>> newname1 = string.join (li[:-1], ".")
>>>> newname1
> 'a.b.mpilgrim.z'
>>>> newname = li[:-1].joinfields(".")
> Traceback (most recent call last):
> File "", line 1, in ?
> AttributeError: 'list' object has no attribute 'join'
>
> Thank you for your help
>
> Anoop
>
I think you want:
newname1='.'.join(li[:-1])
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
cond nature to think
of creating/using objects in places where you want to provide for maximum
flexibility and code isolation.
At a minimum you should take a look at the elementtree module for handling your
XML. It is downloadable for Python < 2.5 and is part of the standard library
starting with version 2.5.
Hope information helps at least a little.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
You should also lose the semicolons, you are writing Python
now, not PHP ;-).
You might also want to write:
def strord(url):
return [int(i) for i in url]
Or just lose the function completely since it degrades to a
single list comprehension.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
uessing - A significant portion of the time might be I/O
that is disk bound so faster CPU won't help. If that's the case
faster hard drive (10K or even 15K rpm) or a striped drive array
could help. You should also check memory, if CPU starts
swapping, the swap I/O will kill your performance.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
return proc.run(xml, topLevelParams=params)
> except:
> return "Error blah blah"
>
> print "Content-Type: text/html\n\n"
> print buildPage()
>
> You can compare the development sites here:
> asp: http://consultum.pointy.co.nz/about/team
> python: http://python.pointy.co.nz/about/team
>
> Cheers!
>
For max speed you might want to try pyrxp:
http://www.reportlab.org/pyrxp.html
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Jan Dries wrote:
> Larry Bates wrote:
>> Damian wrote:
> [...]
>> > What I've got is:
>> > two websites, one in ASP.NET v2 and one in Python 2.5 (using 4suite for
>> > XML/XSLT)
>> > both on the same box (Windows Server 2003)
>> > bo
a reference
to another PyString *. If non-NULL, it means the local ob_sval
actually points into the ob_sval owned by that other PyString *.
It'd be another four bytes, but we'd only need to incur that
when creating a slice; we could set a bit in ob_sstate indicating
"this is a slice
uilt: 7.7s
Python 2.5 concat: 7.2s
% improvement: 6.94%
Note that I was lazy and only did one benchmark run apiece.
Also, keep in mind that memory utilization will be a little higher
with the string concatenation objects.
Carl Friedrich Bolz wrote:
> Robin Becker wrote:
> > wouldn't this approach apply to other additions eg list+list seq+seq etc
> > etc.
> no, I think it depends on strings being immutable.
Exactly.
/larry/
--
http://mail.python.org/mailman/listinfo/python-list
'a' * 1000 ". (I shan't post it here.)
Also, I misspoke earlier; it's not an improvement of 697%, but of 597%.
To be precise, it takes about 1/7 the time of the original.
Cheers,
/larry/
--
http://mail.python.org/mailman/listinfo/python-list
range(10):
s += "a"
The result:
Python 2.5 release: 30.1s
Python 2.5 locally built: 30.4s
Python 2.5 concat: 3.95s
Improvement: *669%*! (1/7.7 the time.)
So xrange(1000) was adding between 0.4s and 0.9s overhead, and
losing it makes my approach look even better. Than
d external users can ignore the difference as long as they use the
macros in stringobject.h (e.g. using PyString_AS_STRING(), rather than
casting to PyStringObject and using ob_sval directly).
Sorry for misunderstanding the nature of your question the first time,
/larry/
--
http://mail.python.org/mailman/listinfo/python-list
.2s
Python 2.5 concat: 4.3s
Improvement: 600% (1/7 of the time)
/larry/
--
http://mail.python.org/mailman/listinfo/python-list
> I think your project might make a very
> interesting PyCon paper for people who were thinking about joining the
> development effort but hadn't yet started.
Perhaps; I've never been to PyCon, but it might be fun to give a
presentation there. That said, it would be way more
this under my patched Python 2.5:
x = ""
xappend = x.__add__
for i in xrange(1000):
xappend("a")
y = "".join(x)
took 3343ms.
/larry/
--
http://mail.python.org/mailman/listinfo/python-list
n the lists (e.g are the elements unique, can they
be sorted, etc) and take advantage of all that information to
come up with a "faster" algorithm. If they are unique, sets
might be a good choice. If they are sorted, bisect module
might help. The specifics about the list(s)
my hacked-up benchmark script.
Just back up your existing python25.dll, then unzip to your Python
directory, and you're ready to rock.
Enjoy,
/larry/
--
http://mail.python.org/mailman/listinfo/python-list
objects. In that case I just append the string.
Speeds things up immensely.
Cheers,
/larry/
--
http://mail.python.org/mailman/listinfo/python-list
sn't seem to work..
>
> Thanks in advance.
>
The answer is don't pass any value.
print f()
will print 2
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
etter to use a simple text
> editor + command line?
>
> Oleg.
Not sure about cyrillic and I don't mean if you are looking for Windows
IDE, but I'm impressed with Pyscripter:
http://mmm-experts.com/Products.aspx?ProductId=4
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
ordan Greenberg
>>
>> --
>> Posted via a free Usenet account from http://www.teranews.com
>
The first time through the loop you read through RawData and are at
the bottom of the file. You either need to seek back to the beginning
or you need to close and reopen the file each time through the loop.
Suggestions:
1) In PullHourData the first argument is filename. In fact
it is not a filename but rather a file pointer. Just a little
confusing for anyone coming along behind you.
2) If the data is well-formed CSV you should probably take a look
at the csv module. It handles CSV data better than splitting on
commas (which can be dangerous as there can be commas inside of
literal data).
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
y Stani
> wherein he said he might move the site, but I can't find it...
>
> John
DNS resolves to 205.234.199.58, but homepage never loads and I get
a Proxy Error in browser.
FYI, Larry
--
http://mail.python.org/mailman/listinfo/python-list
ine:
>
> line = line + nextLine
>
> How can I get the next line when I am in a for loop using readlines?
>
> jr
>
Something like (not tested):
fp=open(filename, 'r')
for line in fp:
while line.rstrip().endswith('_'):
line+=fp.next()
fp.close()
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
this module for parsing your XML:
http://effbot.org/zone/element-index.htm
elementree is now part of the standard library.
Note: It would also help if you would post contents of log1.xml
so others could see what you are working with. You should also
post whatever python code you have tried so
ot x % 4:
#
# Arrive here if x is modulo 4 divisable
#
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
done, delete the original file and rename the output file.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
mystilleef wrote:
> John Thingstad wrote:
>> You are just being silly.
>> Lisp's OO environment CLOS is vastly superior to Python classes.
>> Both in terms of expressive power and flexibility.
>> You might even find out if you ever learnt how to use it.
>>
>
> Donkeys have wings.
And thus you thi
smtplib library. You don't
need to use any email client (e.g. Outlook, etc.).
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
obably need to switch to an ISP that allows you shell
access to your server instance or one that will install python modules
for you on your sever.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
line.net/simon/blog/
>
Sounds a lot like you are coming from another programming language
and are trying to make Python act like it did. Hey I did the same
thing when I first took up Python as a language. Python is not Java
(or any other language that puts you in a straight jacket). IMHO if
you embrace the dynacism of Python and you will be much happier
writing code in it. Don't worry if someone will try to assign to
some attribute in your class that "is illegal". They may be doing
if for some reason you can't fathom at the outset.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Bruce wrote:
class A:
> ... def __init__(self):
> ... self.t = 4
> ... self.p = self._get_p()
> ... def _get_p(self):
> ... return self.t
> ...
a = A()
a.p
> 4
a.t += 7
a.p
> 4
>
> I would like to have it that when I ask for p, method _get_p is always
> called so t
se()
>
> Thanx.
I'm not entirely sure where I got this code (Google search
years ago) and I've extended it a little, but you are welcome
to use it and it is very close to what you outlined above.
I had to strip out a bunch of custom logging that I include
in my version, but i
901 - 1000 of 1904 matches
Mail list logo