Python论坛  - 讨论区

标题:[python-chinese] 新手询问shell命令行换行问题

2006年04月16日 星期日 01:32

alcides yolan xyolan at gmail.com
Sun Apr 16 01:32:18 HKT 2006

在命令行条件下,我需要换行但是不执行这个语句应该怎么做?比如写一个函数不止一行。
如下
>>> a=2
>>> def test(b):
...     test=a+b
...     return test
>>>print test(10)

中间... test=a+b这个换行怎么做到的??应该按什么键
新手请指导

请不要告诉我使用ide环境或者编辑器,我只是想知道命令行下如何做而已.
谢谢!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060416/e4457a4f/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年04月16日 星期日 07:22

shhgs shhgs.efhilt at gmail.com
Sun Apr 16 07:22:58 HKT 2006

回车



On 4/15/06, alcides yolan <xyolan at gmail.com> wrote:
>
> 在命令行条件下,我需要换行但是不执行这个语句应该怎么做?比如写一个函数不止一行。
> 如下
> >>> a=2
> >>> def test(b):
> ...     test=a+b
> ...     return test
> >>>print test(10)
>
> 中间... test=a+b这个换行怎么做到的??应该按什么键
> 新手请指导
>
> 请不要告诉我使用ide环境或者编辑器,我只是想知道命令行下如何做而已.
> 谢谢!
>
> _______________________________________________
> 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
>
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年04月16日 星期日 07:41

0.706 im0.706 at gmail.com
Sun Apr 16 07:41:22 HKT 2006

至少试一下再问啊.

在06-4-16,shhgs <shhgs.efhilt at gmail.com> 写道:
>
> 回车
>
>
>
> On 4/15/06, alcides yolan <xyolan at gmail.com> wrote:
> >
> > 在命令行条件下,我需要换行但是不执行这个语句应该怎么做?比如写一个函数不止一行。
> > 如下
> > >>> a=2
> > >>> def test(b):
> > ...     test=a+b
> > ...     return test
> > >>>print test(10)
> >
> > 中间... test=a+b这个换行怎么做到的??应该按什么键
> > 新手请指导
> >
> > 请不要告诉我使用ide环境或者编辑器,我只是想知道命令行下如何做而已.
> > 谢谢!
> >
> > _______________________________________________
> > 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
> >
> >
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060416/e65bad56/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年04月16日 星期日 09:43

alcides yolan xyolan at gmail.com
Sun Apr 16 09:43:06 HKT 2006

你说的是第一行... test的确是回车就可以了,下一行按回车就不会再显示那3个点了。
谢谢如何继续下一行还是不执行,直到编写完整个函数块呢?


On 4/16/06, 0. 706 <im0.706 at gmail.com> wrote:
>
> 至少试一下再问啊.
>
> 在06-4-16,shhgs <shhgs.efhilt at gmail.com> 写道:
>
> > 回车
> >
> >
> >
> > On 4/15/06, alcides yolan <xyolan at gmail.com> wrote:
> > >
> > > 在命令行条件下,我需要换行但是不执行这个语句应该怎么做?比如写一个函数不止一行。
> > > 如下
> > > >>> a=2
> > > >>> def test(b):
> > > ...     test=a+b
> > > ...     return test
> > > >>>print test(10)
> > >
> > > 中间... test=a+b这个换行怎么做到的??应该按什么键
> > > 新手请指导
> > >
> > > 请不要告诉我使用ide环境或者编辑器,我只是想知道命令行下如何做而已.
> > > 谢谢!
> > >
> > > _______________________________________________
> > > 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
> > >
> > >
> >
> > _______________________________________________
> > 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
> >
> >
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060416/546dcacb/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年04月16日 星期日 09:55

shhgs shhgs.efhilt at gmail.com
Sun Apr 16 09:55:33 HKT 2006

tab

On 4/15/06, alcides yolan <xyolan at gmail.com> wrote:
>
> 你说的是第一行... test的确是回车就可以了,下一行按回车就不会再显示那3个点了。
> 谢谢如何继续下一行还是不执行,直到编写完整个函数块呢?
>
>
>
> On 4/16/06, 0. 706 <im0.706 at gmail.com> wrote:
> >
> > 至少试一下再问啊.
> >
> >
> > 在06-4-16,shhgs <shhgs.efhilt at gmail.com> 写道:
> >
> > > 回车
> > >
> > >
> > >
> > > On 4/15/06, alcides yolan < xyolan at gmail.com> wrote:
> > > >
> > > > 在命令行条件下,我需要换行但是不执行这个语句应该怎么做?比如写一个函数不止一行。
> > > > 如下
> > > > >>> a=2
> > > > >>> def test(b):
> > > > ...     test=a+b
> > > > ...     return test
> > > > >>>print test(10)
> > > >
> > > > 中间... test=a+b这个换行怎么做到的??应该按什么键
> > > > 新手请指导
> > > >
> > > > 请不要告诉我使用ide环境或者编辑器,我只是想知道命令行下如何做而已.
> > > > 谢谢!
> > > >
> > > > _______________________________________________
> > > > 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
> > > >
> > > >
> > >
> > > _______________________________________________
> > > 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
> > >
> > >
> >
> >
> >
> > _______________________________________________
> > 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
> >
> >
>
>
> _______________________________________________
> 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
>
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年04月16日 星期日 10:12

