Skip to content
murmot

Results for “python split example code server message site:mail.python.org command”

  • mail.python.org

    [BangPypers] python split

    Next message: [BangPypers] python split. Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]. Try this.Is there a way to split text like below example.

  • mail.python.org

    [Tutor] how to parse a multiple character words from plaintext

    I don't know Perl, so I decided to write a Python script to do what I wanted, which basically is to create a dictionary listing each site and its corresponding values instead of outputting into plaintext. Unfortunately, the output of mork.pl is 5000+ lines so reading the whole document wouldn't be that efficient. OK, I looked briefly at mork.pl.

  • mail.python.org

    [BangPypers] python split

    Next message: [BangPypers] python split. Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]. Here is the simplest generator for this. def splitat(s, pos=50)

  • mail.python.org

    [Tutor] parsing x is y statements from stdin - Python

    Jul 18, 2003 · I'm wondering if I can't treat each line of stdin as a list where list [0] is the key, list [1] is the verb, list [2] is the right hand side 'target'. I'm just completely unsure of how to go about doing that. Thank you for your time and consideration :) Scott. #--- end code snippet ---- > Hi Scott, > Can you show us how you're doing it in Perl?

  • mail.python.org

    [BangPypers] python split

    Next message: [BangPypers] python split. Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]. With tiny modifications you get a generator object.Hi , > Is there a way to split text like below example > >.

  • mail.python.org

    [Python-Dev] Half-baked proposal: * (and **?) in assignments

    Messages sorted by: [ date ] [ thread ] [ subject ] [ author ].Which do you like better for, say, parsing required and optional parameters to a command: (cmd, req1, req2, req3, opt_str) = input.split(None, 4) opts = opt_str.split() execute_cmd(cmd, req1, req2, req3, opts).

  • mail.python.org

    [Tutor] Talking to UDPServer - Python

    Nov 1, 2005 · I need to write a program that > >> communicates with an existing server, using the UDP protocol. This > >> is my first time writing such a program, and I need help getting > >> started. > > > > > > Here is an example from Python Network Programming, by John Goerzen. > > It opens a UDP port, sends a message, then echoes any received text to ...

  • mail.python.org

    [Tutor] Parsing text file with Python

    Mar 24, 2007 · A couple of points: > in_filename = raw_input ('What is the COMPLETE name of the file you > would like to process? ') > in_file = open (in_filename, 'rU') You might want to put your file opening code inside a try/except in case the file isn't there or is locked. > text = in_file.readlines () > count = len (text) > print "There are ", count ...