g the flat/nested dimension which is appropriate to any
given situation, so nest with moderation and only when necessary".
They'd probably been talking to Antoon Pardon :-)
But that didn't fit in the list so they went with the shorter version...
regards
Steve
--
Steve
th the intermediate steps?
Perhaps because we don't all have your psychic powers?
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
Python has iteritems() and enumerate() to be used in for loops.
can anyone tell me what these are by themselves, if anything?
are they just for idiom?
No, anyone can use them, not just idioms like you.
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web
ving to use our psychic powers? ;-)
In other words: what's wrong? How do you *know* you can't override it?
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
--
always, I would appreciate your help in getting
the word out. Please forward this message to your
favorite mailing lists and newsgroups to make sure
that everyone has a chance to join in the fun!
regards
Steve Holden
Chairman, PyCON DC 2005
--
PyCon DC 2005: The third Python Community Confe
Paul Rubin wrote:
Steve Holden <[EMAIL PROTECTED]> writes:
[Paul proves his superior Lisp knowledge]
Perhaps because we don't all have your psychic powers?
You snipped out the examples I gave, like [x*x for x in range(5)]
leaving unnecessary residue in the name space. Was it not obvio
amid scams.
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
--
http://mail.python.org/mailman/listinfo/python-list
ively take this task and eat it for breakfast, but please
don't believe it will happen as a result of a few newsgroup posts saying
what a nice idea it would be. Things don't happen that way, and I have
the grey hairs to prove it. Please, make this happen!
regards
Steve
--
Steve
Skip Montanaro wrote:
Steve> The fact that a bright bunch like the Python developers didn't
Steve> realize that it would be sensible to have a local scope for the
Steve> list comprehension variable is a perfect demonstration of that
Steve> point.
Actually, I seem t
ur program still regards as allocated is
garbage collected by Python and reused. Ugly :-P
Python is pretty stable, so it's usually best to suspect our own code
unless you're heavily into using the C API (which I'm not, so feel free
to ignore me).
regards
Steve
--
Steve Holden
number of colons in
the line.
You can access the elements of the list using a[0], a[2], and so on. For
example:
>>> line = "This:is:a:sample:line"
>>> l = line.split(':')
>>> l
['This', 'is', 'a', 'sample&
d.
At least the version 1.0 spec I snagged from W3C a long time ago.
I see the third edition at http://www.w3.org/TR/REC-xml/ is differently
styled,
(I guess new style sheets) but still pretty readable (glancing at it now).
Regards,
Bengt Richter
regards
Steve
--
Steve Holden
ituation a bit more, we'll be better able
to help you.
Steve Menard
Maintainer of http://jpype.sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-list
for saving bandwidth). What's right for developers is what
requires the least amount of work. The problem is, that's what is right
for end-users, too.
Yet again I will interject that XML was only ever intended to be wriiten
by programs. Hence its moronic stupidity and excellent uniform
os.path, jpype
root = os.path.abspath(os.path.dirname(__file__))
jpype.startJVM(jpype.getDefaultJVMPath(),
"-Djava.class.path=%s%sclasses" % (root, os.sep),
"-Djava.ext.dirs=%s%slib" % (root, os.sep))
#
em to CPython+Jpype.
Let me know if you need any help.
--
Steve Menard
Maintainer of http://jpype.sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Bickett wrote:
John Lenton wrote:
On Sun, Jan 23, 2005 at 01:53:52PM -0500, Daniel Bickett wrote:
Is there a reason that Google Groups isn't mirroring python-list
exactly like it used to, or is it simply a conspiracy I'm not in on?
You should not ask this kind of question in a public forum,
http://www.python.org/moin/PyConDC2005/Schedule
for the current schedule, and register at
http://www.python.org/pycon/2005/
regards
Steve Holden
Chairman, PyCON DC 2005
--
PyCon DC 2005: The third Python Community Conference
http://www.pycon.org/ http://www.python.org/pycon/
The scoop
uld do? I would go on Sourceforge. Try to find a
project that seems interestingto you. and then contact the Maintainer
see if you can help.
Many project also advertise the kind of help they need.
--
Steve Menard
Maintainer of http://jpype.sourceforge.net
--
http://mail.pyt
4 currently cannot import classes that are
in the "default" package. The fix is easy, simply put your "test" class
in a package. For exmaple, if you put the class in the package "test",
the code to load it would be :
test = jpype.JPackage("test&qu
then the
next thing you know they're writing algorithms to compute convex hulls
(well, maybe not, but you probably get the idea).
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237
ile to your site-packages
directory. You can then delete the empty fixedpoint directory, as it
won't do anything except get in the way.
Packages are implemented as directories, but modules are single Python
files. "Site-packages" is a perfectly acceptable place to put
found a.b.c.d in db
load_module: a.b.c.d
a.b.c.d loaded: pkg: 0
found bsddb in db
load_module: bsddb
found weakref in db
load_module: weakref
weakref loaded: pkg: 0
Traceback (most recent call last):
File "test.py", line 7, in ?
import bsddb
File "/c/steve/Projects/Python/dbimp
Kartic wrote:
Steve,
I believe you have to put ntpath, macpath and posixpath in the module
database for os.path to work.
I tried it with zipimporter builtin and I got the same traceback till I
added ntpath.py to my zip file. (Of course, I renamed the original
ntpath to _ntpath so that the original
Kartic wrote:
Steve,
Hmmm... Yes, I see what you are saying. Could you post your create
table statement so that I can create a db and play around with
dbimport?
Thanks,
--Kartic
Here it is, plus also the loader program I used to suck in the standard
library (in case it's that that
cally (on the system trying to connect to
the SMTP server), try disabling the rule in the Access Control dialog
that's labeled 'Prevent mass mailing worms from sending email'
-Steve
--
http://mail.python.org/mailman/listinfo/python-list
Kamilche wrote:
Is there a command you can execute in Python that will open a window on
the desktop, such as 'My Documents'? Kind of like 'system', but for
folder names, not just programs. I'm running on Windows 2000.
os.system("start .")
works for
, which
is JANUARY 28 (and it's already January 26).
So, don't delay: save yourself $75 and register by midnight Friday.
Which time zone, you ask. Why wait and find out - it only takes a couple
of minutes to register.
http://www.python.org/pycon/2005/register.html
regards
Steve Holde
to put some sort of BoF or Open Space event together for
people wishing to learn about (and teach about) the import system from
PEP 302 at PyCon this year.
Early bird registration rates are still available today and tomorrow!
regards
Steve
--
http://mail.python.org/mailman/listinfo/python-list
import ftplib
import fileinput
try:
print "first import"
import bsddb
except:
print "second import"
import bsddb
print "Done!"
$ python -i test.py
dbimporter: item: *db* args: () keywords: {}
Accepted *db*
dbimporter: i
ay morning. I look
forward to joining you all to hear Guido speak on "The State of Python".
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
Steve Holden wrote:
This is even stranger: it makes it if I import the module a second time:
[second import seems to succeed]
Maybe you are experiencing some version confusion? What you describe looks
much like the normal Python 2.3 behaviour (with no import hook involved
ppreciate it.
Compiling from source requires you to indicate the features that you
want compiled in. Without thread support, sockets din't work, so it
looks like you need to configure threads in. IIRC you do this by editing
the Modules.? file.
regards
Steve
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Tragi-comic. really. BTW you forgot cross-post to c.l.scheme, C,
smalltalk and C++
Would there, I wonder, be any enthusiasm for a "Best Xah Lee impression"
prize at PyCon?
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web P
a language that
DOES, at least until and unless your brain changes by other means.
Alex
I think we should all remember that Python isn't for everyone, and least
of all for those with little knowledge of Python and preconceptions
about what Python *should* be like.
regards
Stev
python.org/pycon/2005/register.html
Note that the sort order isn't perfect - I just sorted on the second
"word" in each name. PyCon is a *great* place to meet people and discuss
ideas. Hope to see you there.
regards
Steve
Chris Akre
Brad Allen
Kevin Altis
Ummesal
match
"not beginning with" type expressions.
Thanks,
Laci 2.0
You can do taht with Python re's. Look in the re documentation for
"negative lookahead assertion".
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.
rb is a module from the mp1 package, mp1.p2 is a
sub-package of mp1. You can see what's been compiled by the interpreter
on import and when by looking at the .pyc files.
Does this help any?
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming h
definitely in
for a treat this year.
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
--
http://mail.python.org/mailman/listinfo/python-list
any further nouse
(and no symbolic links to help it) is going to crap out badly.
But I could be wrong.
always-prepared-to-at-least-admit-the-possibility-ly y'rs - steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC
hon and
Perl? Unusual to find arrogance and humility in such close proximity.
Please stop cross-posting your ill-informed and inflammatory stuff to
c.l.py and c.l.perl.m. And now I have your attention, the answer to your
question is ...
Use triple-quoting.
followups-set'ly
Fredrik Lundh wrote:
Steve Holden wrote:
Is there a way to make a relocateable python binary... that is... a
python installation that won't care where it is on the machine... and
won't care if it gets put somewhere else besides / ?
the standard CPython interpreter is 100% "reloca
r an
answer to the (apparently relatively simple) question:
If a Python program imports a module licensed under the GPL, in your
opinion does the Python program become a derivative work of the GPL'd
software?
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
Note that the sort order isn't perfect - I just sorted on the second
"word" in each name. PyCon is a *great* place to meet people and discuss
ideas. Hope to see you there.
Good thi
Stephen Thorne wrote:
On Mon, 31 Jan 2005 17:49:53 -0500, Steve Holden <[EMAIL PROTECTED]> wrote:
Aahz wrote:
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
Note that the sort order isn't perfect - I just sorted on the second
"word" in ea
ue parts of OSX appear (from the outside) to be
Carbon/Cocoa and the funky GUI stuff. So have at it and come back for
advice when you need it. Good luck with your project.
[OBPyCon: of course, if you come to PyCon DC 2005 you can discuss this
stuff with experts:
http://www.python.org/pycon/2
ke my third (and final) year as
chairman to see the biggest and (much more importantly) best PyCon ever.
I hope to meet as many of you as possible in DC, March 23-25 (and during
the four-day sprint preceding the main event).
regards
Steve
--
Meet the Python developers and your c.l.py favorites
Co
Mike C. Fletcher wrote:
Steve Holden wrote:
I appreciate that not everyone has control over their .sig,
Take control of your sigs, my sisters and brothers! Viva la
Revolution! Follow the Steve into the heat and light of PyCon. You can
achieve enlightenment if only you go to the
cessive to me. Sample use case:
for something in lst:
if type(something) != type(()):
something = tuple(something)
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.python.org/pycon/2005/
Steve Holden
Thomas Bartkus wrote:
"Steve Holden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Thomas Bartkus wrote:
"Carl Banks" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
How common is it for a local variable to be bound in
more than one plac
thing to having subclassed the object's class but with closer
control.
regards
Steve
A: Top-posting
Q: What puts things in the wrong order on newsgroup postings
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www
uldn't be very helpful when trying to write an
optimizing compiler, but it is a valid type.
Skip
So reaplce the plus sign with an asterisk ...
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.python.org/pycon/2005/
Steve Holden http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
", though there wouldn't be
any problems in this case except the infinite recursion. Which
definitely *would* be a problem.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.python.org/pycon/2005/
Steve Holden
t those signs there. In fact I'm walking along the
tracks right now as I enter this post on my hand-held, and
[message ends with sound of locomotive horn followed by an ugly squelch]."
That's the kind of practice best avoided. Are you breaking the rules
just for the fun of it?
reg
Steve Holden wrote:
Peter Otten wrote:
Steve Holden wrote:
This is even stranger: it makes it if I import the module a second time:
[second import seems to succeed]
Maybe you are experiencing some version confusion? What you describe
looks
much like the normal Python 2.3 behaviour (with no
Bernhard Herzog wrote:
Steve Holden <[EMAIL PROTECTED]> writes:
What *I* would like to know is: who is allowing the import of bsddb.os,
thereby somehow causing the code of the os library module to be run a
second time.
I would guess (without actually running the code) that this p
else: return path3
else: return path2
else: return path1
Please, could you test it on your systems and tell me what you got?
I'd like to know what it returns on different operating systems because
I'm developing a multiplatform software.
Thank you all.
It works on Cy
op so that they exist like the code was written in?
Thanks,
AXEL.
You could try just importing the module - then, when it runs, its name
won't be "__main__" but "MyModule".
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Co
if not os.path.exists(path2):
if not os.path.exists(path3):
return os.getcwd()
else: return path3
else: return path2
else: return path1
print getHomeDir()
>>>
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23
ds() to turn it back into a code object:
>>> mbc = file("/lib/python2.4/re.pyc", "rb").read()[8:]
>>> import marshal
>>> code = marshal.loads(mbc)
>>> code
>>>
Note that the ugly details *might* change, and that byte codes ar
e module has been loaded from a
compiled file. In that case your only option is to read in the source
and compile it.
I am presuming that this feature of Pyro won't allow a 2.3 system to
talk to a 2.4 one, since the byte codes are incompatible.
regards
Steve
--
Meet the Python devel
Irmen de Jong wrote:
Steve Holden wrote:
Having said which, if the module was loaded from a .pyc file then the
bytecode is available from that - take everything but the first eight
bytes and use marshal.loads() to turn it back into a code object:
Yup. As I explained in the other message, this
ed to use a bytecode file from *one* version of Python
with an interpreter of another version. Python actually checks the first
four bytes of the .pyc file for a compatible "magic number" before
accepting the file for execution.
regards
Steve
--
Meet the Python developers and your c.l
stablishes
default settings for configuration variables. Other modules that import
config can access (and change) those values using
config.name = value
and so on. Hope this help.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005
Tim Daneliuk wrote:
Steve Holden wrote:
Roland Heiber wrote:
Tim Daneliuk wrote:
It does - thanks. One more question: Are pyc and pyo file portable
across operating systems? I suspect not since I generated a pyo
on a FreeBSD machine that will not run on a Win32 machine. I was
under the
gives me this
Traceback (most recent call last):
File "C:/Python24/dialog1.py", line 29, in -toplevel-
d = MyDialog(root)
NameError: name 'MyDialog' is not defined
I have a feeling this is something very simple, but I cannot figure it out.
Help!
Python is case-sensi
frame when you reach a breakpoint. It's a
great way to find out what's going on.
[But don't I remember that IDLE can do that too? ...]
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pyc
tried something called pyCrust, but this too didn't have history
To recall a line from your history in PyCrust, press Ctrl+UpArrow.
Ditto
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
St
tem fails, you'll leak
an object.
And in practice this will only happen during a period when you are
relying critically on it *not* to ...
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Stev
ntirely clear, but
newbies should not be using it as any kind of model.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
M.E.Farmer wrote:
Ok it has been a long day,
In my reply to Steven Bethard , Steve should read Steven ;)
M.E.Farmer
Well, since he signs himself "Steve" too I guess we'll just have to put
up with the ambiguities. Or perhaps, given my (lack of) typing skill, I
should just start
es to it as a way to
communicate between handlers.""".
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
Just wrote:
In article <[EMAIL PROTECTED]>,
Bernhard Herzog <[EMAIL PROTECTED]> wrote:
Bernhard Herzog <[EMAIL PROTECTED]> writes:
Steve Holden <[EMAIL PROTECTED]> writes:
if package:
module.__path__ = sys.path
You usually should initialize a packag
ng.
Does anyone know how to use SimpleHTTPServer to:
1. Support virtual hosts?
2. Support SSL?
I'd like to use SimpleHTTPServer to create some simple reporting utilities,
but can't get past these two points. Is there a NotSoSimpleHTTPServer?
You want ExtremelyBloodyComplicatedHTTPServer
th callback is the
"official interface in this game".
You will note that my code uses delegation to an FTP object rather than
inheritance. Maybe you would find that approach more fruitful for your
application.
regards
Steve
--
Meet the Python developers and your c.l.py favo
#x27;s. I've had to
deal with similar complications in my own code, but you may want to
think about biting the bullet. Globals are almost always a bad idea in
multi-user contexts like this.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC
so, take a look at http://www.python.org/Jobs.html
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/
--
http://mail.python.org/mailma
Steven Bethard wrote:
Steve Holden wrote:
M.E.Farmer wrote:
Ok it has been a long day,
In my reply to Steven Bethard , Steve should read Steven ;)
M.E.Farmer
Well, since he signs himself "Steve" too I guess we'll just have to
put up with the ambiguities. Or perhaps, given my (
As an aside, I notice a lot of other people's interpreters actually
print 'True' or 'False' where my system prints 0 or 1. Is that a
configuration that can easily set somewhere?
Nope, it's a version thing. I believe Booleans were introduced at some
odd point
ed an account to submit
patches or bugs, IIRC. Once you've created your account, log in and go to
http://sourceforge.net/tracker/?group_id=5470&atid=305470
and click "Submit New".
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-
self) is
superobject, effectively an instance of a class distinguishable from
self.__class__ only by the fact that its mro is shorter, losing
everything up to and including X.
Does this help at all? This is quite a subtle point, but it will repay
study with an understanding of exactly how you
,b,c
(1, 2, 3)
>>> a,b,c = [int(x) for x in (a,b,c)]
>>> a,b,c
(1, 2, 3)
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
Python zen would advise "refuse the
temptation to guess". So I am Cc'ing [EMAIL PROTECTED] with a request for an
answer to the (apparently relatively simple) question:
If a Python program imports a module licensed under the GPL, in your
opinion does the Python program become a deri
when you submit
patches/bug reports to speed it up?
BJörn:
I suspect you should join the python-dev list - you may well be able to
help much more effectively there.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.p
gabytes of data (search on "apple banana" and there
are hundreds of millions of pages with each word, so two lists of that
size must be intersected). 100,000 was the published number of
servers several years ago, and there were reasons to believe that they
were purposely underst
uot;: c }
...
funcString = GetFunctionAsString()
try:
f = funcMap(funcString)
except KeyError:
print "No such function"
raise SomethingElse
result = f(args)
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005
ult "by"
print m.span() # result (5,7)
How can I get the information of the other by ?
Sincerely Yours,
Pujo Aji
You need re.findall() (or, equivalently, the findall() method of an re).
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon
r a relational backend to
MoinMoin if it would speed up the execrably slow performance we
currently see on the python.org wiki. I haven't investigated why
response times went up so much, but I have a distinct feeling it's to do
with a new release.
regards
Steve
--
Meet the Python developers
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list
anyone see a simpler
way of writing this?
STeVe
That code looks like a pretty solid implementation of the spec to me.
There isn't a strict need for the last else, of course, which may be the
smell you detect.
If you wanted to get clever you could write something like
for i in True, False:
if
> This has a light code smell for me though -- can anyone see a simpler
> way of writing this?
How's about:
def ntf(x, y):
if x is None and y is None: return None
if x == True or y == True: return True
return False
# Then...
reduce(ntf, )
You might need to make sure that you init
ption, e:
print e
print ips
time.sleep(5)
Someone tell me I'm going crazy ;)
You are modifying the list as you iterate over it. Instead, iterate over
a copy by using:
for ip in ips[:]:
...
regards
Steve
--
Meet the Python developers and your c.l.py favorites March
Terry Reedy wrote:
"Steve Holden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[ ... ]
This seems much more sensible to me than building a new list with
everything (a copy), including things you don't want, and then deleting the
things you don't
Christos TZOTZIOY Georgiou wrote:
On Fri, 04 Feb 2005 13:04:16 -0500, rumours say that Steve Holden
<[EMAIL PROTECTED]> might have written:
[STeVe]
For a given list:
* If all values are None, the function should return None.
* If at least one value is True, the function should retur
amount +
dealer +
charge)
print "Please hand over", actual_price
Obviously the "..." are the bits you fill in to complete the program.
Good luck!
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyC
hanx
Define "is run from"?
When you enter an expression-statement at the interpreter's interactive
prompt the interpreter computers the result and, if the result is not
None, prints its repr().
How are you getting Zope to print the results? If they are coming
through a web brows
27;s all too useful, take a look at
http://www.uselesspython.com/
Welcome to Python!
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com
Steve Holden wrote:
Christos TZOTZIOY Georgiou wrote:
On Fri, 04 Feb 2005 13:04:16 -0500, rumours say that Steve Holden
<[EMAIL PROTECTED]> might have written:
[STeVe]
For a given list:
* If all values are None, the function should return None.
* If at least one value is True, the function
dle this?
Earl Eiland
You could either reconstruct the value yourself from the ord() values of
the individual bytes, or look at the struct module which can help you
with this kind of decoding task.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23
Bruno Desthuilliers wrote:
Steve Holden a écrit :
(snip)
So, for example, your program might look like this:
base_price = int(raw_input(...))
tax_rate = int(raw_input(...)
tax_amount = base_price * ((100+tax_amount)/...)
s/(100+tax_amount)/(100 + tax_rate)/, I guess ?
Oops.
Let's try
tax_a
1701 - 1800 of 7151 matches
Mail list logo