2005年12月13日 星期二 07:49
刘鑫,您好!
简单实用,谢谢。
我还以为是不是有个专门的方法呢。
cry
在 2005-12-13 00:51:00 您写道:
>>>> s = 'C:\PATH1\ABC.TXT'
>>>> ns = s.replace('\\', '/')
>>>> ns
>'C:/PATH1/ABC.TXT'
>>>>
>
>在05-12-13,cry <zyqmail at tom.com> 写道:
>>
>> python,您好!
>>
>> PYTHON中如何做呢?比如,把:
>> "C:\PATH1\ABC.TXT"
>> 变成:
>> "C:/PATH1/ABC.TXT"
>>
>> 谢谢
>>
>> cry
>>
>>
>> 致
>> 礼!
>>
>> cry
>> zyqmail at tom.com
>>
>>
>> _______________________________________________
>> python-chinese
>> Post: send python-chinese at lists.python.cn
>> Subscribe: send subscribe to python-chinese-request at lists.python.cn
>> Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
>> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>>
>
>
>
>--
>欢迎访问:
>http://blog.csdn.net/ccat
>
>刘鑫
>March.Liu
>_______________________________________________
>python-chinese
>Post: send python-chinese at lists.python.cn
>Subscribe: send subscribe to python-chinese-request at lists.python.cn
>Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
>Detail Info: http://python.cn/mailman/listinfo/python-chinese
致
礼!
cry
zyqmail at tom.com
2005年12月13日 星期二 10:08
db = cx_Oracle.connect(" ","user","pw")
其中第一个参数,是什么, 我试了 oracle 的本地服务名称, 不行?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051213/33990147/attachment-0001.html
2005年12月13日 星期二 10:15
在 05-12-13,zhang sw.zhangxy<swzhangxy at gmail.com> 写道: > db = cx_Oracle.connect(" ","user","pw") > 其中第一个参数,是什么, 我试了 oracle 的本地服务名称, 不行? > 这个问题与原来的邮件无关呀。建议你重新开一个主题讨论。 -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit
2005年12月24日 星期六 20:40
在 2005年12月13日 星期二 07:49,cry 写道:
根据你的意思,应该是为了对不同os适用。
其实这个有专门的,
一开始就使用 os.sep 或者使用os.path.join,可以让你根本不必要去考虑替换“\”和“/”
> 刘鑫,您好!
>
> 简单实用,谢谢。
> 我还以为是不是有个专门的方法呢。
>
> cry
>
> 在 2005-12-13 00:51:00 您写道:
>
> >>>> s = 'C:\PATH1\ABC.TXT'
> >>>> ns = s.replace('\\', '/')
> >>>> ns
> >
> >'C:/PATH1/ABC.TXT'
> >
> >
> >在05-12-13,cry <zyqmail at tom.com> 写道:
> >
> >> python,您好!
> >>
> >> PYTHON中如何做呢?比如,把:
> >> "C:\PATH1\ABC.TXT"
> >> 变成:
> >> "C:/PATH1/ABC.TXT"
> >>
> >> 谢谢
> >>
> >> cry
> >>
> >>
> >> 致
> >> 礼!
> >>
> >> cry
> >> zyqmail at tom.com
> >>
> >>
> >> _______________________________________________
> >> python-chinese
> >> Post: send python-chinese at lists.python.cn
> >> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> >> Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
> >> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
> >--
> >欢迎访问:
> >http://blog.csdn.net/ccat
> >
> >刘鑫
> >March.Liu
> >_______________________________________________
> >python-chinese
> >Post: send python-chinese at lists.python.cn
> >Subscribe: send subscribe to python-chinese-request at lists.python.cn
> >Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
> >Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
> 致
> 礼!
>
> cry
> zyqmail at tom.com
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
Zeuux © 2025
京ICP备05028076号