This reminds me of something I once wanted to do: How can I install
Python in a totally non-gui way on Windows (without the use of VNC)? I
think I was telnetted into a computer (or something like that) and I was
unable to run the usual Python installer because it uses a GUI.
Laurent
On Fri, Mar 23, 2007 at 03:11:35PM -0600, Matt Garman wrote:
I'm trying to use Python to work with large pipe ('|') delimited data
files. The files range in size from 25 MB to 200 MB.
Since each line corresponds to a record, what I'm trying to do is
create an object from each record.
En Fri, 23 Mar 2007 18:27:25 -0300, Mark Nenadov
[EMAIL PROTECTED] escribió:
I'd suggest doing the following instead of that while loop:
for line in open(sys.argv[1]).xreadlines():
Poor xreadlines method had a short life: it was born on Python 2.1 and got
deprecated on 2.3 :(
A file is
En Fri, 23 Mar 2007 18:11:35 -0300, Matt Garman [EMAIL PROTECTED]
escribió:
Example 2: read lines into objects:
# begin readobjects.py
import sys, time
class FileRecord:
def __init__(self, line):
self.line = line
records = list()
file = open(sys.argv[1])
while True:
Hi list,
I'm in a process of rewriting a bash/awk/sed script -- that grew to
big -- in python. I can rewrite it in a simple line-by-line way but
that results in ugly python code and I'm sure there is a simple
pythonic way.
The bash script processed text files of the form:
Lew [EMAIL PROTECTED] writes:
But if Xah were being trollish, why didn't they jump on my response
and call me names?
Xah never replies to the threads he starts. At least, I've never known him
to do so.
I still think that analysis of the original post is a useful exercise
to learn Java.
Peter Otten wrote:
Eric S. Johansson wrote:
Here is yet another revision of my example then:
it's making more and more sense although I don't quite follow 'property'
quite yet. But I see that get_logger is invoked prior to the
__logger.info call.
I was looking at how to implement one of
En Fri, 23 Mar 2007 19:34:31 -0300, Eric S. Johansson [EMAIL PROTECTED]
escribió:
class LoggedType(type):
def __new__(mcl, name, bases, classdict):
def get_logger(self):
tag = %s.%s % (name,sys._getframe(1).f_code.co_name)
lgr =
Shane Geiger wrote:
This reminds me of something I once wanted to do: How can I install
Python in a totally non-gui way on Windows (without the use of VNC)? I
think I was telnetted into a computer (or something like that) and I was
unable to run the usual Python installer because it uses
Daniel Nogradi:
Any elegant solution for this?
This is my first try:
ddata = {}
inside_matrix = False
for row in file(data.txt):
if row.strip():
fields = row.split()
if len(fields) == 2:
inside_matrix = False
ddata[fields[0]] = [fields[1]]
Irmen de Jong napisał(a):
Python uses a MSI (microsoft installer) based installer on windows.
This was introduced in version 2.5 I believe.
2.4? I recall that we installed 2.4.2 this way on 500 machines some day
at my previous work.
--
Jarek Zgoda
http://jpa.berlios.de/
--
This is my first try:
ddata = {}
inside_matrix = False
for row in file(data.txt):
if row.strip():
fields = row.split()
if len(fields) == 2:
inside_matrix = False
ddata[fields[0]] = [fields[1]]
lastkey = fields[0]
else:
On Fri, 23 Mar 2007 19:11:23 -0300, Gabriel Genellina wrote:
Poor xreadlines method had a short life: it was born on Python 2.1 and got
deprecated on 2.3 :(
A file is now its own line iterator:
f = open(...)
for line in f:
...
Gabriel,
Thanks for pointing that out! I had completely
Thanks to all. I had suspected this was the best way to go, but as
I'm fairly new to Python, it seemed worth a check.
--b
On Mar 23, 2007, at 12:48 PM, [EMAIL PROTECTED] wrote:
On Mar 23, 1:20 pm, belinda thom [EMAIL PROTECTED] wrote:
On Mar 23, 2007, at 11:04 AM, [EMAIL PROTECTED] wrote:
On Mar 23, 1:10 pm, Efrat Regev [EMAIL PROTECTED] wrote:
Hello,
I'm trying to write something that will translate Python code to
pseudo-code (for teaching purposes). Googling around indicated that the
compiler module is pertinent, especially creating a visitor to walk the
generated
Matt Garman wrote:
Since each line corresponds to a record, what I'm trying to do is
create an object from each record. However, it seems that doing
this causes the memory overhead to go up two or three times.
(Note that almost everything in Python is an object!)
Example 1: read lines into
On Mar 23, 10:30 pm, Daniel Nogradi [EMAIL PROTECTED] wrote:
Hi list,
I'm in a process of rewriting a bash/awk/sed script -- that grew to
big -- in python. I can rewrite it in a simple line-by-line way but
that results in ugly python code and I'm sure there is a simple
pythonic way.
The
On Mar 24, 12:57 am, Rob Wolfe [EMAIL PROTECTED] wrote:
Godzilla wrote:
Hello,
How do you create/spawn new processes in XP over telnet using python?
I.e. I would like to create a new process and have it running in the
background... when I terminate the telnet connection, I would what the
On Mar 24, 12:57 am, Rob Wolfe [EMAIL PROTECTED] wrote:
Godzilla wrote:
Hello,
How do you create/spawn new processes in XP over telnet using python?
I.e. I would like to create a new process and have it running in the
background... when I terminate the telnet connection, I would what the
I'd like to create a program that takes files with jsp-like markup
and processes the embedded code (which would be python) to produce the
output file. There would be two kinds of sections in the markup file:
python code to be evaluated, and python code that returns a value that
would be inserted
Gabriel Genellina wrote:
I don't get all the details of what's all that stuff for, but from the
error and traceback, I think you forgot to create the filter_test
instance. That is, change lgr.addFilter(filter_test) to
lgr.addFilter(filter_test())
do'h . for some reason, I thought
Bjoern Schliessmann [EMAIL PROTECTED] writes:
if len(line) == 0: break # EOF
one blank line == EOF? That's strange. Intended?
A blank line would have length 1 (a newline character).
--
http://mail.python.org/mailman/listinfo/python-list
I can't figure out this problem Im having, I just can't understand why
it is ignoring the call I put in. First the code (This is a cherrypy
website):
import sys, cherrypy, html
class Root:
@cherrypy.expose
def index(self, pageid = Index):
selection = html.Page()
On Mar 24, 12:51 pm, [EMAIL PROTECTED] wrote:
[snip]
def pager(self,dex):
#Input page filename, Output pagetitle and the HTML output
#Find out if the file requested actually exists
try:
j = dex + .html
On Mar 23, 5:30 pm, Daniel Nogradi [EMAIL PROTECTED] wrote:
Hi list,
I'm in a process of rewriting a bash/awk/sed script -- that grew to
big -- in python. I can rewrite it in a simple line-by-line way but
that results in ugly python code and I'm sure there is a simple
pythonic way.
The
On Mar 23, 1:25 pm, Steve Holden [EMAIL PROTECTED] wrote:
Carsten Haese wrote:
On Fri, 2007-03-23 at 09:54 -0700, [EMAIL PROTECTED] wrote:
When constructing a particularly long and complicated command to be
sent to the shell, I usually do something like this, to make the
command as easy
John J. Lee wrote this on Thu, 22 Mar 2007 21:16:13 +. My reply is
below.
I sympathise but conventional wisdom (which surely has a lot of
truth in it) is that employers are not faced with the problem of
minimising false negatives (failing to hire when they should have
hired). They are
On Mar 23, 10:29 pm, John Machin [EMAIL PROTECTED] wrote:
It *is* pulling up the 404 function, which *is* returning your error
page. However all your except clause does is self.err404(dex) -- you
ignore the return value, and fall out of the except clause with
textfile undefined, with the
On Fri, 23 Mar 2007 13:15:29 -0700, John Machin wrote:
OK, I'll bite: This was new in late 2000 when Python 2.0 was
released. Where have you been in the last ~6.5 years?
Western civilization is 6,000 years old. Anything after 1850 is new.
*wink*
--
Steven.
--
Bjoern Schliessmann wrote:
while True:
line = file.readline()
if len(line) == 0: break # EOF
one blank line == EOF? That's strange. Intended?
The most common form for this would be if not line: (do
something).
not line and len(line) == 0 is the same as long as line is a
string.
On Fri, 23 Mar 2007 19:39:53 -0700, Paul McGuire wrote:
(and I'm glad I'm not the only one who uses 'l' for a scratch list
variable...)
Yes, and come the revolution, every last one of you will be down the salt
mines.
I don't mind using capital L as a variable, but l looks too much like I
and
Hi,
In my python scripts, I create thread likes this:
// for example threadCount is 10
for j in range(int(threadCount)):
t = MyThread()
t.start()
// wait all the threads are done
doSomething()
My question is how can i tell when all the threads
On Fri, 23 Mar 2007 07:47:04 -0700, Alex Martelli wrote:
You can use
python -c 'import myscript; myscript.main()'
and variations thereon.
Hmmm, after all that, this seems to be close to what I was looking for.
Thanks Alex. Didn't find anything about this in your cookbook! (I'm just
On Mar 24, 9:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Hi,
In my python scripts, I create thread likes this:
// for example threadCount is 10
for j in range(int(threadCount)):
t = MyThread()
t.start()
// wait all the threads are done
Video sharing social network Teenwag seeks great Python hackers we ll
wear Python T-shirts at startup school $100K $5K sign on $2k
referral
http://www.teenwag.com/showvideo/352
--
http://mail.python.org/mailman/listinfo/python-list
Matt Garman wrote:
I'm trying to use Python to work with large pipe ('|') delimited data
files. The files range in size from 25 MB to 200 MB.
Since each line corresponds to a record, what I'm trying to do is
create an object from each record. However, it seems that doing this
causes the
Bugs item #1686200, was opened at 2007-03-22 17:00
Message generated for change (Comment added) made by vsajip
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1686200group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1686475, was opened at 2007-03-23 02:31
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1686475group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1686597, was opened at 2007-03-23 06:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1686597group_id=5470
Please note that this message will contain a full copy of
Bugs item #1686475, was opened at 2007-03-23 03:31
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1686475group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1685773, was opened at 2007-03-22 04:12
Message generated for change (Comment added) made by gagenellina
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1685773group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #978833, was opened at 2004-06-24 11:57
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=978833group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #1686475, was opened at 2007-03-22 22:31
Message generated for change (Comment added) made by dcroberts
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1686475group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1685000, was opened at 2007-03-21 02:15
Message generated for change (Comment added) made by rushing
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1685000group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #978833, was opened at 2004-06-24 09:57
Message generated for change (Comment added) made by arigo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=978833group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #1687125, was opened at 2007-03-23 20:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1687125group_id=5470
Please note that this message will contain a full copy of
Bugs item #1687125, was opened at 2007-03-23 20:50
Message generated for change (Comment added) made by al65536
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1687125group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1687163, was opened at 2007-03-23 16:51
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1687163group_id=5470
Please note that this message will contain a full copy of
Bugs item #1687163, was opened at 2007-03-23 17:51
Message generated for change (Comment added) made by jackdied
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1687163group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1687163, was opened at 2007-03-23 16:51
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1687163group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1687163, was opened at 2007-03-23 16:51
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1687163group_id=5470
Please note that this message will contain a full copy of the comment
Feature Requests item #1673203, was opened at 2007-03-03 19:21
Message generated for change (Comment added) made by collinwinter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=355470aid=1673203group_id=5470
Please note that this message will contain a full copy of
101 - 152 of 152 matches
Mail list logo