> Can you make do with the tempfile module? Or you'd need to identify
> from an external process which console is locked?
Perhaps, I wrote a small hack:
- Manually set environment variable TTYNUMBER in .bash_profile
- Then use this in the script, to establish what tty I'm working with.
Thanks
-
On 11/30/2009 10:05 PM, Daniel Dalton wrote:
On Mon, Nov 30, 2009 at 02:26:14AM -0800, Chris Rebert wrote:
Also, in my quickie newbie experimentation with `screen`, each screen
"window" seems to get a unique tty#. Admittedly I am running OS X
Can you make do with the tempfile module? Or you'd
On Mon, 30 Nov 2009 21:02:00 +1100, Daniel Dalton wrote:
>> That did the trick, thanks, after I append
>> [-2]
>
> Further testing under screen says otherwise -- it seems to give me the
> tty number, not the virtual console number. Is there any way to figure
> out what virtual console I'm am in
Daniel Dalton wrote:
I can't find a reliable way to
determine the current console number with python or any bash tool. When
I say console number, I mean the actual console number, not screen
window or device it is sending to or whatever.
You may be able to tell by looking at the DISPLAY
environ
On Mon, Nov 30, 2009 at 02:26:14AM -0800, Chris Rebert wrote:
> Also, in my quickie newbie experimentation with `screen`, each screen
> "window" seems to get a unique tty#. Admittedly I am running OS X
Correct
(Which creates the problem)
> Perhaps if you could explain your problem in greater deta
On Mon, Nov 30, 2009 at 2:02 AM, Daniel Dalton wrote:
>
> On Mon, Nov 30, 2009 at 07:20:59PM +1100, Daniel Dalton wrote:
>> That did the trick, thanks, after I append
>> [-2]
>
> Further testing under screen says otherwise -- it seems to give me the
> tty number, not the virtual console number. Is
On Mon, Nov 30, 2009 at 07:20:59PM +1100, Daniel Dalton wrote:
> That did the trick, thanks, after I append
> [-2]
Further testing under screen says otherwise -- it seems to give me the
tty number, not the virtual console number. Is there any way to figure
out what virtual console I'm am in so
On Mon, Nov 30, 2009 at 02:21:54PM +1300, Gregory Ewing wrote:
> >I use to figure out what tty my program was invoked from?
>
> Here's one way:
>
> % python
> Python 2.5 (r25:51908, Apr 8 2007, 22:22:18)
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
> Type "help", "copyright",
Daniel Dalton wrote:
what function/module should
I use to figure out what tty my program was invoked from?
Here's one way:
% python
Python 2.5 (r25:51908, Apr 8 2007, 22:22:18)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Type "help", "copyright", "credits" or "license" for
Hi,
I have a very simple problem, but I can't work out the answer. How do I
return the current tty number in python? eg. what function/module should
I use to figure out what tty my program was invoked from?
Thanks
--
Cheers,
Dan
http://members.iinet.net.au/~ddalton/
signature.asc
Descriptio
10 matches
Mail list logo