of coursethese systemsspecific functionality isn' exactly the same--pymailcgi is roughly functional subset of pymailgui--but they are close enough to capture common trade-offs on basic levelboth of these systems use the python pop and smtp modules to fetch and send email through sockets the implementation alternatives they representthoughhave some critical ramifications that you should consider when evaluating the prospect of delivering systems on the webperformance costs networks are slower than cpus as implementedpymailcgi isn' nearly as fast or as complete as pymailgui in pymailcgievery time the user clicks submit buttonthe request goes across the network (it' routed to another program on the same machine for "localhost,but this setup is for testingnot deploymentmore specificallyevery user request incurs network transfer overheadevery callback handler may take the form of newly spawned process or thread on most serversparameters come in as text strings that must be parsed outand the lack of state information on the server between pages means that either mail needs to be reloaded often or state retention options must be employed which are slower and more complex than shared process memory in contrastuser clicks in pymailgui trigger in-process function calls rather than network traffic and program executionsand state is easily saved as python inprocess variables even with an ultra-fast internet connectiona server-side cgi system is slower than client-side program to be fairsome tkinter operations are sent to the underlying tcl library as stringstoowhich must be parsed this may change in timebut the contrast here is with cgi scripts versus gui libraries in general function calls will probably always beat network transfers some of these bottlenecks may be designed away at the cost of extra program complexity for instancesome web servers use threads and process pools to minimize process creation for cgi scripts moreoveras we've seensome state information can be manually passed along from page to page in hidden form fieldsgenerated url parametersand client-side cookiesand state can be saved between pages in concurrently accessible database to minimize mail reloads but there' no getting past the fact that routing events and data over network to scripts is slower than calling python function directly not every application must carebut some do complexity costs html isn' pretty because pymailcgi must generate html to interact with the user in web browserit is also more complex (or at leastless readablethan pymailgui in some sensecgi scripts embed html code in pythontemplating systems such as psp often take the opposite approach either waybecause the end result of this is mixture of two very different languagescreating an interface with web scripting trade-offs