473,287 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

symbolic links, aliases, cls clear

mp
i have a python program which attempts to call 'cls' but fails:

sh: line 1: cls: command not found

i tried creating an alias from cls to clear in .profile, .cshrc, and
/etc/profile, but none of these options seem to work.

my conclusion is that a python program that is executing does not use
the shell (because it does not recognize shell aliases). is this
correct?

should i use a symbolic link? if so, where should i place it?

what is the difference between aliases and symbolic links?

if i execute a command like 'clear' to clear the screen, where does the
shell look to find the command 'clear'?

i'm using os x.

thanks
mp

Mar 29 '06 #1
22 4186
"mp" <ma*********@email.com> writes:
i have a python program which attempts to call 'cls' but fails:

sh: line 1: cls: command not found

i tried creating an alias from cls to clear in .profile, .cshrc, and
/etc/profile, but none of these options seem to work.

my conclusion is that a python program that is executing does not use
the shell (because it does not recognize shell aliases). is this
correct?
Yes.
should i use a symbolic link? if so, where should i place it?
You could, but I don't think it's the best solution.
what is the difference between aliases and symbolic links?
Aliases exist only in a shell. Symbolic links exist in the file
system.
if i execute a command like 'clear' to clear the screen, where does the
shell look to find the command 'clear'?


Generally it searches $PATH for an executable file called "clear".

I don't know Python very well (note the cross-post), but if it
provides a way to detect which operating system you're running on, you
could execute "cls" if you're on Windows, or "clear" if you're on a
Unix-like system. Or there might be some Python library with a
clear-screen function.

Are you sure you want to clear the screen? If I run your program and
it clears my screen for me, it could be erasing significant
information. If you want complete control over the screen, you should
probably use something like curses or ncurses (there may be a Python
interface to it).

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 29 '06 #2
On 2006-03-29, mp wrote:
i have a python program which attempts to call 'cls' but fails:

sh: line 1: cls: command not found

i tried creating an alias from cls to clear in .profile, .cshrc, and
/etc/profile, but none of these options seem to work.
Why not call 'clear', since 'cls' does not exist?
my conclusion is that a python program that is executing does not use
the shell (because it does not recognize shell aliases). is this
correct?
Even shell scripts do not normally expand aliases.
should i use a symbolic link? if so, where should i place it?

what is the difference between aliases and symbolic links?
What's the difference between a raven and a writing desk?
if i execute a command like 'clear' to clear the screen, where does the
shell look to find the command 'clear'?


In a directory listed in the PATH variable.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Mar 29 '06 #3
"mp" <ma*********@email.com> wrote:
# i have a python program which attempts to call 'cls' but fails:
#
# sh: line 1: cls: command not found
#
# i tried creating an alias from cls to clear in .profile, .cshrc, and
# /etc/profile, but none of these options seem to work.
#
# my conclusion is that a python program that is executing does not use
# the shell (because it does not recognize shell aliases). is this
# correct?

Shell command alias or Mac OSX file alias, like a Finder Make Alias?

A file alias is similar to a soft link except it has both path
and device/inode like information so that it can still identify
a renamed file. However aliasses are handled at the toolbox level
instead of the kernel, so that unix only code cannot resolve them.
// readalias - Resolve Finder alias files to the actual
// file, if it can be found. The interface is modelled
// after readlink. If the original is not alias
// or could not be resolved, return 0 and set errno.
// Otherwise return a mallocked string with the
// actual file path; caller must free.
//
// On non-macintosh systems, this always returns an
// error.

#ifdef ALIAS
#include <CoreFoundation/CoreFoundation.h>
#include <ApplicationServices/ApplicationServices.h>

