Dear all,
Can u tell me a python program that when executed in a shell
prompt,opens another shell prompt.
Simply i want to open a shell prompt from a python program.
Thanks 9 7973
gaurav kashyap wrote:
Dear all,
Can u tell me a python program that when executed in a shell
prompt,opens another shell prompt.
Simply i want to open a shell prompt from a python program.
I think you're looking for:
import os
os.system("/bin/sh")
On Oct 30, 2:59*pm, Lars Stavholm <st...@telcotec.sewrote:
gaurav kashyap wrote:
Dear all,
Can u tell me a python program that when executed in a shell
prompt,opens another shell prompt.
Simply i want to open a shell prompt from a python program.
I think you're looking for:
import os
os.system("/bin/sh")
Dear,
Its not opening a new window,
I want to do that only from already opened shell prompt window
gaurav kashyap wrote:
On Oct 30, 2:59Â*pm, Lars Stavholm <st...@telcotec.sewrote:
>gaurav kashyap wrote:
Dear all,
Can u tell me a python program that when executed in a shell
prompt,opens another shell prompt.
Simply i want to open a shell prompt from a python program.
I think you're looking for:
import os os.system("/bin/sh")
Dear,
Its not opening a new window,
I want to do that only from already opened shell prompt window
Then you need to open a terminal, like xterm or konsole. Use
os.system("/usr/bin/konsole")
Diez
HI,
I am getting the following error:
konsole: cannot connect to X server
do i need to install the related files.
On Oct 30, 11:53*am, gaurav kashyap <gauravkec2...@gmail.comwrote:
HI,
I am getting the following error:
konsole: cannot connect to X server
do i need to install the related files.
Do you have an x-server running? I assume so, because you have a
terminal window opened.
If you became root using su, you need to allow connections to x-
server, which is started by the regular user. you can do this for
local access using
$ xhost local:
Best wishes! Bernhard
On Thu, Oct 30, 2008 at 03:53:52AM -0700, gaurav kashyap wrote:
HI,
I am getting the following error:
konsole: cannot connect to X server
do i need to install the related files.
Maybe, but given that error message, probably not.
You would do yourself a great favor by providing a lot more detail
about what you are trying to do... On a Unix/Linux system, unlike
Windows, there is no one single "shell prompt window" -- there are
lots of them. They all need the X Window System (a suite of software
which provides a GUI interface to Unix systems -- it's not "built in"
like it is in Windows). X works as a client-server model, and you
need to make sure X authentication is handled properly. Depending on
what you are doing, this can be either very easy, or very complicated.
--
Derek D. Martin http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFJCc+XdjdlQoHP510RAibkAJsHwF1yPBZzBH0yLtJJHj iZaQV0lQCdGMwm
o/DdLJ2/V8du5OC9Y3z6jdg=
=qYUJ
-----END PGP SIGNATURE-----
On 2008-10-30, Derek Martin <co**@pizzashack.orgwrote:
On Thu, Oct 30, 2008 at 03:53:52AM -0700, gaurav kashyap wrote:
>HI, I am getting the following error:
konsole: cannot connect to X server
do i need to install the related files.
Maybe, but given that error message, probably not.
You would do yourself a great favor by providing a lot more detail
about what you are trying to do... On a Unix/Linux system, unlike
Windows, there is no one single "shell prompt window" -- there are
lots of them.
There are both lots of "shell prompt windows" (which, I assume
means terminal emulators), and lots of shells and other
programs you can run in such a window.
They all need the X Window System (a suite of software which
provides a GUI interface to Unix systems -- it's not "built
in" like it is in Windows). X works as a client-server model,
and you need to make sure X authentication is handled
properly. Depending on what you are doing, this can be either
very easy, or very complicated.
--
Grant Edwards grante Yow! This PORCUPINE knows
at his ZIPCODE ... And he has
visi.com "VISA"!!
On Thu, Oct 30, 2008 at 02:47:48AM -0700, gaurav kashyap wrote:
Simply i want to open a shell prompt from a python program.
If this is literally true, then you just need to figure out what
command will open a terminal window from the shell prompt. Once you
figure that out, it's as simple as:
cmd = "whatever your shell command is"
os.system(cmd)
--
Derek D. Martin http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFJCjl0djdlQoHP510RAgVPAJ9lk6Xg4WA8FiWYFk9xdl 9Edb+U0gCgkkiL
owSZZPOKeMJMv1WAlWyWwQM=
=20X0
-----END PGP SIGNATURE-----
In message
<8a**********************************@c2g2000pra.g ooglegroups.com>, gaurav
kashyap wrote:
konsole: cannot connect to X server
Could be it's not being passed the right DISPLAY setting. Is this under the
same username, so it's automatically using the right xauth settings? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Shalen chhabra |
last post by:
Hey,
Can anyone give me a snippet for running a python program over all the files
in the directory.
For ex: I have ten files in a directory and I want to run a python program
against all of...
|
by: Sandman |
last post by:
Hi,
I'm a newbie, so please be gentle :-)
How would I run a shell command in Python?
Here is what I want to do:
I want to run a shell command that outputs some stuff, save it into a
list and...
|
by: vagrantbrad |
last post by:
I'm using python 2.4 running on Fedora Core 4. I have written a python
program called ipscan.py that checks the external ip address of my
cable internet connection, and on change, will update the...
|
by: A.M |
last post by:
Hi,
I am having difficulty with shell scripting in Python.
I use the following command to run a DOS command and put the return value in
a Python variable:
|
by: damacy |
last post by:
hi, there. i have this question which might sound quite stupid to some
people, but here we go anyway.
i have written a python program which interacts with a postgresql
database. what it does is...
|
by: jmDesktop |
last post by:
Hi, I'm trying to learn Python. I using Aquamac an emac
implementation with mac os x. I have a program. If I go to the
command prompt and type pythong myprog.py, it works. Can the program
be...
|
by: gaurav kashyap |
last post by:
Dear all.
On windows platform python 2.4,i can use os.startfile("filename") to
execute a file on a new command prompt
but on unix platform and python 2.3 what is the alternate for
executing a...
|
by: Scott |
last post by:
I have a requirement to control a firefox web browser from an external
python program. The python program running under linux from a command
shell needs to first find all open firefox web browser...
|
by: bruce |
last post by:
hi mike....
you might look at/into selenium, or firewatir....
check the spellings!
-peace
-----Original Message-----
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |