Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8279
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mail@timgolden.me.uk> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python:': 0.05; 'python?': 0.05; 'subject:Python': 0.06; 'python': 0.08; '>>>>': 0.09; 'command-line': 0.09; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'subject:2.7': 0.09; 'subject:files': 0.09; 'wrote:': 0.15; '(sorry': 0.16; 'bits:': 0.16; 'claveau': 0.16; 'executables': 0.16; 'python.exe': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'shell=true)': 0.16; 'cc:addr:python-list': 0.16; 'subject:lost': 0.19; 'subject:Windows': 0.19; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'right,': 0.28; 'import': 0.29; 'anyway.': 0.29; 'problem': 0.29; 'cc:addr:python.org': 0.30; 'commands,': 0.30; 'tjg': 0.30; 'does': 0.33; 'header:User- Agent:1': 0.34; 'certain': 0.36; 'options': 0.36; 'file': 0.36; 'skip:" 10': 0.36; 'but': 0.37; 'received:192': 0.38; 'subject:: ': 0.38; 'two': 0.38; 'run': 0.39; 'got': 0.39; 'hope': 0.60; 'from:addr:mail': 0.64; 'therefore,': 0.66; 'subject: (': 0.84; '==>': 0.91; 'or:': 0.91; 'to:none': 0.93 |
| Date | Thu, 23 Jun 2011 08:31:26 +0100 |
| From | Tim Golden <mail@timgolden.me.uk> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 |
| MIME-Version | 1.0 |
| CC | python-list@python.org |
| Subject | Re: Python 2.7 and cmd on Windows 7 64 (files lost) |
| References | <4e02de32$0$30749$ba4acef3@reader.news.orange.fr> |
| In-Reply-To | <4e02de32$0$30749$ba4acef3@reader.news.orange.fr> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.317.1308814289.1164.python-list@python.org> (permalink) |
| Lines | 40 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1308814290 news.xs4all.nl 14140 [::ffff:82.94.164.166]:60515 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:8279 |
Show key headers only | View raw
On 23/06/2011 07:33, Michel Claveau - MVP wrote:
> Hi!
>
> (sorry for my bad english...)
>
> On Win 7 64 bits:
> Command-Line
> CD \Python27
> dir C:\Windows\System32\SoundRecorder.exe :==> OK
> Python.exe
>
>>>> import os
>>>> os.system("dir C:\\Windows\\System32\\SoundRecorder.exe")
>
> ==> Do not found the file !!!
>
> and os.system("cmd /k") then "dir C:\Windows\System32\SoundRecorder.exe" do not found
> anyway.
>
> But:
> {Ctrl-Z} in Python
> then dir C:\Windows\System32\SoundRecorder.exe run OK
>
> Therefore, is the problem only in Python?
Certain commands, including "dir" and "copy" are not executables
in their own right, but merely subcommands of cmd.exe. You've
got two options in Python:
os.system (r"cmd /c dir c:\windows")
or:
subprocess.call (["dir", "c:\\windows"], shell=True)
which basically does it for you behind the scenes.
I hope that helps..
TJG
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python 2.7 and cmd on Windows 7 64 (files lost) "Michel Claveau - MVP"<enleverLesX_XXmcX@XmclavXeauX.com.invalid> - 2011-06-23 08:33 +0200
Re: Python 2.7 and cmd on Windows 7 64 (files lost) Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-06-23 09:31 +0200
Re: Python 2.7 and cmd on Windows 7 64 (files lost) "Michel Claveau - MVP"<enleverLesX_XXmcX@XmclavXeauX.com.invalid> - 2011-06-23 11:10 +0200
Re: Python 2.7 and cmd on Windows 7 64 (files lost) "Martin v. Loewis" <martin@v.loewis.de> - 2011-06-24 09:34 +0200
Re: Python 2.7 and cmd on Windows 7 64 (files lost) Tim Golden <mail@timgolden.me.uk> - 2011-06-23 08:31 +0100
Re: Python 2.7 and cmd on Windows 7 64 (files lost) Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-06-23 10:08 +0200
Re: Python 2.7 and cmd on Windows 7 64 (files lost) Tim Golden <mail@timgolden.me.uk> - 2011-06-23 09:14 +0100
csiph-web