Python + WinCE + serial port

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pcm

    #1

    Python + WinCE + serial port

    Hi,

    Has anyone ever worked on a Python-WinCE-based program that involved serial
    port management ?

    Regards,

    Philippe

  • Fuzzyman

    #2
    Re: Python + WinCE + serial port


    pcm wrote:[color=blue]
    > Hi,
    >
    > Has anyone ever worked on a Python-WinCE-based program that involved serial
    > port management ?
    >[/color]

    Because of the size of the runtime and the fragility of the GUI
    toolkits, there has been little serious development with PythonCE.
    (Little not none - and it's great to have Python available.)

    There is no built in support for the serial port in PythonCE (AFAIK).
    Your best bet is using ctypes (for which a PythonCE port has been done)
    and the microsoft API.

    Fuzzyman
    http://www.voidspace.org.uk/python/index.shtml
    [color=blue]
    > Regards,
    >
    > Philippe[/color]

    Comment

    • pcm

      #3
      Re: Python + WinCE + serial port

      Fuzzyman wrote:
      [color=blue]
      >
      > pcm wrote:[color=green]
      >> Hi,
      >>
      >> Has anyone ever worked on a Python-WinCE-based program that involved
      >> serial port management ?
      >>[/color]
      >
      > Because of the size of the runtime and the fragility of the GUI
      > toolkits, there has been little serious development with PythonCE.
      > (Little not none - and it's great to have Python available.)
      >
      > There is no built in support for the serial port in PythonCE (AFAIK).
      > Your best bet is using ctypes (for which a PythonCE port has been done)
      > and the microsoft API.
      >
      > Fuzzyman
      > http://www.voidspace.org.uk/python/index.shtml
      >[color=green]
      >> Regards,
      >>
      >> Philippe[/color][/color]




      Thanks, does that mean that I need to write an extension to the WinCE API or
      is that built-into the Python package ?

      Regards,
      Philippe



      Comment

      • Fuzzyman

        #4
        Re: Python + WinCE + serial port


        pcm wrote:[color=blue]
        > Fuzzyman wrote:
        >[color=green]
        > >
        > > pcm wrote:[color=darkred]
        > >> Hi,
        > >>
        > >> Has anyone ever worked on a Python-WinCE-based program that involved
        > >> serial port management ?
        > >>[/color]
        > >
        > > Because of the size of the runtime and the fragility of the GUI
        > > toolkits, there has been little serious development with PythonCE.
        > > (Little not none - and it's great to have Python available.)
        > >
        > > There is no built in support for the serial port in PythonCE (AFAIK).
        > > Your best bet is using ctypes (for which a PythonCE port has been done)
        > > and the microsoft API.
        > >
        > > Fuzzyman
        > > http://www.voidspace.org.uk/python/index.shtml
        > >[color=darkred]
        > >> Regards,
        > >>
        > >> Philippe[/color][/color]
        >
        >
        >
        >
        > Thanks, does that mean that I need to write an extension to the WinCE API or
        > is that built-into the Python package ?
        >[/color]

        (Sorry for late reply.)

        There is a version of ctypes *compiled* for PythonCE (from the PythonCE
        sourceforge page).

        Using ctypes you should be able to use the Microsoft Win32 API to
        access the serial port from *pure Python* code.

        You will need to use the Microsoft docs to see which calls to make.

        Fuzzyman
        http://www.voidspace.org.uk/python/index.shtml[color=blue]
        > Regards,
        > Philippe[/color]

        Comment

        Working...