Luis Zarrabeitia [EMAIL PROTECTED] writes:
I need to parse a file, text file. The format is something like that:
TYPE1 metadata
data line 1
data line 2
...
data line N
TYPE2 metadata
data line 1
...
TYPE3 metadata
...
And so on. The type and metadata determine how to parse the following dat=
a
Hishaam [EMAIL PROTECTED] writes:
Hi,
In python documentation, i found a telnet example as follows:
-
import getpass
import sys
import telnetlib
HOST = localhost
user = raw_input(Enter your remote account: )
password =
[EMAIL PROTECTED] writes:
Hi,
Hi,
I am taking a string as an input from the user and it should only
contain the chars:L , M or R
I tried the folllowing in kodos but they are still not perfect:
[^A-K,^N-Q,^S-Z,^0-9]
[L][M][R]
[LRM]?L?[LRM]? etc but they do not exactly meet what I need.
For
brechmos [EMAIL PROTECTED] writes:
Hi,
I have been using PHP the last while and in particular strtotime.
What I want to replicate is finding the second or fourth Monday of the
next month. In PHP with strtotime it is easy (strtotime(second
Monday, strtotime(next month), but I can't find an easy
[EMAIL PROTECTED] writes:
I'm trying to find some code that will turn:
100 - 100
1000 - 1,000
100 - 1,000,000
-1000 - -1,000
I know that can be done using a regular expression. In Perl I would do
something like:
sub thousand {
$number = reverse $_[0];
$number =~
[EMAIL PROTECTED] writes:
I'm new to python and I was wondering if there are any intelligent
date/time parsing modules out there. I've looked at strptime (or
whichever it is) and mxDateTime from the eGenix package. I need
something to parse user input for a django app, and it's awesome to be
able
Yansky [EMAIL PROTECTED] writes:
I'm trying to debug a script on my server and it's taking forever
using print to find the error. I've tried to use the debugging
examples on this page http://webpython.codepoint.net/debugging but
they don't seem to be working for me.
Is there an easier/better way
For PARSING see http://code-bear.com/code/parsedatetime/
The OP was looking for presentation though. I know roundup has code for this
if an independent library can't be found.
Eddie
--
http://mail.python.org/mailman/listinfo/python-list
chewie54 [EMAIL PROTECTED] writes:
Hello,
As an electronics engineer I use some very expensive EDA CAD tool
programs that are scriptable using Tcl. I was wondering why these
companies have choose to use Tcl instead of Python. Some of these
are:
Mentor Graphics ModelTech VHDL and Verilog
Paul McGuire [EMAIL PROTECTED] writes:
On Jul 23, 12:43 pm, [EMAIL PROTECTED] (Eddie Corns) wrote:
Paul McGuire [EMAIL PROTECTED] writes:
On Jul 23, 5:53 am, [EMAIL PROTECTED] (Eddie Corns) wrote:
Wolfgang Strobl [EMAIL PROTECTED] writes:
few of James Gimple's snippets from Algorithms
Wolfgang Strobl [EMAIL PROTECTED] writes:
few of James Gimple's snippets from Algorithms in SNOBOL4
(-http://www.snobol4.org/) as an exercise using that library might help
to get a better appreciation. Perhaps I'll try, eventually ...
I never noticed them or the PDF of the book there before.
Paul McGuire [EMAIL PROTECTED] writes:
On Jul 23, 5:53 am, [EMAIL PROTECTED] (Eddie Corns) wrote:
Wolfgang Strobl [EMAIL PROTECTED] writes:
few of James Gimple's snippets from Algorithms in SNOBOL4
(-http://www.snobol4.org/) as an exercise using that library might help
to get a better
[EMAIL PROTECTED] (Aahz) writes:
In article [EMAIL PROTECTED],
Wolfgang Strobl [EMAIL PROTECTED] wrote:
SNOBOLs powerfull patterns still shine, compared to Pythons clumsy
regular expressions.
Keep in mind that Python regular expressions are modeled on the
grep/sed/awk/Perl model so as to be
vdicarlo [EMAIL PROTECTED] writes:
I am a programming amateur and a Python newbie who needs to convert
about 100,000,000 strings of the form 1999-12-30 into ordinal dates
for sorting, comparison, and calculations. Though my script does a ton
of heavy calculational lifting (for which numpy and
Look at:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298
it handles most of the logic of combining IP ranges.
Eddie
--
http://mail.python.org/mailman/listinfo/python-list
=?iso-8859-1?q?Pekka_J=E4rvinen?= [EMAIL PROTECTED] writes:
On 20 huhti, 14:34, [EMAIL PROTECTED] (Eddie Corns) wrote:
Look at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298
it handles most of the logic of combining IP ranges.
Eddie
I'm getting error:
Traceback (most recent
wesley chun [EMAIL PROTECTED] writes:
with that said, i would still like to state that the book's target
audience is for people who know how to program but need to pick up
Python as quickly as possible. the theory that's in the book is
really more explanation of how the Python interpreter works,
[EMAIL PROTECTED] writes:
Hi,
Given a large ascii file (delimited or fixed width) with one ID field
and dimensions/measures fields, sorted by dimensions, I'd like to
flatten or rollup the file by creating new columns: one for each
combination of dimension level, and summing up measures over all
Diez B. Roggisch [EMAIL PROTECTED] writes:
Brian Blais wrote:
Hello,
I was wondering if there is a way to run CherryPy/Turbogears on a server
that I don't
have root access to. If I just choose a random port, I think the security
guys on
the server would get annoyed at me.
Why should
Ron Garret [EMAIL PROTECTED] writes:
In article [EMAIL PROTECTED],
Steve Holden [EMAIL PROTECTED] wrote:
I wouldn't necessarily say you are wrong here, It's just that the cgi
module has sort of just growed, so it isn't conveniently factyored for
reusability in other contexts. Several
Jim Lewis [EMAIL PROTECTED] writes:
Anyone have experience with string pattern matching?
I need a fast way to match variables to strings. Example:
string - variables
abcaaab - xyz
abca - xy
eeabcac - vxw
x matches abc
y matches a
z matches aab
w maches ac
v maches ee
Off topic I
Kent Johnson [EMAIL PROTECTED] writes:
Eddie Corns wrote:
If I get time I'll try to get this working in Sam Wilmott's Python pattern
matching library.
What fun!
Cool! I have to get in on the fun :-)
This program uses Sam Wilmott's library to find one solution. It is a
simple translation
[EMAIL PROTECTED] writes:
hi
i am using a telnet session to simulate an authentication mechanism
USER = user
PASSWORD = password
try:
telnet = telnetlib.Telnet(HOST)
telnet.set_debuglevel(5)
telnet.read_until(login: )
telnet.write(USER + \n)
David Hirschfield [EMAIL PROTECTED] writes:
Here's the problem: Given a list of item names like:
apple1
apple2
apple3_SD
formA
formB
formC
kla_MM
kla_MB
kca_MM
which is a subset of a much larger list of items,
is there an efficient algorithm to create condensed forms that match
those items,
Magnus Lycka [EMAIL PROTECTED] writes:
I want an re that matches strings like 21MAR06 31APR06 1236,
where the last part is day numbers (1-7), i.e it can contain
the numbers 1-7, in order, only one of each, and at least one
digit. I want it as three groups. I was thinking of
Just a small point -
Fredrik Lundh [EMAIL PROTECTED] writes:
Eddie Corns wrote:
I want an re that matches strings like 21MAR06 31APR06 1236,
where the last part is day numbers (1-7), i.e it can contain
the numbers 1-7, in order, only one of each, and at least one
digit. I want it as three groups. I was thinking
Jim [EMAIL PROTECTED] writes:
Eddie Corns wrote:
Just a small point - what does in order mean here? if it means that eg 1362
is not valid then you're stuck because it's context sensitive and hence not
regular.
I'm not seeing that. Any finite language is regular -- as a last
resort you could
[EMAIL PROTECTED] writes:
Thanks for the reply. I've replaced the call to read_very_eager() with
read_until() and enabled debugging messages. My script now looks like
this...
#
import telnetlib
tn = telnetlib.Telnet('192.168.100.11')
tn.set_debuglevel(9)
[EMAIL PROTECTED] writes:
I'm trying to use a python script to access an embedded computer
running linux and connected via a crossover ethernet cable using the
following script...
...and I realize the username and password is not realistic... I'm
still in proof of concept stage here :)
Jay Parlar [EMAIL PROTECTED] writes:
I was hoping to get some c.l.p. opinions on O'Reilly's new Twisted book.
Well I certainly felt that I understood it better after reading the book.
OTOH I haven't tried to put that knowledge into practice yet.
I think calling it a cookbook is misleading, it
linuxfreak [EMAIL PROTECTED] writes:
Was wanting to write a text based application in python seems
curses module is the way to go... anyone knows of any good tutorials
apart from the one written by esr
There is at least 1 higher level library atop curses.
http://excess.org/urwid/ I've only
[EMAIL PROTECTED] writes:
Hey there pythoneers
i have another question about time, specifically, the mxDateTime
module.
i have been able to get a RelativeDateTimeDiff between two times,
it gives me a difference between two DateTimes in the form of +3days
+2hours etc...
so, if i have a date that
Mike Meyer [EMAIL PROTECTED] writes:
I've found a fair number of systems/network monitoring tools (things
like Big Brother, Big Sister, cricket, etc.) written in Perl.
Depressing isn't it!
I'm curious if there are any written in Python.
I couldn't find any after extensive searching. I wasn't
Simon Brunning [EMAIL PROTECTED] writes:
On 9/22/05, Mike Meyer [EMAIL PROTECTED] wrote:
I've found a fair number of systems/network monitoring tools (things
like Big Brother, Big Sister, cricket, etc.) written in Perl. I'm
curious if there are any written in Python.
There's EDDIE -
[EMAIL PROTECTED] writes:
I was wondering if it there is an easy way to get the dd-mm- from
ww-.
I would like to get, for example the first day (date-month-year) in the
week i specify. Found plenty of ways to go th other way, but none that
give me the reverse.
Idealy I would like both
Jon Hewer [EMAIL PROTECTED] writes:
Hi
I'm about to start my third, and final, year in computer science at
cambridge uni, and i need to come up with an idea for a software
project, but i'm really struggling for ideas, and i was wondering
whether anyone here had any suggestions.
I'd say i'm
Wojciech Halicki-Piszko [EMAIL PROTECTED] writes:
How to know if connection is active after telnetlib.Telnet.open(host,port)?
If open() doesn't throw an exception then you should have a connection you can
start reading/writing with. Unless you have some special meaning for
'active'?
I'm just
[EMAIL PROTECTED] writes:
Hey there.
i have a time string (created with strftime) then read from a file,
i am having some trouble understanding how to get the difference
between times.
i know i can structime(timestring) and get a time value, but i dont
know how to manipulate it.
basically, if i
Joerg Schuster [EMAIL PROTECTED] writes:
Hello,
I am looking for a method to shuffle the lines of a large file.
I have a corpus of sorted and uniqed English sentences that has been
produced with (1):
(1) sort corpus | uniq corpus.uniq
corpus.uniq is 80G large. The fact that every sentence
Alex Le Dain [EMAIL PROTECTED] writes:
Is there a generic tree module that can enable me to sort and use
trees (and nodes). Basically having methods such as .AddNode(),
.GetAllChildren(), .FindNode() etc.
http://newcenturycomputers.net/projects/rbtree.html
might do most of what you want.
[EMAIL PROTECTED] (Nitin Chaumal) writes:
I sarched the existing threads but didnt find an answer to this.
I am writing simple script which uses telentlib to open a session with
a unix machine and run tail -f logfile.txt on one of the logfiles.
import telnetlib
HOST = 192.X.X.X
user = myname
Gregor Horvath [EMAIL PROTECTED] writes:
Hi,
Before I reinvent the wheel I`d like to ask if someone has done this
before since I did not find an advice at Google.
The goal is to create a dynamic Tree View in HTML.
Say I have a data strucure like this:
structList =
42 matches
Mail list logo