--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com。
要查看更多选项,请访问 https://groups.google.com/d/optout。
Python不是应该用os.env来设定产量吗
发自WPS邮件客戶端
在 liyaoshi <liya...@gmail.com>,2015年3月23日 下午2:18写道:求跟着混
在 2015年3月23日 下午1:36,Zoom.Quiet <zoom....@gmail.com>写道:
混这个字用的好哪!
俺也是从 PHP 圈子混进来的.
在 2015年3月23日 下午12:44,Shell Xu <shell...@gmail.com> 写道:
>> 我也做个记录
>>
>> 干活的时候遇到这么个需求:需要在启动python脚本的时候做一些环境变量(LD_LIBRARY_PATH等)的设置,由于python不像
>> guile等支持 #! .... !# 这样的注释,所以没法像guile一样优雅地写
>> #!/bin/bash
>> do_some_settings
>> guile $0 $*
>> !#
>> (blah blah)
>>
>> 但是,在python的时候,可以这么写:
>> #!/bin/bash
>> """"/bin/true
>> export LD_LIBRARY_PATH=blah:blah
>> do_some_thing
>> python $0 $*
>> B=" """
>> do_python_thing
>>
>> 然后给脚本chmod +x 就可以了。
>>