Re: os.popen3 delivers no error exist status ?

2006-03-02 Thread Donn Cave
of the documentation about these functions, too. They are not just like popen. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Args By Reference

2005-05-10 Thread Donn Cave
C, G = (H, A, B, C, D, E, F, G, W[1], 0x71374491) ... 2. The OOP way: each object has the appropriate function that modifies its content value. That looks like a big waste of time to me, but I mention it for conceptual completeness. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: incorrect(?) shlex behaviour

2005-05-16 Thread Donn Cave
is has a little potential to mislead. Bourne shell syntax is naturally "shell-like", but it is not "simple" - as grammars go, it's a notorious mess. In theory, someone could certainly write Python code to accurately parse Bourne shell statements, but that doesn't ap

Re: Python Polymorphism

2005-05-16 Thread Donn Cave
#x27;ad hoc'-polymorphism. Or 'bogus'-polymorphism. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Running a python program during idle time only

2005-05-20 Thread Donn Cave
Quoth Mike Meyer <[EMAIL PROTECTED]>: | "los" <[EMAIL PROTECTED]> writes: | > I'm trying to create a program similar to that of Google's desktop that | > will crawl through the hard drive and index files. I have written the | > program and as of now I just put the thread to sleep for 1 second afte

Re: Build error Python 2.4.1 - stat problem?

2005-05-24 Thread Donn Cave
e hard-coded octal bitmask definitions, including S_IFDIR = 004. Check it out. Try to use that value the way they're using it, in C and in Python, and print out all the values involved. At worst, if C comes out wrong too, you may have a question that the vendor will be more likely to respond to. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Manipulating mailboxes

2005-05-24 Thread Donn Cave
nce to set up the initial connection. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: ignoring SIGPIPE in a python script?

2005-06-01 Thread Donn Cave
ue to write output, since it's truly a rare application that checks its output (especially since it's usually buffered.) The SIGPIPE signal just aborts the program. Not really very much like EOF at all. You could install your own handler, but it would probably make about as much sense

Re: calling ksh script from python

