Burge Kurt wrote:
>>divmod(...)
>>divmod(x, y) -> (div, mod)
>
>
> What is the easiest way to use div and mod seperately as an attribute like:
>
> if a = divmod(x,y)
>
> a.div or a.mod
The result of calling divmod() is a two-element tuple. You access the
elements by indexing:
>>> a
Steve Haley wrote:
> Hello everyone,
>
> I need to do something very simple but I'm having trouble finding the
> way to do it - at least easily. I have created a tuple and now need to
> find the position of individual members of that tuple. Specifically,
> the tuple is something like: words
Thanks - it was exactly as you said
--- Kent Johnson <[EMAIL PROTECTED]> wrote:
> Most likely your XML file is 16-bit unicode, not
> utf-8. When ascii text
> is represented as unicode, every other byte will be
> a null byte. That is
> the extra character that shows up as a space or box
> depen
> shell out to perform the top command, parse the results, and report
> those values to the job controller.
I'd use vmstat rather than top since top is intended to run contuinuously
whereas vmstat by default just returns a single line snapshot.
I don't know of any native python mechanism for obt
Thanks in advance for
any help!How do you create a script in python...sorry to be so remedial...first
script.
With my best regards
always,
David Christian
BEGIN:VCARD
VERSION:2.1
N:Christian;David
FN:David Christian ([EMAIL PROTECTED])
TITLE:CRNA
TEL;HOME;VOICE:9015262444
TEL;CELL;VOICE:901
On Thu, 12 Jan 2006, David Christian wrote:
> Thanks in advance for any help!How do you create a script in
> python...sorry to be so remedial...first script.
You might want to look at:
http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/
Some of the information there is a bit outdated, b
At 10:52 PM 1/11/2006, Brian van den Broek wrote:
>[snip]
>
>I assume Bob meant that tuples have no index or find method.
No, Bob is sick and not thinking clearly.
At 11:04 PM 1/11/2006, Terry Carroll wrote:
>Does it have to be a tuple? If you make it a list, you can use index():
>[snip]
At 03
Nico wrote:
> I think that libgtop and its python binding (used in gdesklets for
> example) would do the trick.
>
Thank you for your thoughts on that. I think in other applications this
might have a shot. In this situation I am using diskless workstations
with minimal configurations, so gnome li
Alan Gauld wrote:
>> shell out to perform the top command, parse the results, and report
>> those values to the job controller.
>
>
> I'd use vmstat rather than top since top is intended to run
> contuinuously whereas vmstat by default just returns a single line
> snapshot.
>
> I don't know of an