static char *readalias(char *original) {
int ec = 0;
CFStringRef path = 0;
CFStringRef resolvedPath = 0;
CFURLRef url = 0;
CFURLRef resolvedUrl = 0;
FSRef fsRef;
char *s = 0;
if (!(path=CFStringCreateWithCString(NULL,original,kC FStringEncodingUTF8))) {
ec = EFAULT; goto exit;
}
if (!(url=CFURLCreateWithFileSystemPath(NULL,path,kCF URLPOSIXPathStyle,0))) {
ec = EFAULT; goto exit;
}
if (!CFURLGetFSRef(url,&fsRef)) {
ec = ENOENT; goto exit;
}
Boolean targetIsFolder,wasAliased;
if ((ec=FSResolveAliasFile(&fsRef,true,&targetIsFolde r,&wasAliased))) {
goto exit;
}
if (!wasAliased) {
ec = EINVAL; goto exit;
}
if (!(resolvedUrl=CFURLCreateFromFSRef(NULL,&fsRef))) {
ec = EFAULT; goto exit;
}
if (!(resolvedPath = CFURLCopyFileSystemPath(resolvedUrl,kCFURLPOSIXPat hStyle))) {
ec = EFAULT; goto exit;
}
s = (char*)CFStringGetCStringPtr(resolvedPath,kCFStrin gEncodingUTF8);
if (s) {
s = strcpy(malloc(strlen(s)+1),s);
}else {
int n = 3*CFStringGetLength(resolvedPath) + 1; s = malloc(n);
if (CFStringGetCString(resolvedPath,s,n,kCFStringEnco dingUTF8)) {
s = realloc(s,strlen(s)+1);
}else {
ec = EFAULT; goto exit;
}
}
exit:
if (path) CFRelease(path);
if (resolvedPath) CFRelease(resolvedPath);
if (url) CFRelease(url);
if (resolvedUrl) CFRelease(resolvedUrl);
if (ec) {
if (ec<0) ec = ENOENT;
errno = ec; free(s); s = 0;
}
return s;
}
#else
static char *readalias(char *original) {
errno = EINVAL;
return 0;
}
#endif

--
SM Ryan http://www.rawbw.com/~wyrmwif/
But I do believe in this.
Mar 30 '06 #4
mp wrote:
i have a python program which attempts to call 'cls' but fails:
sh: line 1: cls: command not found
i'm using os x.


[Note Followup-to: severely trimmed]

I'd guestimate (those more familiar with python can probably fill in
more relevant python specific details) that the python program is
probably doing something like:
system("cls")
.... or whatever the python-specific way of writing something like that
is. Most likely that was written, intended for some Microsoft
DOS/Windows/XP or similar type of operating system - where CLS is a
legitimate command (to clear the screen). On UNIX (and probably also
OS X), there is no "cls" as a standard command, but there is the quite
standard command "clear", to clear the "terminal" screen.

In the land of UNIX, most languages implement the system() function or
equivalent, by typically fork(2)ing and exec(3)ing (at least one of the
exec(3) family of calls), generally invoking "the" or a default shell
(typically /bin/sh) with a first option argument of "-c", and then the
argument to system passed as one single string as the other argument to
the shell. It would seem likely that python was "smart enough" (of
course) to know on UNIX to implement system() as sh -c ..., rather than
something like COMMAND /C ... or CMD /C ... as it would likely do on
DOS/Windows/XP or similar. But "of course" python probably has no clue
what the cls is that's handed to it with system(), and likely just
blindly passes it on to the shell. The diagnostic you got would also
seem to imply that's what happened (the shell (sh) couldn't find the
cls command). ... as a matter of fact, if I try that on Debian
GNU/Linux 3.1 (technically not "UNIX", but neither is OS X, but for
practical purposes they're both quite sufficiently close), I get
results that would appear exceedingly consistent with the hypothesis I
put forth:
$ sh -c cls
sh: line 1: cls: command not found

If it's desired to have the python program function as close to its
(apparent) original intent as feasible, it may be desirable to:
have it test the operating system, and if it is UNIX or similar, use
clear, instead of cls ... or if one wants to port/adapt it to UNIX
(and OS X, etc.), with no need or intention to move it back and forth
or among significantly different operating systems, then perhaps
consider simply replacing the system(cls) with system(clear), or
whatever the precise suitable change in the python code would be.
It would probably also be worth inspecting the code for other
occurrences of system() that may also need to be adjusted or changed.

Note also that some languages (e.g. Perl) will potentially take
shortcuts with the system() function. For example, with Perl
(paraphrasing and perhaps over-simplifying a bit) if Perl sees no
need or reason to have to use the overhead of the shell to invoke the
system() function, it will just quite directly (after the fork(2))
exec(3) the command, setting the argument(s) suitably. Python may
(or may not) try similar shortcuts. For example, CLS, on DOS, etc.,
is internal to the "shell" (command interpreter), so, if python
didn't find an external CLS command, it would have to pass it to the
"shell", hoping the shell would know what to do with it. That would
happen to work with DOS, but would generally fail on UNIX (where cls
would generally not exist as a command, and wouldn't be built-in to
the shell).

Mar 30 '06 #5
its true for the processes, gone to the system mode and from there the
process is not considering the shell variable any more.

In case of deamons also it is the same case. For Phython programs, I am
not sure , may they are also nohops, so might be not accessing the
shell variables. But i think you have defined the alias to some other
place.... the error is reported by shell that cls not found.

This could be investigated if you do some tests with the system. Like
alias is shell script you can open it and read it , how it invokes the
command for creating aliases. etc etc.

Alias: When the shell is in picture it directly replaces the string
"cls" to "clear" and execute the clear.

Symbolic links: are reference to the inode of the actual files, so it
should work in your case.

just run
#which clear
(O/P , you will get the location of binary say /usr/bin/clear)

Now you can create the symbolic link named as cls at location
"/usr/bin". this symbolic link should be a soft link to /usr/bin/clear.
you can also put the symbolic links to any of the location that is
displayed by $PATH variable.

for any command you execute in shell, it functions in following order:
(Not exactly the same, need to confirm, i might miss some of the steps)

1) check with the shell variable(whether any alias to this command
exists or not!)
2) search it in the locations $PATH and execute the command is it is
found.
so on...

