features than most people will ever use, and they
(Guido, et al.) can stop tinkering with it now and concentrate more on
the standard libraries.
--
-- ~~~~~
Keith Dart <
be aware that proctools spawns a process with the subprocess
stdio connected to _your_ parent process, and does not inherit the stdio
of the parent. So, if the subprocess writes a lot of stuff you must read
it, or the subprocess will blo
start_time: 42
state: S
tms_cstime: 731277
tms_cutime: 9593767
tms_stime: 237
tms_utime: 75
tty_nr: 0
tty_pgrp: -1
vsize: 1429504
wchan: 3222957162
--
-- ~~~~~
Keith
here is a module called
"proctools". It has a process manager that does this for you.
--
-- ~
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
=
--
http://mail.python.org/mailman/listinfo/python-list
someone one\nsomething three\nsomewhere four"
This allows you to use mapping-substitution syntax on a special string
object. But the substituted variables are attributes of the object.
String-ifying it gets the new string with the
and snmplib modules.
--
-- ~
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
=
--
http://mail.python.org/mailman/listinfo/python-list
Jp Calderone wrote:
On Sun, 19 Dec 2004 23:15:40 GMT, Keith Dart <[EMAIL PROTECTED]> wrote:
Mike Meyer wrote:
The termios gives module gives you the tools to manipulate the tty
directly, without invoking stty. The tty module gives you an easier
interface to those routines. However, it'
tpass" module, as it has the same functions found there. The PagedIO
object is used by the CLI framework in pyNMS.
--
-- ~
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
=
--
http://mail.python.org/mailman/listinfo/python-list
ethod to do what you want.
--
-- ~~~~~
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
=
--
http://mail.python.org/mailman/listinfo/python-list
self.append(val)
else:
self.append(Enum(i, str(val)))
def __repr__(self):
return "%s(%s)" % (self.__class__.__name__, list.__repr__(self))
-- ~~~~~~~
h a regular parameterized
function?
--
-- ~~~~~
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
=
--
http://mail.python.org/mailman/listinfo/python-list
production", that fluency will decrease? Or that
the nifty recent features of Python (generators, etc.) are not useful in
"production" code?
-- ~~~~~
Keith Dart <[EM
egular Python module?
-- ~~~~~
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
=
--
http://mail.python.org/mailman/listinfo/python-list
Have you ever wondered where your python modules get imported from?
Here is a little script, called "pywhich", that will tell you.
--
\/ \/
(O O)
-- oOOo~(_)~oOOo--------
Keith Da
~(_)~oOOo
Keith Dart <[EMAIL PROTECTED]>
vcard: <http://www.kdart.com/~kdart/kdart.vcf>
public key: ID: F3D288E4 URL: <http://www.kdart.com/~kdart/public.key>
==
, among other things, sets the prompt to "Python> "
433 $ py
Python> print "This has no leader that screws up email programs."
This has no leader that screws up email programs.
Python>
--
\/ \/
(O O)
-- oOOo~(_)~oOOo
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
--
http://mail.python.org/mailman/listinfo/python-list
ever, there are libraries in Python that do that for you.
See above.
--
\/ \/
(O O)
-- ----oOOo~(_)~oOOo
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
--
http://mail.python.org/mailman/listinfo/python-list
ake my libraries facilitate that,
and also be easy to use for beginning Python programmers. Python on
Linux is a powerful combination, and I cannot fathom why someone would
choose anything less. (I would concede that Python on Darwin is also good)
--
\/ \/
(O O)
-- oOOo~(_)~oOOo----
Keith Dart <[EMAIL PROTECTED]>
vcard: <http://www.kdart.com/~kdart/kdart.vcf>
public key: ID: F3D288E4 URL: <http://www.kdart.com/~kdart/public.key>
==
Donn Cave wrote:
Keith Dart <[EMAIL PROTECTED]> wrote:
|>> if exitstatus:
|>> print "good result (errorlevel of zero)"
|>> else:
|>> print exitstatus # prints message with exit value
This is indeed how the shell works, though the actual failur
s the wisdom of
the languages design. 8-)
Now, how about an icon that conveys something like that? hm... smoke
curled around wizard perhaps?
--
\/ \/
(O O)
-- oOOo~(_)~oOOo----
Keith Da
it out.
--
\/ \/
(O O)
-- oOOo~(_)~oOOo
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
--
http://mail.python.org/mailman/listinfo/python-list
... ;-)
--
\/ \/
(O O)
-- oOOo~(_)~oOOo
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
--
http://mail.python.org/mailman/listinfo/python-list
Nick Craig-Wood wrote:
Keith Dart <[EMAIL PROTECTED]> wrote:
Oh, I forgot to mention that it also has a more user- and
programmer-friendly ExitStatus object that processess can return. This
is directly testable in Python:
proc = proctools.spawn("somecommand")
exitstatus
Kent Johnson wrote:
Keith Dart wrote:
try:
dict[a].append(b)
except KeyError:
dict[a] = [b]
or my favorite Python shortcut:
dict.setdefault(a, []).append(b)
Kent
Hey, when did THAT get in there? ;-) That's nice. However, the
try..except block is a useful pattern for many sim
xist you add it.
--
\/ \/
(O O)
-- oOOo~(_)~oOOo----
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4
===
ll the items in the original dictionary must be
hashable. The example shows just integers, so I assume they are in this
case. But generally, this may not work.
--
\/ \/
(O O)
-- oOOo~(_)~oOOo--
Keith Dart wrote:
Ian Bicking wrote:
Jon Perez wrote:
Michael McGarry wrote:
I intend to use a scripting language for GUI development and front
end code for my simulations in C. I want a language that can support
SQL, Sockets, File I/O, and shell interaction.
In my experience, Python is
Keith Dart wrote:
Michele Simionato wrote:
I was looking at Python 2.4 subprocess.Popen. Quite nice and handy, but I
wonder why a "kill" method is missing. I am just adding it via
subclassing,
class Popen(subprocess.Popen):
def kill(self, signal = SIGTERM):
os.kill(self.p
ob instance be there.
Check out the Durus project.
http://www.mems-exchange.org/software/durus/
--
\/ \/
(O O)
-- oOOo~(_)~oOOo----
Keith Dart <[EMAIL PROTECTED]>
vcard: <http://w
ob instance be there.
Check out the Durus project.
http://www.mems-exchange.org/software/durus/
--
\/ \/
(O O)
-- oOOo~(_)~oOOo----
Keith Dart <[EMAIL PROTECTED]>
vcard: <http://w
ob instance be there.
Check out the Durus project.
http://www.mems-exchange.org/software/durus/
--
\/ \/
(O O)
-- oOOo~(_)~oOOo----
Keith Dart <[EMAIL PROTECTED]>
vcard: <http://w
NMS.
http://sourceforge.net/projects/pynms/
--
\/ \/
(O O)
-- oOOo~(_)~oOOo--------
Keith Dart <[EMAIL PROTECTED]>
vcard: <http://www.kdart.com/~kdart/kdart.vcf>
public key: ID: F3D
o it "manually" using the Python C API.
Good luck.
--
It's not me.
--
\/ \/
(O O)
-- ----oOOo~(_)~oOOo
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288
e and take a message)
--
\/ \/
(O O)
-- oOOo~(_)~oOOo----
Keith Dart <[EMAIL PROTECTED]>
vcard: <http://www.kdart.com/~kdart/kdart.vcf>
public key: ID: F3D288E4 URL: <htt
35 matches
Mail list logo