[Tutor] how to express shift+enter in python

2014-09-28 Thread lei yang
Hi expert,

How to express shift+enter in python ?

Thanks
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] how to express shift+enter in python

2014-09-28 Thread Chris “Kwpolska” Warrick
On Sun, Sep 28, 2014 at 4:53 PM, lei yang  wrote:
> Hi expert,
>
> How to express shift+enter in python ?
>
> Thanks

What do you want to express, exactly?  This key combination can have
multiple meanings and ways to achieve it, depending on your needs.  Do
you want to send the key combination to an app?  What is it, exactly,
that you want to do?  What app uses Shift+Enter in the way you want to
use it?

-- 
Chris “Kwpolska” Warrick 
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] how to express shift+enter in python

2014-09-28 Thread lei yang
Hi Chris,

I just use "xlwt" lib to newline in one cell, I find it display with one
line in windows but works in linux, so I guess it maybe"shift+enter" to
newline

Lei


On Sun, Sep 28, 2014 at 11:04 PM, Chris “Kwpolska” Warrick <
kwpol...@gmail.com> wrote:

> On Sun, Sep 28, 2014 at 4:53 PM, lei yang  wrote:
> > Hi expert,
> >
> > How to express shift+enter in python ?
> >
> > Thanks
>
> What do you want to express, exactly?  This key combination can have
> multiple meanings and ways to achieve it, depending on your needs.  Do
> you want to send the key combination to an app?  What is it, exactly,
> that you want to do?  What app uses Shift+Enter in the way you want to
> use it?
>
> --
> Chris “Kwpolska” Warrick 
> PGP: 5EAAEA16
> stop html mail | always bottom-post | only UTF-8 makes sense
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] how to express shift+enter in python

2014-09-28 Thread Steven D'Aprano
On Sun, Sep 28, 2014 at 11:11:26PM +0800, lei yang wrote:
> Hi Chris,
> 
> I just use "xlwt" lib to newline in one cell, I find it display with one
> line in windows but works in linux, so I guess it maybe"shift+enter" to
> newline

I am afraid I have no idea what you are talking about. Can you show some 
code, and the expected result?

Regards,

Steve

> Lei
> 
> 
> On Sun, Sep 28, 2014 at 11:04 PM, Chris “Kwpolska” Warrick <
> kwpol...@gmail.com> wrote:
> 
> > On Sun, Sep 28, 2014 at 4:53 PM, lei yang  wrote:
> > > Hi expert,
> > >
> > > How to express shift+enter in python ?
> > >
> > > Thanks
> >
> > What do you want to express, exactly?  This key combination can have
> > multiple meanings and ways to achieve it, depending on your needs.  Do
> > you want to send the key combination to an app?  What is it, exactly,
> > that you want to do?  What app uses Shift+Enter in the way you want to
> > use it?
> >
> > --
> > Chris “Kwpolska” Warrick 
> > PGP: 5EAAEA16
> > stop html mail | always bottom-post | only UTF-8 makes sense
> >

> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] how to express shift+enter in python

2014-09-28 Thread Alex Kleider

On 2014-09-28 07:53, lei yang wrote:

Hi expert,

How to express shift+enter in python ?

Have you tried ^J
or chr(10)?
i.e.
shift_plus_enter = chr(10)

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] how to express shift+enter in python

2014-09-28 Thread Dave Angel
lei yang  Wrote in message:
> 

> I just use "xlwt" lib to newline in one cell, I find it display with one line
>  in windows but works in linux, so I guess it maybe"shift+enter" to newline 

Xlwt isn't in the Python stdlib,  so some other forum is probably
 preferable to tutor.

Just how are you  "newlining"?  Can you post some example code?

"It" displays with one line in Windows.   Using what command,
 TYPE?  If you're using a particular program,  such as Lotus 123,
 you should specifit. Likewise in Linux, you might be using Open
 Office, or Libre Office Calc, or ...

I can't see what relevancy a keystroke combination has when you're
 presumably writing a spreadsheet file with code. You should
 probably concentrate on what data in the spreadsheet is
 desired.

-- 
DaveA

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] how to express shift+enter in python

2014-09-28 Thread Hilton Fernandes
Dear all,

the reading of specific keys is sometimes a necessity. For instance: some
text fields will let you insert a newline in the block of text if you press
the combination Shift+Enter, while pressing the sole Enter key will cause
the whole text to be transmitted.

Unfortunately, reading these combinations tend to be specific to the
operating system yo use, and are not available to the standard Python
library, that AFAIK is more concerned with chars than with keys.

In the context of Python, i suppose that TCL/Tk probably has this feature
and windowing environments for Python like wxPython, PyGTK, and PyQt.

So, dear Ley Yang, would you mind please telling us what's the OS you're
using ? Maybe Window ? And please comment more about your programming
experience.

This list has a specific focus, but the experts here are certainly able to
recommend you to another list, if that's the case.

I wish a nice week to everybody everywhere. 8-)

All the best,
Hilton


On Sun, Sep 28, 2014 at 9:07 PM, Dave Angel  wrote:

> lei yang  Wrote in message:
> >
>
> > I just use "xlwt" lib to newline in one cell, I find it display with one
> line
> >  in windows but works in linux, so I guess it maybe"shift+enter" to
> newline
>
> Xlwt isn't in the Python stdlib,  so some other forum is probably
>  preferable to tutor.
>
> Just how are you  "newlining"?  Can you post some example code?
>
> "It" displays with one line in Windows.   Using what command,
>  TYPE?  If you're using a particular program,  such as Lotus 123,
>  you should specifit. Likewise in Linux, you might be using Open
>  Office, or Libre Office Calc, or ...
>
> I can't see what relevancy a keystroke combination has when you're
>  presumably writing a spreadsheet file with code. You should
>  probably concentrate on what data in the spreadsheet is
>  desired.
>
> --
> DaveA
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor