473,468 Members | 1,294 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Displaying os commands

Hi all,

When I do (on Windows):

os.system('dir')

The command 'dir' is well executed but the command itself 'c:\dir' is not
displayed.
How to display the launched command ?

Thanks,
Sebastien
Jul 18 '05 #1
1 1275
Try:

import os
cmd=r"dir"
cwd=os.getcwd()
print "%s>%s" % (cwd, cmd)
os.system(cmd)

Larry Bates,
Syscon, Inc.
"Perochon Sebastien" <Se****************@mmarelli-se.com> wrote in message
news:ma*************************************@pytho n.org...
Hi all,

When I do (on Windows):

os.system('dir')

The command 'dir' is well executed but the command itself 'c:\dir' is not
displayed.
How to display the launched command ?

Thanks,
Sebastien

Jul 18 '05 #2

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

Similar topics

2
by: John Alleyman | last post by:
Hi there, Is there a simple way to prevent error messages (falsely connecting to database etc.) being diplayed? My own build in messages are enough... thanks, Chris
2
by: Christian Wilcox | last post by:
I'm trying to programmatically access information from a telnet session which is normally accessed with a telnet program capable of terminal emulation (currently set at VT320). The initial login...
0
by: Stan | last post by:
In the old days of VB6, an Excel chart image could be pasted into a picture box with Clipboard using the following commands. xlApp.ActiveChart.ChartArea.Copy Picture1.Picture =...
33
by: LRW | last post by:
http://gto.ie-studios.net/index.php When you view the above site in IE, if the 1st of the three product images is tall enough to push the cell down a couple of pixels, IE somehow doesn't show...
3
by: Grant Rutherford | last post by:
Hello, I need to get a float8 to display as a number db=# SELECT CAST('0.00001' AS float8); float8 -------- 1e-05 (1 row)
9
by: Susan Bricker | last post by:
Greetings. I am having trouble populating text data that represents data in my table. Here's the setup: There is a People Table (name, address, phone, ...) peopleID = autonumber key There...
2
by: Jay Douglas | last post by:
I'm creating a web control library and I would like to have a Font property that expands out the different font elements (i.e. Color, Size, Bold, etc) in the property window. I have no idea on...
1
by: cj | last post by:
I'm using the commandbuilder to generate insert commands for some tables for me. I provided it the select command "select * from mytable". I've used this on several tables and it was building the...
15
by: Jameson | last post by:
Happy New Year, Everyone! I am trying to figure out how to display a bunch of images (mainly JPEGs, but possibly a few GIFs and PNGs as well) that are stored in a local directory on the system....
2
by: neeZy | last post by:
Hey Guys, I have a make-table query in which I'm tryin to display a table that shows results past a certain date (12/31/2006). The date column is in proper Date/Time format - Short Date format to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.