0.706 im0.706 at gmail.com
Sun Apr 16 10:12:24 HKT 2006

当你定义一个函数,先按回车,然后用tab或空格缩近,写完这一行后,再按回车,然后缩近......

在06-4-16,shhgs <shhgs.efhilt at gmail.com> 写道:
>
> tab
>
> On 4/15/06, alcides yolan <xyolan at gmail.com> wrote:
> >
> > 你说的是第一行... test的确是回车就可以了,下一行按回车就不会再显示那3个点了。
> > 谢谢如何继续下一行还是不执行,直到编写完整个函数块呢?
> >
> >
> >
> > On 4/16/06, 0. 706 <im0.706 at gmail.com> wrote:
> > >
> > > 至少试一下再问啊.
> > >
> > >
> > > 在06-4-16,shhgs <shhgs.efhilt at gmail.com> 写道:
> > >
> > > > 回车
> > > >
> > > >
> > > >
> > > > On 4/15/06, alcides yolan < xyolan at gmail.com> wrote:
> > > > >
> > > > > 在命令行条件下,我需要换行但是不执行这个语句应该怎么做?比如写一个函数不止一行。
> > > > > 如下
> > > > > >>> a=2
> > > > > >>> def test(b):
> > > > > ...     test=a+b
> > > > > ...     return test
> > > > > >>>print test(10)
> > > > >
> > > > > 中间... test=a+b这个换行怎么做到的??应该按什么键
> > > > > 新手请指导
> > > > >
> > > > > 请不要告诉我使用ide环境或者编辑器,我只是想知道命令行下如何做而已.
> > > > > 谢谢!
> > > > >
> > > > > _______________________________________________
> > > > > 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
> > > > >
> > > > >
> > > >
> > > > _______________________________________________
> > > > 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
> > > >
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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
> > >
> > >
> >
> >
> > _______________________________________________
> > 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
> >
> >
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060416/97c7dfc5/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年04月17日 星期一 00:59

alcides yolan xyolan at gmail.com
Mon Apr 17 00:59:05 HKT 2006

非常感谢,对于我提问缺少智慧表示道歉:)大家包涵

On 4/16/06, 0. 706 <im0.706 at gmail.com> wrote:
>
> 当你定义一个函数,先按回车,然后用tab或空格缩近,写完这一行后,再按回车,然后缩近......
>
>
> 在06-4-16,shhgs <shhgs.efhilt at gmail.com> 写道:
> >
> > tab
> >
> > On 4/15/06, alcides yolan <xyolan at gmail.com> wrote:
> > >
> > > 你说的是第一行... test的确是回车就可以了,下一行按回车就不会再显示那3个点了。
> > > 谢谢如何继续下一行还是不执行,直到编写完整个函数块呢?
> > >
> > >
> > >
> > > On 4/16/06, 0. 706 <im0.706 at gmail.com> wrote:
> > > >
> > > > 至少试一下再问啊.
> > > >
> > > >
> > > > 在06-4-16,shhgs <shhgs.efhilt at gmail.com> 写道:
> > > >
> > > > > 回车
> > > > >
> > > > >
> > > > >
> > > > > On 4/15/06, alcides yolan < xyolan at gmail.com> wrote:
> > > > > >
> > > > > > 在命令行条件下,我需要换行但是不执行这个语句应该怎么做?比如写一个函数不止一行。
> > > > > > 如下
> > > > > > >>> a=2
> > > > > > >>> def test(b):
> > > > > > ...     test=a+b
> > > > > > ...     return test
> > > > > > >>>print test(10)
> > > > > >
> > > > > > 中间... test=a+b这个换行怎么做到的??应该按什么键
> > > > > > 新手请指导
> > > > > >
> > > > > > 请不要告诉我使用ide环境或者编辑器,我只是想知道命令行下如何做而已.
> > > > > > 谢谢!
> > > > > >
> > > > > > _______________________________________________
> > > > > > 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
> > > > > >
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > 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
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > 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
> > > >
> > > >
> > >
> > >
> > > _______________________________________________
> > > 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
> > >
> > >
> >
> > _______________________________________________
> > 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
> >
> >
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060417/f3981198/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年04月17日 星期一 16:17

FireBird ygonic at gmail.com
Mon Apr 17 16:17:13 HKT 2006

在任何情况下都可以在行末尾加 \
或者有()匹配的时候也可以不加 \

python的语法解析过于智能化了,^-^

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号