How do I pass args using Python Windows

2005-10-17 Thread Ross Reyes



Hi -  
I wonder if someone might be able to lend a quick 
answer to this.
 
I have a python script that I normally run from the 
command line on Solaris.    
i.e.    %pythonscript  
> 
 
I decided to try IDLE on Windows to do some 
debugging with the debugger (which I 
unfortunately dont' have on Solaris 
5.7 )    
 
So my question is: How do I pass the command line 
args when using the Windows IDLE/Python 
environment? 
 
Thanks for any tips.
 
 
 
 
-- 
http://mail.python.org/mailman/listinfo/python-list

what happens when the file begin read is too big for all lines to be read with "readlines()"

2005-11-19 Thread Ross Reyes
HI -
Sorry for maybe a too simple a question but I googled and also checked my 
reference O'Reilly Learning Python
book and I did not find a satisfactory answer.

When I use readlines, what happens if the number of lines is huge?I have 
a very big file (4GB) I want to
read in, but I'm sure there must be some limitation to readlines and I'd 
like to know how it is handled by python.
I am using it like this:
slines = infile.readlines() # reads all lines into a list of strings called 
"slines"

Thanks for anyone who knows the answer to this one. 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: what happens when the file begin read is too big for all lines tobe?read with "readlines()"

2005-11-20 Thread Ross Reyes
Yes, I have read this part

  readlines( [sizehint])

Read until EOF using readline() and return a list containing the lines thus 
read. If the optional sizehint argument is present, instead of reading up to 
EOF, whole lines totalling approximately sizehint bytes (possibly after 
rounding up to an internal buffer size) are read. Objects implementing a 
file-like interface may choose to ignore sizehint if it cannot be 
implemented, or cannot be implemented efficiently.

Maybe I'm missing the obvious, but it does not seem to say what happens when 
the input for readlines is too big.  Or does it?

How does one tell exactly what the limitation is to the size of  the 
returned list of strings?

- Original Message - 
From: "Ben Finney" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To: 
Sent: Saturday, November 19, 2005 6:48 AM
Subject: Re: what happens when the file begin read is too big for all lines 
tobe?read with "readlines()"


> Ross Reyes <[EMAIL PROTECTED]> wrote:
>> Sorry for maybe a too simple a question but I googled and also
>> checked my reference O'Reilly Learning Python book and I did not
>> find a satisfactory answer.
>
> The Python documentation is online, and it's good to get familiar with
> it:
>
>http://docs.python.org/>
>
> It's even possible to tell Google to search only that site with
> "site:docs.python.org" as a search term.
>
>> When I use readlines, what happens if the number of lines is huge?
>> I have a very big file (4GB) I want to read in, but I'm sure there
>> must be some limitation to readlines and I'd like to know how it is
>> handled by python.
>
> The documentation on methods of the 'file' type describes the
> 'readlines' method, and addresses this concern.
>
>http://docs.python.org/lib/bltin-file-objects.html#l2h-244>
>
> -- 
> \ "If you're not part of the solution, you're part of the |
>  `\   precipitate."  -- Steven Wright |
> _o__)  |
> Ben Finney
> -- 
> http://mail.python.org/mailman/listinfo/python-list 
-- 
http://mail.python.org/mailman/listinfo/python-list