2005-06-02 Thread Donn Cave
t modern platforms, sh will have a pretty good programming feature set, and will be more reliable (especially if it isn't just ksh by another name.) Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: calling ksh script from python

2005-06-02 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>, > Donn Cave <[EMAIL PROTECTED]> wrote: > . > . > . > >Meanwhile, it might be wor

Re: calling ksh script from python

2005-06-03 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Cameron Laird (2005-06-02 18:08 +0100) > > In article <[EMAIL PROTECTED]>, > > Donn Cave <[EMAIL PROTECTED]> wrote: > >>Meanwhile, it might be worthwhile to reconsider

Re: calling ksh script from python

2005-06-03 Thread Donn Cave
ksh to pure python... I thought > that I could re-use some stufff, but I guest I'm going to translate > everything... Right, that's true - more generally, no process can modify another's environment. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: without shell

2005-06-10 Thread Donn Cave
n. It always invokes the shell. The no-shell alternatives are spawnv (instead of system) and the popen2 family (given a sequence of strings.) Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: without shell

2005-06-10 Thread Donn Cave
esses", after the popen() paragraph above tells you how to do it (using the better term "exit status".) Or one may look at the source. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: "also" to balance "else" ?

2005-06-13 Thread Donn Cave
trol, the choice between two ways to take the boolean sense of a loop control is really based on some logical premises, which we can reconsider if it's productive to do so. I prefer this to fantasies about changing the language, your mileage may vary. Donn Cave, [EMAIL PROTECTED] -- h

Re: FAQ: __str__ vs __repr__

2005-06-15 Thread Donn Cave
n't expect this to work reliably with random objects. The price we pay for the notion is mostly in the "fix" for float repr, which now displays the float in all its imprecise glory and routinely confounds people who don't understand what that's about. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: __str__ vs __repr__

2005-06-15 Thread Donn Cave
d in the format that is most readily processed, and it will omit extraneous information. Are we saying anything other than this? Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: __str__ vs __repr__

2005-06-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "John Roth" <[EMAIL PROTECTED]> wrote: > "Donn Cave" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Quoth "John Roth" <[EMAIL PROTECTED]>: > > ... > > | str() sho

Re: Loop until condition is true

2005-06-17 Thread Donn Cave
ly needed. If you look at C code, at least in my experience the "until" loop is quite rarely used. (I don't see it once in the source to Python 2.4, for example.) Meanwhile, the "while True" (or "while 1") idiom is very familiar to Python programmers (just as t

Re: Loop until condition is true

2005-06-18 Thread Donn Cave
Quoth Peter Otten <[EMAIL PROTECTED]>: ... | 'until' in C is actually | | do | statement | while (expression); Oops. Well, QED - I sure don't need it often. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Donn Cave
n reasonably argue that steel toed boots prevent injuries to the toe, without having to prove that they withstand a welding torch, a nuclear blast, etc. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-02 Thread Donn Cave
points of articulation and more things that aren't obvious to the person making the changes. If that's flexibility, you can have it. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-05 Thread Donn Cave
ar or two ago. I don't see how it could ever get anywhere without offending a lot of the Python crowd, however well designed, so I can see why someone might try to sneak it past by pretending it has nothing to do with types. But he didn't -- look at the examples, I think he rather overst

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-11 Thread Donn Cave
onse to, and I don't know what that was supposed to mean, but Haskell's type system addresses just what we all would expect, the structural consistency of the program in terms of data types. It doesn't generally prevent data errors or correct your misunderstanding of an algorithm or in general avoid every kind of error. What it does, though, it does rather well. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-11 Thread Donn Cave
#x27;s reprimands about your code errors, or nagging about warnings? Maybe the language implementation's job has as much to do with working around our feelings as anything else. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-12 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > Someday we will look at "variables" like we look at goto. > > > How very functional. I believe some people naturally think in terms of > state tran

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-12 Thread Donn Cave
uch else in this thread. Certainly up to you, but you wouldn't be in a very good position to be drawing weird inferences as above. Or you see original conception of the program as so inherently suspect, that random errors introduced during implementation can reasonably be seen as helpfu

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-13 Thread Donn Cave
lems with the procedural/imperative programming model, and we can establish that it was already hated and on its way out by the late 90's? How about OOP? Already on its way out by the time Python 1.0 hit the streets? The thing that allows us to be so smug about the follies of the past, is that we can pretend everyone knew better. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Semantics of file.close()

2007-07-17 Thread Donn Cave
for it, other than the obvious - either always flush, or wrap an explicit close in its own exception handler. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Select weirdness

2007-04-23 Thread Donn Cave
t a lot of work to read data with operating system functions that are compatible with select - os.read(), socket.recv() - and break it up into lines on your own, and this completely and efficiently resolves the problem. I haven't looked at your code. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-25 Thread Donn Cave
ference counting allocation scheme will be useful. In particular, you need a fairly good grasp of what a "reference" is. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Access to raw command line?

2007-04-26 Thread Donn Cave
dy RMS$ function or two so it gets done in a consistent way. This allows the command line interface to interact with the user in a little more transparent way, since the input seen by the program is congruent with what the user typed in. E.g., "rename *.jpeg *.jpg" is trivial on VMS, im

Re: Access to raw command line?

2007-04-27 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-04-26, Donn Cave <[EMAIL PROTECTED]> wrote: > > >> One possible way to work around this is to get the raw command line > >> and do the shell expansions ourselves from wi

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Donn Cave
ometimes to the point of what seems like willful blindness to the deficiencies of a favorite programming language. If we have a sound language proposal backed by a compelling need, fine, but don't add a great burden to the language for the sake of great plans for Nepalese grade school programmers. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: 0 == False but [] != False?

2007-05-24 Thread Donn Cave
ed towards the end. Yes, it's the Laura Creighton article again: http://groups.google.com/group/comp.lang.python/msg/2de5e1c8384c0360 Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: 0 == False but [] != False?

2007-05-29 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > > Anyone who finds this surprising, might enjoy reading this > > article from the time several years ago when the feature > > was being considered. When you

Re: 0 == False but [] != False?

2007-05-29 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > > Not that it is of no historical interest to review all these > > reasonable arguments, but allow me to restore the context quote > > from my follow-up:

Re: Who told str() to round my int()'s!!!

2007-08-15 Thread Donn Cave
he way we render objects as text strings, a priori. If there is any such thing, it depends completely on the context. To invite the author of an object to devise a text rendition that will be humane (friendly, readable or whatever) is to waste his or her time. There are better ways to conceive of this str/repr distinction, and they've been discussed to death. python.org documentation will probably never be fixed. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: imaplib & Received: header(s)???

2007-08-19 Thread Donn Cave
an you retrieve other fields that way? Does the one you're looking for appear in the data if you get the whole header, for example with 'RFC822.HEADER'? It certainly does in my Python IMAP client, and this would have at least helped you refine your question. Donn Cave -- http://mail.python.org/mailman/listinfo/python-list

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-02 Thread Donn Cave
fer to use a > different thread for reading its output. Right - `I used threads to solve my problem, and now I have two problems.' It can work for some variations on this problem, but not the majority of them. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-06 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 02 Mar 2007 14:38:59 -0300, Donn Cave <[EMAIL PROTECTED]> > escribió: > > > In article <[EMAIL PROTECTED]>, > > "Gabriel Genellina"

Re: tuples, index method, Python's design

2007-04-12 Thread Donn Cave
index method. This suggests a missing > method, does it not? Who has not done this? > Name yourself! I am pleased to find myself in this company. My name is Donn Cave. I have been using Python since version 1.1, though frankly I haven't used it a lot in recent years. I have a confess

Re: tuples, index method, Python's design

2007-04-12 Thread Donn Cave
ngly that > this shouldn't be understood in terms of type similarities. Well, yes - consider for example the "tm" tuple returned from time.localtime() - it's all integers, but heterogeneous as could be - tm[0] is Year, tm[1] is Month, etc., and it turns out that not on

Re: tuples, index method, Python's design

2007-04-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Donn Cave" <[EMAIL PROTECTED]> wrote: > > > > > Well, yes - consider for example the "tm" tuple returned > > from time.localtime() - it

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Donn Cave
rameter binding should be implemented, so you could say dotted = string.join('.') ... v = dotted(['comp', 'lang', 'python']) As you probably well know, that isn't my idea, it's a common functional programming language idiom. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find out if another process is using a file

2007-01-18 Thread Donn Cave
appropriate one. > > Use os.open with the O_EXCL flag; will fail if the other process has the > file still open (and will fail if another process is reading the file, too, > not just if someone is writing). O_EXCL fails if the file exists at all - whether closed or open. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find out if another process is using a file

2007-01-18 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Nick Maclaren) wrote: > In article <[EMAIL PROTECTED]>, > Donn Cave <[EMAIL PROTECTED]> writes: > |> In article <[EMAIL PROTECTED]>, > |> "Gabriel Genellina" <[EMAIL PROTECTED]> wro

Re: Is any python like linux shell?

2007-01-22 Thread Donn Cave
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: ... > Paddy wrote:' > > Frank, > > IPython is great, but it is not a replacement for a shell like bash. If > > you have a Linux system then you still need to know the rudiments of > > bash > > Or better yet, csh. ;) Careful

Re: Repr or Str ?

2007-02-06 Thread Donn Cave
str() to force data to string type (that's what I mean by conversion.) If the object can't sensibly be converted to string type, then normally __str__ is omitted, and defaults to __repr__. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: IOError: [Errno 4] Interrupted system call

2007-02-07 Thread Donn Cave
't have signal handlers, sounds like a horrible idea to me. If your code has a signal handler for SIGCHLD, try to get rid of that - the handler itself is causing your problem. OO (Object Oriented?) doesn't have anything to do with the problem, that I can think of. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: os.popen and broken pipes

2007-02-09 Thread Donn Cave
les do not fulfill certain > critereia causing so_somehting() to return before the entire file is > processed. Most programming environments don't have this problem, though. If you like, your program can undo what Python does: signal.signal(signal.SIGPIPE, signal.SIG_DFL) for file

Re: f---ing typechecking

2007-02-15 Thread Donn Cave
gument handling, no. We know that without having to know anything about t, and not much about f. This is characteristic of tuple applications. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: f---ing typechecking

2007-02-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > Donn Cave <[EMAIL PROTECTED]> writes: > > If t is a valid argument tuple for function f, then can t[1:] > > also be a valid argument tuple for function f? > > > > Fo

Re: IOError: [Errno 4] Interrupted system call

2007-02-16 Thread Donn Cave
gt; i'm struggling to figure this out. can you recommend any possible > methods of preventing this? for instance, could acquiring a thread > lock before calling popen solve the problem? No. Did you look at the text of the post you responded to here? What do you think about that advice? Do

Re: f---ing typechecking

2007-02-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > Donn Cave <[EMAIL PROTECTED]> writes: > > Unpredictable? How do you manage to write functions in this case? > > Are all your formal parameter lists like (*a), with logic to d

Re: IOError: [Errno 4] Interrupted system call

2007-02-16 Thread Donn Cave
d that restart loop, actually reading one line at a time and appending to the line list. I'm not sure that's totally bulletproof - probably will work, but if you need a sure thing, I would go to UNIX I/O (posix.read), in a loop, and then split the concatenated results by newline. Or, of course if you could shut down the signals... Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: f---ing typechecking

2007-02-17 Thread Donn Cave
Quoth Paul Rubin <http://[EMAIL PROTECTED]>: | Donn Cave <[EMAIL PROTECTED]> writes: | > What this proves is that you can implement | > an argument list at run time, but it by no means changes the | > nature of the argument list as a sequence. | | Right, it's treated a

Re: Approaches of interprocess communication

2007-02-17 Thread Donn Cave
gh the loopback interface anyway, invariably regardless of host network implementation? Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Teach Python "Variables"

2007-11-27 Thread Donn Cave
someone who learns Python concepts in terms of explanations like `boxes' or `pointers' or whatnot is at some disadvantage while that lasts, like translating a foreign language to your own instead of attaching meaning directly. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: KeyboardInterrupt should not kill subprocess

2008-02-21 Thread Donn Cave
oard interrupt? You might try posix.setsid(), from the child fork. The object is to get the child fork out of the foreground process group for the Berkeley terminal driver. This defines who gets signals, when they originate in terminal control keys. Donn Cave, [EMAIL PROTECTED] -- http://ma

Re: What Programming Languages Should You Learn Next?

2008-03-20 Thread Donn Cave
uld cheerfully accept this, given the meager and clumsy support for static typing in languages like C++, but today, it makes me appreciate Haskell's potential for complex projects. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Summary of threading for experienced non-Python programmers?

2008-03-28 Thread Donn Cave
rony because there's no way to know when the data is ready, and 3rd rate I/O because afterwards you still have the copying to do. I don't see even this much in asyncore.py, but I just gave it a glance. thanks, Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Summary of threading for experienced non-Python programmers?

2008-03-31 Thread Donn Cave
t does support "asynchronous, blocking" with aio -- as VAX/VMS did (and presumably still does), with event flags. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Orphaned child processes

2008-04-07 Thread Donn Cave
ed pipe. When you read from one, you get end of file, i.e., a normal return with 0 bytes. When you test it, make sure to try a configuration with more than one child process. Since the parent holds the write end of the pipe, subsequently forked child processes could easily inherit it, and they&#x

Re: pty.spawn directs stderr to stdout

2008-04-11 Thread Donn Cave
tify the backup error unit, if the command line parameter option isn't available for some reason. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-15 Thread Donn Cave
ome of the maintenance issues, since at least you can upgrade on your own schedule, but of course it has its costs too. Anyone who might be thinking about using Python for an application should seriously think about this. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-16 Thread Donn Cave
ation is a lot more fun in some ways, but I think if you were to apply a sort of conspiracy analysis to the situation - "who benefits from language change" - this would be a couple items down on the list of motivations. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-16 Thread Donn Cave
27;t imagine how you could be convinced of this. Changes to Python in 3.0 won't satisfy the continuing "need" for change thereafter. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k concerns. An example

2008-04-25 Thread Donn Cave
hey are not better known' If English isn't your 1st language, you deserve a lot of credit for your mastery of it, but you need a better dictionary. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple unicode-safe version of str(exception)?

2008-04-28 Thread Donn Cave
ket, dict, whatever? A sort of generic solution might be to follow str's behavior with respect to '__str__', extending it to fall back to repr() whatever goes wrong. def xtr(a): try: return str(a) except: return repr(a) ...

Re: os.execve(pth,args,env) and os.chroot(pth) = problems

2006-03-07 Thread Donn Cave
27;t see how this is possible if os.path.exists(pth) returns > True, why is it os.execve() has problems finding it. I haven't used chroot enough to know all the pitfalls, but here's one guess: suppose the CGI script file `pth' might actually be a script, with a `#!' top line t

Re: Type Hinting vs Type Checking and Preconditions

2006-03-07 Thread Donn Cave
t;> resulting in the desired result or a typecasting error otherwise. > >> Furthermore, it could do it more efficiently than a developer having to > >> put conditional code at the beginning of traditionally typecasting > >> functions. I know awk works a bit like that, maybe Perl? but it's surely way out of place in Python. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Bidirectional communication over unix socket (named pipe)

2006-03-08 Thread Donn Cave
is not connected') > > This is despite the client waiting on a socket.recv() statement. Is > the client really not connected, or is the server unaware of the > connection? And how do I fix this? You can either connect() as well as bind(), or use sendto(data, file) Do

Re: Bidirectional communication over unix socket (named pipe)

2006-03-08 Thread Donn Cave
y go both ways. I was a little surprised by this, and have not been able to scare up any explicit documentation, but the only example program I could find for two-way UNIX domain datagram IPC, uses two sockets, not one - http://docs.hp.com/en/B2355-90136/ch07s06.html Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: IMAP Checking Folder Size

2006-03-20 Thread Donn Cave
; value, before you can assume that you got the data you asked for. I would suggest that you print these values out somewhere, it will put you in a position where you can probably answer your question better than we can. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: don't understand popen2

2006-03-22 Thread Donn Cave
ducing strings. Anyway, it seems unlikely he would get that INVARG error for this reason. That's an error from the host operating system, not the interpreter, and it mostly likely refers to the file descriptor. Since it works for me, I guess his problem is basically this: |> (python 2.4

Re: access mbx files?

2006-03-26 Thread Donn Cave
servers, but there it's email net protocol data, POP or IMAP. If Mahogany has been using this format for `local' folders (i.e., via filesystem), I think that may have been kind of poor judgement on the part of its developers. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: access mbx files?

2006-03-27 Thread Donn Cave
Quoth "David Isaac" <[EMAIL PROTECTED]>: | Donn Cave, [EMAIL PROTECTED] |> I suppose it isn't supported by the mailbox module basically because |> it isn't all that commonly encountered. It may be more common on mail |> servers, but there it's email net pro

Re: Difference between 'is' and '=='

2006-03-27 Thread Donn Cave
e places where it may be better to write if not expr: than if expr is None: or worse yet, if expr == False: That's what I think, anyway. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Redirect output

2006-03-28 Thread Donn Cave
gs, or open the output file some other way that creates a file object and use its fileno() function. Flush stdout before each dup2(). To revert back to the original stdout, you will want a copy of that stream, which you can get with the os.dup() function, prior to redirection. All the left over file

Re: Capturing stdout without waiting for the process end

2006-04-03 Thread Donn Cave
than a pipe, but you can probably get something going with openpty or forkpty from the os/posix module, or there may still be 3rd party packages for this. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did someone write this?

2006-04-07 Thread Donn Cave
exc_traceback = None), the applications used a terminal graphics library, like curses, and I often depended on finalization (__del__) to run the "close" rendering for a graphic element. Worked fine until an exception, so I add this precaution to every I/O flush. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: [fcntl]how to lock a file

2006-04-11 Thread Donn Cave
ents fcntl.flock() with fcntl(2), I guess on the theory that you can't have enough brain damage. The worst case would be if Python's configure missed a bona fide flock(2), which is unlikely but may be worth checking if you use flock(2) for a reason. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3