Apr 4 '06 #6
If I may recommend an alternative,

print "\033[H\033[J"

the ansi sequence to clear the screen.

Apr 12 '06 #7
af******@gmail.com wrote:
If I may recommend an alternative,

print "\033[H\033[J"

the ansi sequence to clear the screen.


Or so you would hope (however, that is *not* what you have listed!).

Unfortunately, it is poor practice to hard code such sequences.
Instead the proper sequence should be obtained from the
appropriate database (TERMINFO or TERMCAP), and the easy way to
do that is,

tput clear

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) fl***@apaflo.com
Apr 12 '06 #8
"mp" <ma*********@email.com> wrote:
i have a python program which attempts to call 'cls' but fails:

sh: line 1: cls: command not found
Hmmmmm... (I don't program in Python, so precisely what is
happening isn't something I'm sure about).

But, note how that line starts with "sh:"! That indicates it is
/bin/sh which is reporting an inability to find a "cls"
command. It suggests that Python (like most other programming
languages) calls shell scripts using /bin/sh as the default
shell.

The problem is that unix has no command named "cls".
i tried creating an alias from cls to clear in .profile, .cshrc, and
/etc/profile, but none of these options seem to work.
In /etc/profile and ~/.profile you will cause an alias to be
defined *for* *interactive* *login* *shells*. But not for
non-interactive non-login shells, which is what you are invoking
with Python. The reason is because aliases are not inherited by
sub-shells, and only interactive login shells read those two
files.

Hence your alias is never defined in the subshell your program
executes.
my conclusion is that a python program that is executing does not use
the shell (because it does not recognize shell aliases). is this
correct?
No.
should i use a symbolic link? if so, where should i place it?
No.
what is the difference between aliases and symbolic links?
Aliases are a mechanism used by a shell to define a command name
that executes a series of commands. A symbolic link is a
directory entry that de-references another directory entry, so
that either entry points to the same actual file.
if i execute a command like 'clear' to clear the screen, where does the
shell look to find the command 'clear'?
It looks in locations specified by the PATH variable. By
default that will be a minimal list defined by the login
program, but it might be significantly added to in the
/etc/profile or other shell init scripts.

The question you need to answer first is what happens if your
Python program tries to execute /clear/ rather than /cls/. If
that works, then your PATH variable is set correctly. If it
doesn't work, verify that there is in fact a program named
/clear/ that can be run from a shell command line. Then figure
out how to set an appropriate PATH variable for your Python
program.

