473,761 Members | 10,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
22 4239
On 2006-04-13, Barry Margolin wrote:
In article <go************ @xword.teksavvy .com>,
"Chris F.A. Johnson" <cf********@gma il.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.co m
May 3 '06 #23

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

Similar topics

3
3792
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 MySQL 4.1.7 - I have tried this with both the 'mysqld-max' and 'mysqld-max-nt' servers - Per the MySQL manual (section 7.6.1.3) I setup a 'foo.sym' file in
0
1292
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 but it seems to me that I can relocate a database but not a table. Which is not useful to me at all. I have tried anyhow without any success.
15
2453
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 problem? Well, it begins with a successfull realloc: char *q = realloc(p,2*n); // for n size_t, a simple
4
3375
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
1386
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 access to all the files through auto mounting and so forth. I want to be able to access this same file tree from my asp.net web app and NFS - however, it's not working and I've tried everything. Microsoft Services for Unix just doesn't cut it...
0
1577
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
3491
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
8360
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 mysql datasbases that are functioning perfectly. I am trying to add a database which will be stored on a different drive, therefore the entry in "/var/db/mysql" should be a symbolic link
2
2868
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 for containers and use the link name when defining tablespaces. Wouldn't this allow containers to be physically moved/ renamed without having to use db2relocatedb? I haven't tested this but couldn't you just remove the link, move the container,...
0
9521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10107
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.