[IronPython] Ctrl + A

Aloysius Jegan Aloysius.Jegan at Lntemsys.com
Wed Oct 7 10:59:37 CEST 2009


Thanks david.... It is working





David Escobar <davidescobar1976 at gmail.com> 
Sent by: users-bounces at lists.ironpython.com
10/07/2009 12:24 PM
Please respond to
Discussion of IronPython <users at lists.ironpython.com>


To
Discussion of IronPython <users at lists.ironpython.com>
cc
users-bounces at lists.ironpython.com
Subject
Re: [IronPython] Ctrl + A






The ASCII code for the Ctrl+A character is 01, so I would try something 
like this:

cmd = chr(01) + " SWITCH ON 01 02"

Then send the cmd string. If you need to convert a single-character string 
back to an ASCII code, you would use the ord function.


On Tue, Oct 6, 2009 at 11:12 PM, Aloysius Jegan <
Aloysius.Jegan at lntemsys.com> wrote:

Hi, 

How to give Ctrl+A as a start of string in Ironpython? 

My requirement is like this, 

I have to send one command to my device assume the command is "SWITCH ON 
01 02 03" 
before sending this command through serial port, I have to press Ctrl+A as 
start of command. I don't know how to add Ctrl+A along with the command 
string. 


-Regards 
Aloysius Jegan 

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20091007/91fb9bb5/attachment.html>


More information about the Ironpython-users mailing list