Women in Technology

Hear us Roar



Article:
  Untwisting Python Network Programming
Subject:   Why untwisting?
Date:   2006-08-14 08:15:01
From:   glyph@divmod.com
Response to: Why untwisting?

Are you measuring the time it takes to perform a task, or the amount of time it takes to start the interpreter, load every module, perform the task, and shut down the interpreter?


Twisted has more code in it than the Python standard library version, so unless you've carefully optimized the package for importing, the amount of time spent loading code will dwarf the amount of time spent actually doing anything.

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Short examples don't show event driven-driven benefits
    2006-08-23 11:11:38  andypurshottam [View]

    The main advantages of event driven programming become visible when large amounts of data can be processed incrementally ("streaming") and when there are multiple event sources, especially a gui tooklkit. Small cute programming examples typically do not need these resources. The smallest example I have seen of a application that needs and benefits from event-driven programming is the tcp proxy spy with gui window, like tcpwatch (done with async stuff from medusa, but would be instructive example with any event-driven system.)

    Found I really understood POE after completing such a program, and would advise those trying to learn a event-driven stsrem to code such. Only proplem is that doing so is not trivial, especially given the small examples that come with most systems, that do not explain how to do the tricky things needed so code a proxy, that also has GUI or standard IO, and possibly multple network connections.

    Andy (andypurshottam@gmail.com)