From: "Dmitry E. Oboukhov" <node@avanto.mpei.ac.ru>
To: community@altlinux.ru
Subject: Re: [Comm] прогу надо на python'е
Date: Fri, 22 Nov 2002 11:12:35 +0300
Message-ID: <3DDDE6F3.3030607@avanto.mpei.ac.ru> (raw)
In-Reply-To: <200211221404.47615.den@academ.org>
Denis S. Filimonov wrote:
>22 Ноябрь 2002 13:55, Евгений В. Хорохорин написал:
>
>
>>Приветствую!
>>
>>Пытаюсь написать программу для анализа детализации разговоров по мобильному
>>телефону. Строки разговоров имеют такой вид:
>>
>>01.09.2002 13:11:34 79272272516 1 55 1 4.00
>>0.00 4.00 01.09.2002 13:39:27 79272909092 S 2 0 0
>> 0.00 0.00 0.00
>>
>>(разница только в поле, где стоит 'S').
>>
>>Но проблема в том, что кроме таблицы разговоров есть еще шапка документа.
>>Если шапку вырезать "руками" и получившийся файл скормить программе - то
>>все замечательно. Но хотелось бы чтобы программа сама умела распознавать
>>формат строк, и начинать составлять статистику только для строк заданного
>>формата. Возможно ли это? Как это сделать?
>>
>>P.S.: Язык програмирования python
>>
>>Заранее спасибо
>>
>>
>
>парсите ручками? используйте регулярные выражения, они для того и существуют
>
>
>
см описание на модуль re
next prev parent reply other threads:[~2002-11-22 8:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-22 7:55 Евгений В. Хорохорин
2002-11-22 8:04 ` Denis S. Filimonov
2002-11-22 8:12 ` Dmitry E. Oboukhov [this message]
2002-11-22 8:47 ` Евгений В. Хорохорин
2002-11-22 8:12 ` Sanja Byelkin
2002-11-22 8:45 ` Евгений В. Хорохорин
2002-11-22 8:16 ` [Comm] " Axel
2002-11-22 8:46 ` Евгений В. Хорохорин
2002-11-22 15:02 ` [Comm] " Vitaly Lugovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DDDE6F3.3030607@avanto.mpei.ac.ru \
--to=node@avanto.mpei.ac.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git