"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 12 May 2005 15:34:39 -, Grant Edwards <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>> I think the use of forward slashes for command line switches
>> was adopted by CP/M from DE
On 2005-05-13, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 12 May 2005 15:34:39 -, Grant Edwards <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> I think the use of forward slashes for command line switches
>> was adopted by CP/M from DEC's OSes (e.g. RSX-11).
Fredrik Lundh said unto the world upon 2005-05-12 13:52:
> Brian van den Broek wrote:
>
>
>>>I'm trying to lauch Notepad from Python to open a textfile:
>>>
>>>import os
>>>b1="c:\test.txt"
>>>os.system('notepad.exe ' + b1)
>>>
>>>However, the t of test is escaped by the \, resulting in Notepad t
George wrote:
> Newbie question:
>
> I'm trying to lauch Notepad from Python to open a textfile:
>
> import os
> b1="c:\test.txt"
> os.system('notepad.exe ' + b1)
>
> However, the t of test is escaped by the \, resulting in Notepad trying
> to open "c: est.txt".
>
> How do I solve this?
>
> (
On Thu, 12 May 2005 16:30:36 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On Thu, 12 May 2005 15:14:09 GMT, [EMAIL PROTECTED] (Bengt Richter) declaimed
>the following in comp.lang.python:
>
>
>>
>> I don't know why MS used backslashes when unix had a perfectly good path
>> syntax
>> (not t
Brian van den Broek wrote:
> > I'm trying to lauch Notepad from Python to open a textfile:
> >
> > import os
> > b1="c:\test.txt"
> > os.system('notepad.exe ' + b1)
> >
> > However, the t of test is escaped by the \, resulting in Notepad trying
> > to open "c: est.txt".
> >
> > How do I solve this
On 2005-05-12, Bengt Richter <[EMAIL PROTECTED]> wrote:
>>> There are several ways, but the preferred solution is to switch the
>>> slash direction: "c:/test.txt". Python's smart enough to notice its
>>> running on Windows and do the right thing with the slash.
>>
>>Does Python really look at th
Bengt Richter wrote:
> On Thu, 12 May 2005 15:41:14 +0200, George <[EMAIL PROTECTED]> wrote:
>>(By the way, b1 comes from a command line parameter, so the user enters
>>c:\test.txt as command line parameter.)
>
> It should be ok then, unless you have somehow processed the command line
> paramet
On Thu, 12 May 2005 14:20:29 -, Grant Edwards <[EMAIL PROTECTED]> wrote:
>On 2005-05-12, Brian van den Broek <[EMAIL PROTECTED]> wrote:
>
>>> b1="c:\test.txt"
>>> os.system('notepad.exe ' + b1)
>>>
>>> However, the t of test is escaped by the \, resulting in Notepad trying
>>> to open "c: es
Grant Edwards wrote:
> On 2005-05-12, Brian van den Broek <[EMAIL PROTECTED]> wrote:
> Does Python really look at the string and mess with the slash?
> I don't think it needs to, since the Windows system calls have
> always accepted forward slashses, haven't they?
It did, but now not anymore.
Richie Hindle wrote:
>>By the way, b1 comes from a command line parameter, so the user enters
>>c:\test.txt as command line parameter.
>
>
> How are you prompting the user? When I run this:
>
> import os
> b1=raw_input("Enter a filename: ")
> os.system('notepad.exe ' + b1)
>
> and enter c:\te
On Thu, 12 May 2005 15:41:14 +0200, George <[EMAIL PROTECTED]> wrote:
>Newbie question:
>
>I'm trying to lauch Notepad from Python to open a textfile:
>
>import os
>b1="c:\test.txt"
>os.system('notepad.exe ' + b1)
>
>However, the t of test is escaped by the \, resulting in Notepad trying
>to ope
On 2005-05-12, Brian van den Broek <[EMAIL PROTECTED]> wrote:
>> b1="c:\test.txt"
>> os.system('notepad.exe ' + b1)
>>
>> However, the t of test is escaped by the \, resulting in Notepad trying
>> to open "c: est.txt".
> There are several ways, but the preferred solution is to switch the
> sla
[George]
> b1="c:\test.txt"
With this code, your problem is the embedded tab as you say. Use either
r"c:\test.txt" or "c:\\test.txt". However, if this is true:
> By the way, b1 comes from a command line parameter, so the user enters
> c:\test.txt as command line parameter.
then there will be
George said unto the world upon 2005-05-12 09:41:
> Newbie question:
>
> I'm trying to lauch Notepad from Python to open a textfile:
>
> import os
> b1="c:\test.txt"
> os.system('notepad.exe ' + b1)
>
> However, the t of test is escaped by the \, resulting in Notepad trying
> to open "c: est.tx
try b1="c:/test.txt"
It seems to work for me on Windows 2000.
-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
n.org]On Behalf Of George
Sent: Thursday, May 12, 2005 9:41 AM
To: python-list@python.org
Subject: Launch file in Notepad
Newbie question:
I'm trying to l
16 matches
Mail list logo