On Wed, 13 Oct 2010 14:58:57 -0700, Roger Davis wrote:
> My understanding is that this functionality is best coded via
> subprocess.Popen(). I need to read output from these spawned children
> via a pipe from their stdout, hence something like
>
> p= subprocess.Popen(args, stdout=subprocess.
On Thu, 14 Oct 2010 08:48:45 -0700, Roger Davis wrote:
> On a related point here, I have one case where I need to replace the
> shell construct
>
>externalprog otherfile
>
> I suppose I could just use os.system() here but I'd rather keep the
> Unix shell completely out of the picture (which
eresting file system
> locations.
>
> I've established, through logging, that postfix runs my script with UID
> nobody & GID nobody. The directory I'm attempting to write has
> permissions 0770. The directory's group is not nobody, but the user
> nobody is a mem
On Sun, 17 Oct 2010 03:58:21 -0700, Yingjie Lan wrote:
> I played with an example related to namespaces/scoping. The result is a
> little confusing:
a=1
def f():
> a = a + 1
> return a
>
f()
> UnboundLocalError: local variable 'a' referenced before assignment
If you
On Mon, 18 Oct 2010 14:35:58 +, fab wrote:
> So my way of coding it is the following:
>
> class zone(GtkDrawingArea):
>
> class systemOfCoordinates:
> self.xmin = -5
> self.xmax = 5
> self.ymin = -5
> self.ymax = 5
"self" isn't meaningful within a class definition.
It's f
On Tue, 19 Oct 2010 11:21:49 -0700, [email protected] wrote:
> Actually, if it was possible, it would be nice to capture all
> the bytes going between stdin and stdout in a file as well for
> debugging purposes.
If the child process expects to be running on a terminal, you would need
to use a ps
Richard Gibbs wrote:
> If my python script is called with stdout (or stdin or stderr)
> redirected to a file, how can I find the filename under Linux? Under
> Windows?
On Linux, you can read the /proc/self/fd/* symlinks, e.g.:
stdin_filename = os.readlink('/proc/self/fd/0')
This isn't
On Thu, 21 Oct 2010 02:34:15 -0700, Jon Clements wrote:
> I'm after something that says: "I want 512mb of physical RAM, I don't
> want you to page/swap it, if you can't do that, don't bother at all".
> Now I'm guessing, that an OS might be able to grant that, but later on
> have to kill the proces
On Wed, 20 Oct 2010 16:18:57 +, kj wrote:
> I tried to fix the problem by applying the equivalent of "stty -echo"
> within a python interactive session, but discovered that this setting is
> immediately (and silently) overwritten.
FWIW, I don't see this behaviour with Python 2.6.5 on Linux. I
On Tue, 26 Oct 2010 14:44:11 +, Grant Edwards wrote:
>> There is no difference based on the name of your executable, how it
>> is built, or what libraries it links to; the only difference is in
>> its run-time behaviour, whether it invokes any GUI functions or not.
>
> No, we're not talking a
On Wed, 27 Oct 2010 13:46:28 +1300, Lawrence D'Oliveiro wrote:
> Why would you want both CLI and GUI functions in one program?
An obvious example was the one which was being discussed, i.e. the Python
interpreter. Depending upon the "script", it may need to behave as a
command-line utility (read
On Thu, 28 Oct 2010 12:54:03 +1300, Lawrence D'Oliveiro wrote:
>>> Why would you want both CLI and GUI functions in one program?
>>
>> An obvious example was the one which was being discussed, i.e. the Python
>> interpreter.
>
> But the Python interpreter has no GUI.
It may have one if you use
On Fri, 05 Nov 2010 10:12:05 -0400, Philip Semanchuk wrote:
> As others have said, ^ is for XOR. That's buried here in the
> documentation:
> http://docs.python.org/release/2.7/reference/...
>
> Not that I would have expected you to find it there since that's pretty
> dense. In fact, older versio
On Fri, 05 Nov 2010 19:39:12 +, John Reid wrote:
> I've compiled
> Python 2.7 (r27:82500, Nov 2 2010, 09:00:37) [GCC 4.4.3] on linux2
>
> with the following configure options
> ./configure --prefix=/home/john/local/python-dbg --with-pydebug
>
> I've installed numpy and some other packages b
On Fri, 05 Nov 2010 22:51:10 +, Seebs wrote:
>> IMHO, the lack of a reference manual for the language itself is a major
>> hole in Python's documentation.
>
> I'm a bit lost here. Could you highlight some of the differences between
> "a reference manual for the language itself" and "somethin
On Sun, 07 Nov 2010 00:06:25 +, Steven D'Aprano wrote:
>> A reference manual tells you how to use the language. A specification
>> tells you how to implement it.
>
> Surely a tutorial tells you *how* to use the language. I wouldn't expect
> a reference manual to teach me how to run and edit
On Sun, 07 Nov 2010 20:51:50 -0500, D'Arcy J.M. Cain wrote:
>> urllib2.HTTPError: HTTP Error 301: The HTTP server returned a redirect error
>> that would lead to an infinite loop.
>> The last 30x error message was:
>> Moved Permanently
>>
>> I can open the link in browser. Any way to get solve th
On Wed, 10 Nov 2010 13:07:58 +, Martin Gregorie wrote:
> FWIW the thing that really irritated me about fetchmail is the way it
> only deletes messages at the end of a session and never cleans up after
> itself. If a session gets timed out or otherwise interrupted the messages
> that were re
On Wed, 10 Nov 2010 09:34:14 -0800, xoff wrote:
> I am curious, why wouldn't you advise something like this:
> for i in chain(range(3,7) + range(17,23)):
Because it constructs all three lists (both of the individual ranges and
their concatenation) in memory. For a trivial example, that isn't a
pr
Hello,
I've recently been playing around with urllib.FancyURLopener and noticed
that under certain conditions it can block after calling open() on a
url. It only happens on specific servers and when the "Range" HTTP
header is in use. The server doesn't close the connection and
redirect_intern
rickman <[EMAIL PROTECTED]> wrote:
> spam
No fucking shit, Sherlock, why double the volume by pointing out the obvious?
--
http://mail.python.org/mailman/listinfo/python-list
701 - 721 of 721 matches
Mail list logo