Note that if /clear/ does work, but you want this script to use
/cls/ so that it is portable to some silly OS where a /cls/
exists... You can define a shell function (which will be
inherited by sub-shells) to look like this,

function cls () {
clear;
}

And place it where ever is appropriate (/etc/profile is one place).
i'm using os x.


I don't know anything about it... :-)

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) fl***@apaflo.com
Apr 12 '06 #9
Floyd L. Davidson wrote:
af******@gmail.com wrote:
If I may recommend an alternative,
print "\033[H\033[J"

Unfortunately, it is poor practice to hard code such sequences.
Instead the proper sequence should be obtained from the
appropriate database (TERMINFO or TERMCAP), and the easy way to
do that is,
tput clear


Or clear(1), as also mentioned earlier. Yes, definitely don't want to
hardcode the sequence. Definitely do use the appropriate terminal
capabilities database (terminfo or termcap) in the appropriate manner
(e.g. clear(1) or tput clear will handle that in the simple case of
shell accessible means to clear the screen).

Most UNIX(/LINUX/BSD/...) implementations support a large number of
terminal types. E.g. on my system, I check and find that there are
1470 unique terminal types (descriptions) supported - and that's not
including multiple aliases for the same terminal type/description (but
it does count distinct names/files which have differing
configurations, even if they are for the same terminal - such as
changing certain options or behavior of a terminal, or using the
terminal in distinct modes). Among those terminal types on my system,
I find 154 distinct means of clearing the screen. Just for
illustrative purposes, here are the top 10 I find, with count of how
many distinct types (descriptions) use that particular sequence:
236 clear=\E[H\E[J,
120 clear=^L,
120 clear=\E[H\E[2J,
64 clear=\EH\EJ,
61 clear=\E[2J,
42 clear=\E[H\E[J$<156>,
38 clear=^Z,
36 clear=\E[H\E[J$<50>,
31 clear=\E[H\E[J$<40>,
29 clear=\E[2J\E[H,
And of course, sending the wrong sequence (e.g. like trying some to
see what works) can be highly problematic - it can do very nasty
things to some terminals. E.g. I own one terminal, which among
sequences it supports, is one which effectively says interpret the
following hexadecimal character pairs as bytes, load them into RAM,
and execute them - a relatively sure-fire way to crash the terminal if
it is sent garbage (I used to run into that and other problems with
some BBS systems that would presume everyone must be running something
ANSI capable or that it was safe to do other tests such as see if
certain sequences would render a blue square on one's screen).

references:
"system" call/function, in various programming languages
clear(1)
tput(1)
terminfo(5)
termcap(5)
news:11*********************@i39g2000cwa.googlegro ups.com
news:11**********************@v46g2000cwv.googlegr oups.com

Apr 12 '06 #10
fl***@apaflo.com (Floyd L. Davidson) writes:
af******@gmail.com wrote:
If I may recommend an alternative,

print "\033[H\033[J"

the ansi sequence to clear the screen.


Or so you would hope (however, that is *not* what you have listed!).

Unfortunately, it is poor practice to hard code such sequences.
Instead the proper sequence should be obtained from the
appropriate database (TERMINFO or TERMCAP), and the easy way to
do that is,

tput clear


(Or "clear".)

On the other hand, I think it's been at least a decade since I've used
a terminal or emulator that's not VT100-compatible (i.e., accepts ANSI
control sequences).

Of course, I'll run into one the day after I start writing code that
depends on that assumption.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Apr 12 '06 #11
On 2006-04-12, Floyd L. Davidson wrote:
af******@gmail.com wrote:
If I may recommend an alternative,

print "\033[H\033[J"

the ansi sequence to clear the screen.
Or so you would hope (however, that is *not* what you have listed!).

Unfortunately, it is poor practice to hard code such sequences.


I was bitten by that shortly after I started shell scripting.
However, since all such code was isolated in functions, converting
to a new terminal type was simple -- and quick.

These days, the ISO-6429 standard (almost the same as the older
ANSI x3.64) is so close to universal that I don't bother writing
for anything else any more. If the need arises, I'll do it, but it
will be simple to do, and much faster (both in coding and script
execution) than trying to accommodate all terminals from the start.
Instead the proper sequence should be obtained from the
appropriate database (TERMINFO or TERMCAP), and the easy way to
do that is,

tput clear


I still have a system which does not have tput.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Apr 12 '06 #12
Keith Thompson <ks***@mib.org> wrote:
fl***@apaflo.com (Floyd L. Davidson) writes:
af******@gmail.com wrote:
If I may recommend an alternative,

print "\033[H\033[J"

the ansi sequence to clear the screen.
Or so you would hope (however, that is *not* what you have listed!).

Unfortunately, it is poor practice to hard code such sequences.
Instead the proper sequence should be obtained from the
appropriate database (TERMINFO or TERMCAP), and the easy way to
do that is,

tput clear


(Or "clear".)


But /clear/ merely uses "tput clear".
On the other hand, I think it's been at least a decade since I've used
a terminal or emulator that's not VT100-compatible (i.e., accepts ANSI
control sequences).

Of course, I'll run into one the day after I start writing code that
depends on that assumption.


However, if you check out the various TERMINFO database entries for an
assortment of "VT100-compatible" terminals, you *will* find variation!

Plus, if a user has customized a terminal database, for who knows what
reason...

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) fl***@apaflo.com
Apr 12 '06 #13
On 2006-04-12, Floyd L. Davidson wrote:
Keith Thompson <ks***@mib.org> wrote:
tput clear


(Or "clear".)


But /clear/ merely uses "tput clear".


Not on systems without tput.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Apr 12 '06 #14
jpd
Begin <j4************@xword.teksavvy.com>
On 2006-04-12, Chris F.A. Johnson <cf********@gmail.com> wrote:
These days, the ISO-6429 standard (almost the same as the older
ANSI x3.64) is so close to universal that I don't bother writing
for anything else any more.
Oh, wonderful. ``All the world's a vax^W^WISO-6429 compatible'' all over
again.

If the need arises, I'll do it, but it will be simple to do, and
much faster (both in coding and script execution) than trying to
accommodate all terminals from the start.
Yes, why use a perfectly good abstraction when you can hardcode stuff.

I still have a system which does not have tput.


And that justifies everything else. Of course.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law.
Apr 12 '06 #15
On 2006-04-12, jpd wrote:
Begin <j4************@xword.teksavvy.com>
On 2006-04-12, Chris F.A. Johnson <cf********@gmail.com> wrote:
These days, the ISO-6429 standard (almost the same as the older
ANSI x3.64) is so close to universal that I don't bother writing
for anything else any more.


Oh, wonderful. ``All the world's a vax^W^WISO-6429 compatible'' all over
again.
If the need arises, I'll do it, but it will be simple to do, and
much faster (both in coding and script execution) than trying to
accommodate all terminals from the start.


Yes, why use a perfectly good abstraction when you can hardcode stuff.


If it were perfectly good, there would be no question; however,
it's not.
I still have a system which does not have tput.


And that justifies everything else. Of course.


If I want to write portable scripts, then yes, it does.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Apr 12 '06 #16
"Chris F.A. Johnson" <cf********@gmail.com> wrote:
On 2006-04-12, Floyd L. Davidson wrote:
Keith Thompson <ks***@mib.org> wrote:
tput clear

(Or "clear".)


But /clear/ merely uses "tput clear".


Not on systems without tput.


Shoot that thing, and put it (and yourself) out of its misery.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) fl***@apaflo.com
Apr 12 '06 #17
On Wed, 12 Apr 2006 15:59:05 -0400, rumours say that "Chris F.A. Johnson"
<cf********@gmail.com> might have written:
I still have a system which does not have tput.


And that justifies everything else. Of course.


If I want to write portable scripts, then yes, it does.


Well, either port your system out of the window or port tput.c to your
system and then start writing "portable" scripts. tput is part of the POSIX
1003.1 standard, and guess what the 'P' stands for in POSIX.

If you insist, I will retort to using Terry Pratchett references.
--
TZOTZIOY, I speak England very best.
"Dear Paul,
please stop spamming us."
The Corinthians
Apr 12 '06 #18
On 2006-04-12, Christos Georgiou wrote:
On Wed, 12 Apr 2006 15:59:05 -0400, rumours say that "Chris F.A. Johnson"
<cf********@gmail.com> might have written:
I still have a system which does not have tput.

And that justifies everything else. Of course.
If I want to write portable scripts, then yes, it does.


Well, either port your system out of the window or port tput.c to your
system and then start writing "portable" scripts. tput is part of the POSIX
1003.1 standard, and guess what the 'P' stands for in POSIX.


It may be part of the POSIX standard, but there's nothing in the
POSIX definition of tput that provides for cursor positioning or
font attributes. The only defined operands are clear, init and
reset.

In fact, my scripts are portable to other terminal types by use
of files for each terminal, generated with tput. Using a
different terminal is as easy as ". /usr/share/term-sh/$TERM" or
something similar. I generated a lot of files a few years ago,
but I have never had any call for them, so I'd have to hunt for
them.
If you insist, I will retort to using Terry Pratchett references.


UNCLE!

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Apr 13 '06 #19
In article <go************@xword.teksavvy.com>,
"Chris F.A. Johnson" <cf********@gmail.com> wrote:
In fact, my scripts are portable to other terminal types by use
of files for each terminal, generated with tput. Using a
different terminal is as easy as ". /usr/share/term-sh/$TERM" or
something similar. I generated a lot of files a few years ago,
but I have never had any call for them, so I'd have to hunt for
them.


So you've essentially reinvented the whole termcap/terminfo mechanism?

--
Barry Margolin, ba****@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Apr 13 '06 #20
On 2006-04-13, Barry Margolin wrote:
In article <go************@xword.teksavvy.com>,
"Chris F.A. Johnson" <cf********@gmail.com> wrote:
In fact, my scripts are portable to other terminal types by use
of files for each terminal, generated with tput. Using a
different terminal is as easy as ". /usr/share/term-sh/$TERM" or
something similar. I generated a lot of files a few years ago,
but I have never had any call for them, so I'd have to hunt for
them.


So you've essentially reinvented the whole termcap/terminfo mechanism?


No, I've used the termcap/terminfo mechanism via tput to create a
more efficient (and customizable) method of terminal-dependent
control.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Apr 16 '06 #21
it would be nice if python provided a termcap or terminfo library,
wouldn't it?

May 3 '06 #22
af******@gmail.com wrote:
it would be nice if python provided a termcap or terminfo library,
wouldn't it?


Try "import curses".

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) fl***@apaflo.com
May 3 '06 #23

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ozarks | last post by:
I want to setup a database symbolic link within Windows XP to a network drive which has significanlty more space available and can't seem to get it working. Here is my setup.... - I am running...
0
by: Mark Everett | last post by:
Hi, I am runnign the latest version of mysql and I desperately need to move one of my tables from a database so that it is stored on another drive. I have read the symbolic links reference...
15
by: jacob navia | last post by:
Recently, we had a very heated thread about GC with the usual arguments (for, cons, etc) being exchanged. In one of those threads, we came into the realloc problem. What is the realloc...
4
by: TK | last post by:
Hi, I have to know whether a typical file (under Linux) a symbolic link is (in the sense of the stat()-Funktion). How can I check it excactly? Thanks for help. o-o THomas
0
by: humbleaptience | last post by:
Hey Ya'll, I basically have a bunch of unix servers with a dataset scrambled through about 10 of them. On unix, I maintain a symbolic link file tree so that for each server it appears to have...
0
by: xhunga | last post by:
* Symbolic computation with the language c : The Derivative step by step. (Windows,Linux) You can find some examples into the file a_exampl.txt @ @
1
by: Remote_User | last post by:
Hi All, .NET 1.1 doesn't support creating symbolic links to files, like in Linux? Can i use C# to make a file point to another file? Thanks.
1
by: amygrant1701 | last post by:
Hi, I've done this before so I don't see what I could doing wrong here. I'm running mysql 5x on freebsd. I'm using the default data directory of "/var/db/mysql" In there I have several dozen...
2
by: Desmodromic | last post by:
Informix recommend that symbolic links be used for chunks. These links are then used in the dbspace definition. Does this advice hold for DB2? The equivalent would be to create symbolic links...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.