Hi all,
I use the latest conda, ie, Anaconda3-4.0.0-Linux-x86_64 to install some
packages, but always meet the following error:
$ conda install conda-build
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: SSL verification error: EOF occurred in
violation of
On 2014-07-08, Tim Chase wrote:
> On 2014-07-09 01:49, Chris Angelico wrote:
>> Have you ever used COPY CON to create a binary file?
>
> No, for that I used DEBUG.EXE (or DEBUG.COM on older versions of DOS)
Both.
--
Jan v/d Broek
ba
On Wed, Jul 9, 2014 at 1:57 AM, Tim Chase wrote:
> On 2014-07-09 01:49, Chris Angelico wrote:
>> Have you ever used COPY CON to create a binary file?
>
> No, for that I used DEBUG.EXE (or DEBUG.COM on older versions of DOS)
I never used a DOS version so old it had DEBUG.COM, but I used
DEBUG.EXE
On 2014-07-09 01:49, Chris Angelico wrote:
> Have you ever used COPY CON to create a binary file?
No, for that I used DEBUG.EXE (or DEBUG.COM on older versions of DOS)
-tkc
--
https://mail.python.org/mailman/listinfo/python-list
This problem does not happen very often, but when it happen is only on
system startup, and I couldn't reproduce by starting by hand.
My startup script tries to initiate a lot of services in sequence (ruby,
java, C and python), but does not do anything with stdio streams, at least
not directly.
At
ing system start
>> time, and sometime when the apps are starting a corefile is generated for
>> one one them (not always the same) and the following error is reported:
>>
>> "Fatal Python error: Py_Initialize: can't initialize sys standard streams
>> EOFErr
On 25 September 2012 14:56, Robison Santos wrote:
> I'm using python3.2.1
> on Enterprise Linux Server release 5.3 (Carthage).
>
> I'm starting my apps calling python3 file.py
>
> I have a script that runs on system startup executing my python scripts.
>
What happens if you just run the script
when the apps are starting a corefile is generated for one one
> them (not always the same) and the following error is reported:
>
> "Fatal Python error: Py_Initialize: can't initialize sys standard streams
> EOFError: EOF read where not expected"
>
What OS etc. are yo
s the same) and the following error is reported:
"Fatal Python error: Py_Initialize: can't initialize sys standard streams
EOFError: EOF read where not expected"
Does anyone knows more about this problem and how can I fix it?
Looking on the internet, I found issues related to the
After way too much time, I figured it out, after a quote from [this
post](http://fixunix.com/questions/379652-sending-eof-named-pipe.html)
jumped out at me:
> See the "I/O on Pipes and FIFOs" section of pipe(7) ("man 7 pipe")
>
> "If all file descriptors referri
e expected 5.
>>>>>
>>>>> If you set `verbose=True`, you can see that the straggling subprocess
>>>>> is receiving most of the messages, then waiting for the last chunk of
>>>>> 3 chars---it's not detecting that the pipe has been
ost of the messages, then waiting for the last chunk of
>>>> 3 chars---it's not detecting that the pipe has been closed.
>>>> Furthermore, if I simply don't do anything with the second process
>>>> (`doreturn=True`), the first process will *never* se
iving most of the messages, then waiting for the last chunk of
3 chars---it's not detecting that the pipe has been closed.
Furthermore, if I simply don't do anything with the second process
(`doreturn=True`), the first process will *never* see the EOF.
Any ideas what's happening?
e`, you can see that the straggling subprocess
>> is receiving most of the messages, then waiting for the last chunk of
>> 3 chars---it's not detecting that the pipe has been closed.
>> Furthermore, if I simply don't do anything with the second process
>> (`doretu
-it's not detecting that the pipe has been closed.
Furthermore, if I simply don't do anything with the second process
(`doreturn=True`), the first process will *never* see the EOF.
Any ideas what's happening? Further down is some example output.
Thanks in advance.
from subproces
een closed.
Furthermore, if I simply don't do anything with the second process
(`doreturn=True`), the first process will *never* see the EOF.
Any ideas what's happening? Further down is some example output.
Thanks in advance.
from subprocess import *
from threading import *
Hey all, I'm trying to read a library of my company's PDFs, but about a
third of them can't be opened. PyPDF (v1.12) spits out this error:
pyPdf.utils.PdfReadError: EOF marker not found
I searched for the answer via google, but all I found was this link:
http://lindaocta.com/?
On 2010-10-16, Steven D'Aprano wrote:
> On Fri, 15 Oct 2010 20:07:37 +, Grant Edwards wrote:
>
>> Nor I, which is why I was confused by the statement that in the "Unix
>> world" a lot of programs misbehaved when presented with files whose
>> names contained a null byte.
>
> That's not what I s
On Fri, 15 Oct 2010 20:07:37 +, Grant Edwards wrote:
> Nor I, which is why I was confused by the statement that in the "Unix
> world" a lot of programs misbehaved when presented with files whose
> names contained a null byte.
That's not what I said. I said, TRY to create a file with a null by
On 2010-10-15, Martin Gregorie wrote:
> On Fri, 15 Oct 2010 19:59:13 +, Grant Edwards wrote:
>
>>
>> We're talking about Unix.
>> We're not talking about CP/M, DOS, RSX-11m, Apple-SOS, etc.
>
> That's just your assumption.
If you go back and look at my original posting in this thread, here's
On Fri, 15 Oct 2010 19:59:13 +, Grant Edwards wrote:
>
> We're talking about Unix.
> We're not talking about CP/M, DOS, RSX-11m, Apple-SOS, etc.
>
That's just your assumption. Track back up the thread and you'll see that
the OP didn't mention an OS. He merely said that he was using zlib, and
On 2010-10-15, MRAB wrote:
>> I wrote an equivalent program in C++ using the win32
>> ReadFile() call, and it read all 255 bytes just fine. What am
>> I doing wrong with the python code?
>>
>>
>> I am using Erlang to launch the Python program as a subprocess. The
>> Erlang fragment that launches
On 2010-10-15, Chris Torek wrote:
>>> On 2010-10-15, Grant Edwards wrote:
How do you create a [Unix] file with a name that contains a NULL byte?
>
>>On 2010-10-15, Seebs wrote:
>>> So far as I know, in canonical Unix, you don't -- the syscalls all work
>>> with something like C strings unde
On 15/10/2010 20:28, Dan wrote:
I am writing a Windows program in Python 3.1.2 that reads binary data
from stdin. Whenever it hits a \x1a character, stdin goes EOF and no
more data can be read. A short program that exhibits this problem is:
#listing of main.pyw
import sys
def go():
bb
On 2010-10-15, Seebs wrote:
> On 2010-10-15, Grant Edwards wrote:
>> Yes, all of the Unix syscalls use NULL-terminated path parameters
>> (AKA "C strings"). What I don't know is whether the underlying
>> filesystem code also uses NULL-terminated strings for filenames or if
>> they have explicit
On 2010-10-15, Martin Gregorie wrote:
>> On 2010-10-15, Martin Gregorie wrote:
>>> On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote:
On 2010-10-15, Steven D'Aprano :
> In the Unix world, which includes OS X, text tools tend to have
> difficulty with tabs. Or try naming a
On Oct 15, 2:42 pm, Neil Cerutti wrote:
> On 2010-10-15, Dan wrote:
>
> > I am writing a Windows program in Python 3.1.2 that reads
> > binary data from stdin. Whenever it hits a \x1a character,
> > stdin goes EOF and no more data can be read. A short program
> >
>> On 2010-10-15, Grant Edwards wrote:
>>> How do you create a [Unix] file with a name that contains a NULL byte?
>On 2010-10-15, Seebs wrote:
>> So far as I know, in canonical Unix, you don't -- the syscalls all work
>> with something like C strings under the hood, meaning that no matter what
>
On 2010-10-15, Dan wrote:
> I am writing a Windows program in Python 3.1.2 that reads
> binary data from stdin. Whenever it hits a \x1a character,
> stdin goes EOF and no more data can be read. A short program
> that exhibits this problem is:
stdin is not in binary mode. Try invo
On 2010-10-15, Grant Edwards wrote:
> Yes, all of the Unix syscalls use NULL-terminated path parameters (AKA
> "C strings"). What I don't know is whether the underlying filesystem
> code also uses NULL-terminated strings for filenames or if they have
> explicit lengths. If the latter, there migh
I am writing a Windows program in Python 3.1.2 that reads binary data
from stdin. Whenever it hits a \x1a character, stdin goes EOF and no
more data can be read. A short program that exhibits this problem is:
#listing of main.pyw
import sys
def go():
bb=sys.stdin.buffer.raw.read(1
On Fri, 15 Oct 2010 18:14:13 +, Grant Edwards wrote:
> On 2010-10-15, Martin Gregorie wrote:
>> On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote:
>>
>>> On 2010-10-15, Steven D'Aprano
>>> wrote:
>>>
In the Unix world, which includes OS X, text tools tend to have
difficulty
On 2010-10-15, Seebs wrote:
> On 2010-10-15, Grant Edwards wrote:
>> On 2010-10-15, Steven D'Aprano wrote:
>>> In the Unix world, which includes OS X, text tools tend to have
>>> difficulty with tabs. Or try naming a file with a newline or carriage
>>> return in the file name, or a NULL byte.
>
On 2010-10-15, Grant Edwards wrote:
> On 2010-10-15, Steven D'Aprano wrote:
>> In the Unix world, which includes OS X, text tools tend to have
>> difficulty with tabs. Or try naming a file with a newline or carriage
>> return in the file name, or a NULL byte.
> How do you create a file with a n
On 2010-10-15, Martin Gregorie wrote:
> On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote:
>
>> On 2010-10-15, Steven D'Aprano
>> wrote:
>>
>>> In the Unix world, which includes OS X, text tools tend to have
>>> difficulty with tabs. Or try naming a file with a newline or carriage
>>> retu
On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote:
> On 2010-10-15, Steven D'Aprano
> wrote:
>
>> In the Unix world, which includes OS X, text tools tend to have
>> difficulty with tabs. Or try naming a file with a newline or carriage
>> return in the file name, or a NULL byte.
>
> How do
On 2010-10-15, Steven D'Aprano wrote:
> In the Unix world, which includes OS X, text tools tend to have
> difficulty with tabs. Or try naming a file with a newline or carriage
> return in the file name, or a NULL byte.
How do you create a file with a name that contains a NULL byte?
--
Grant E
On Oct 14, 10:30 pm, Lawrence D'Oliveiro wrote:
> In message , Rhodri James wrote:
>
> > ... frankly putting arbitrary binary into a literal string is rather
> > asking for something like this to come and bite you.
>
> It normally works fine on sensible OSes.
Which OSes would those be? It doesn'
On Fri, 15 Oct 2010 17:30:20 +1300, Lawrence D'Oliveiro wrote:
> In message , Rhodri James wrote:
>
>> ... frankly putting arbitrary binary into a literal string is rather
>> asking for something like this to come and bite you.
>
> It normally works fine on sensible OSes.
What does it have to d
In message , Rhodri James wrote:
> ... frankly putting arbitrary binary into a literal string is rather
> asking for something like this to come and bite you.
It normally works fine on sensible OSes.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Oct 11, 2010 at 3:59 PM, Rhodri James
wrote:
> On Mon, 11 Oct 2010 10:37:09 +0100, bussiere bussiere
> wrote:
>
>
> i've looked on the web and here but i didn't find an answer : here is my
>> code
>>
>> zlib.decompress("""
>> xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà
>> z...@ÑÁÔqÇlxÇÆïpp
>> ~ýVãì゙M6ÛÐ|ê֭ᄁᄂヤ=)}
On Mon, 11 Oct 2010 10:37:09 +0100, bussiere bussiere
wrote:
i've looked on the web and here but i didn't find an answer : here is my
code
zlib.decompress("""
xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà
z...@ÑÁÔqÇlxÇÆïpp~ývãì゙m6ÛÐ|ê֭ᄁᄂヤ=)}éÓUeö3ᄎᄌú"}ʿïÿ÷1þ8ñ́U÷ᄏñíLÒVi:`ᄈᄎL!Ê҆p6-%Fë^ヘ÷à,Q.K!ユô`ÄA!ÑêweÌ
ÊÚAロYøøÂjôóᅠÂcñ
i've looked on the web and here but i didn't find an answer : here is my
code
zlib.decompress("""
xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà
z...@ÑÁÔqÇlxÇÆïpp~ývãì゙m6ÛÐ|ê֭ᄁᄂヤ=)}éÓUeö3ᄎᄌú"}ʿïÿ÷1þ8ñ́U÷ᄏñíLÒVi:`ᄈᄎL!Ê҆p6-%Fë^ヘ÷à,Q.K!ユô`ÄA!ÑêweÌ
ÊÚAロYøøÂjôóᅠÂcñ䊧fᆴùテúN
:nüzAÝ7%ᄌcdUタᄌ3ôPۂタlンyHᆲᄑ$/yzᄒíàヌ'ÕÓ&`|S!<'ᄂ÷Zļᄐ2ホモ;ニ(ÅÛf
En Thu, 11 Mar 2010 06:12:02 -0300, Mihir Patel
escribió:
I am trying to use the subprocess to send the data to child process. I
am not sure why i keep getting "EOFError: EOF when reading a line"
command_line = 'python test_input.py'
p =subprocess.Popen(command_lin
I am trying to use the subprocess to send the data to child process. I
am not sure why i keep getting "EOFError: EOF when reading a line"
i am using Python 2.4.3, GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on
64bit linux ,centos
Thanks
output :
=
Traceback (most recent call las
Terry Reedy wrote:
Hans Mulder wrote:
Errrhm, no. He is not deleting the PyQt4 module from sys.modules;
he's only deleting the name QtGui from his own namespace. Next
time Python comes across
from PyQt4 import QtGui
, it finds that the module PyQt4 already exists in sys.modules, so
Pyth
Simon Forman wrote:
On Thu, Oct 8, 2009 at 1:42 AM, Terry Reedy wrote:
Hans Mulder wrote:
Errrhm, no. He is not deleting the PyQt4 module from sys.modules;
he's only deleting the name QtGui from his own namespace. Next
time Python comes across
from PyQt4 import QtGui
, it finds that th
On Thu, Oct 8, 2009 at 1:42 AM, Terry Reedy wrote:
> Hans Mulder wrote:
>
>> Errrhm, no. He is not deleting the PyQt4 module from sys.modules;
>> he's only deleting the name QtGui from his own namespace. Next
>> time Python comes across
>>
>> from PyQt4 import QtGui
>>
>> , it finds that the
Hans Mulder wrote:
Errrhm, no. He is not deleting the PyQt4 module from sys.modules;
he's only deleting the name QtGui from his own namespace. Next
time Python comes across
from PyQt4 import QtGui
, it finds that the module PyQt4 already exists in sys.modules, so
Python does not have to
On Wed, 07 Oct 2009 02:31:00 -0700, Ryan wrote:
> Thanks everyone for your insight. I'm going to have to agree with the
> paranoid desire to prevent people importing his module and then using
> the
> classes he imports from elsewhere (I'm not ruling out the lead paint
> theory until I can gather m
On Oct 7, 2:31 am, Ryan wrote:
> Thanks everyone for your insight. I'm going to have to agree with the
> paranoid desire to prevent people importing his module and then using
> the
> classes he imports from elsewhere (I'm not ruling out the lead paint
> theory until I can gather more evidence).
I
Ryan wrote:
[] It does beg the question for
me. Consider the example from his code below
from PyQt4 import QtGui
class LauncherWidget( QtGui.QWidget ):
# A Specialization of QWidget
del QtGui
Next time python comes across
from PyQt4 import QtGui
it would have to re-import the class,
On Wed, Oct 7, 2009 at 2:31 AM, Ryan wrote:
> Next time python comes across
>
> from PyQt4 import QtGui
>
> it would have to re-import the class, which seems a waste of cycles
> that could accumulate.
Python only imports modules once. The next time Python comes across that, it
looks in sys.modu
Thanks everyone for your insight. I'm going to have to agree with the
paranoid desire to prevent people importing his module and then using
the
classes he imports from elsewhere (I'm not ruling out the lead paint
theory until I can gather more evidence). It does beg the question for
me. Consider th
Steven D'Aprano wrote:
> import alienmodule
>
> class MyClass(alienmodule.AlienClass):
> do_stuff()
>
> rather than:
>
> from alienmodule import AlienClass
>
> class MyClass(AlienClass):
> do_stuff()
>
> del AlienClass
The original developer may also have been unaware of the ability to
li
On Tue, 06 Oct 2009 10:56:26 -0700, Ryan wrote:
> Good day all!
>
> I've just inherited a large amount of python code. After spending some
> time pour through the code, I've noticed that the original developer
> (who is no longer w/ the company) constantly deletes the imported
> classes at the en
Carl Banks wrote:
On Oct 6, 10:56 am, Ryan wrote:
Good day all!
I've just inherited a large amount of python code. After spending some
time pour through the code, I've noticed that the original developer
(who is no longer w/ the company) constantly deletes the imported
classes at the end of
On Oct 6, 10:56 am, Ryan wrote:
> Good day all!
>
> I've just inherited a large amount of python code. After spending some
> time pour through the code, I've noticed that the original developer
> (who is no longer w/ the company) constantly deletes the imported
> classes at the end of the .py file
Good day all!
I've just inherited a large amount of python code. After spending some
time pour through the code, I've noticed that the original developer
(who is no longer w/ the company) constantly deletes the imported
classes at the end of the .py file. Why would one want to do such a
thing?
Ry
Prasoon wrote:
I modified my code to
#Euler Totient Function
import sys
from math import sqrt
def etf(n):
i,res =2,n
while(i*i<=n):
if(n%i==0):
res-=res/i
while(n%i==0):
n/=i
i+=1
if(n>1):
res-=res/n
return res
def main():
while Tr
> You could do:
>
> while True:
> x = raw_input("Enter x=>")
> if x != "" : break # if you just press enter, raw_input returns an
> empty string
>
> Note that this still leaves out the case when you type something which
> is not a number.
> To cover this case, supposing that you need a float
f(x))
> > > t-=1
>
> > > if __name__ == "__main__":
> > > main()
>
> > > The problem with my code is that whenever I press an extra "Enter"
> > > button instead of getting the cursor moved to the next line.I get
> >
eturn res
>
> > def main():
> > t=input()
> > while(t):
> > x=input()
> > print str(etf(x))
> > t-=1
>
> > if __name__ == "__main__":
> > main()
>
> > The problem with my code is that whenever I press an extra "En
eturn res
>
> > def main():
> > t=input()
> > while(t):
> > x=input()
> > print str(etf(x))
> > t-=1
>
> > if __name__ == "__main__":
> > main()
>
> > The problem with my code is that whenever I press an extra "En
> if __name__ == "__main__":
> main()
>
>
> The problem with my code is that whenever I press an extra "Enter"
> button instead of getting the cursor moved to the next line.I get
> an error
>
> _SyntaxError- EOF while parsing and the program ter
ved to the next line.I get
an error
_SyntaxError- EOF while parsing and the program terminates.._
How should the code be modified so that even after pressing an extra
"Enter" button the cursor get moved to the next line instead to
throwing an exception..
Prasoo
Gabriel Genellina wrote:
> En Sun, 11 Jan 2009 08:12:27 -0200, Barak, Ron
> escribió:
>
>> I googled a bit, and found http://bugs.python.org/issue1355023.
>> It seems that this patch implemented fuller seek() for GzipFile around
>> November 2006 (including whence==2).
>> Do I misunderstand and th
En Sun, 11 Jan 2009 08:12:27 -0200, Barak, Ron
escribió:
I googled a bit, and found http://bugs.python.org/issue1355023.
It seems that this patch implemented fuller seek() for GzipFile around
November 2006 (including whence==2).
Do I misunderstand and this patch was not actually implemented,
7;re familiar with the inner working of gzip settle this issue
?
Is seek from EOF supported for gzip files ?
Source from 2.6.1. Seek from EOF not supported:
def seek(self, offset, whence=0):
if whence:
if whence == 1:
offset = self.offset + offset
e
ive seek
self.rewind()
count = offset - self.offset
for i in range(count // 1024):
self.read(1024)
self.read(count % 1024)
Could any who're familiar with the inner working of gzip settle this issue ?
Is seek from EOF supported for gzip files
En Sun, 28 Dec 2008 10:44:11 -0200, nemo escribió:
My code like this raise an EOFError, It happens if I use the Process
module,
while, if I use thread.start_new_thread(ftp.pwd,()), it seems works
well.
And I wondered why.
from ftplib import FTP
import thread
from multiprocessing import Process
Hi all,
My code like this raise an EOFError, It happens if I use the Process
module,
while, if I use thread.start_new_thread(ftp.pwd,()), it seems works
well.
And I wondered why.
from ftplib import FTP
import thread
from multiprocessing import Process
if __name__ == '__main__':
ftp = FTP('loc
e from a server. But how do I detect EOF ?
Whenever read() method returns empty string/list.
while f1: # When to stop ?
retval = f1.read()
if not retval:
break
f2.write(retval)
Those read() should be read(size) - read() tries to get the whole co
En Fri, 22 Aug 2008 16:53:58 -0300, Wojtek Walczak <[EMAIL PROTECTED]> escribió:
> On Fri, 22 Aug 2008 22:18:37 +0530, Anjanesh Lekshminarayanan wrote:
>
>> Im trying to download a file from a server. But how do I detect EOF ?
>
> Whenever read() method returns empty stri
>> Im trying to download a file from a server. But how do I detect EOF ?
Shouldn't this work as well?
f1 = urllib2.urlopen('ftp://username:[EMAIL PROTECTED]/data.zip')
f2 = file("data.zip", "wb")
while f1: # When to stop ?
try :
f2
On Fri, 22 Aug 2008 22:18:37 +0530, Anjanesh Lekshminarayanan wrote:
> Im trying to download a file from a server. But how do I detect EOF ?
Whenever read() method returns empty string/list.
> while f1: # When to stop ?
retval = f1.read()
if not retval:
break
f2
|Hi
Im trying to download a file from a server. But how do I detect EOF ?
||
import urllib2
f1 = urllib2.urlopen('ftp://username:[EMAIL PROTECTED]/data.zip')
f2 = file("data.zip", "wb")
while f1: # When to stop ?
f2.write(f1.read(1024))
f1.close()
f2.c
korean_dave a écrit :
a = open("Thefile.txt","r")
while ?:
result = a.readln()
I assume you meant "a.readline()" ? Anyway...
what do i put in if i want to keep reading line by line until i
reach the end of the file?
a = open("path/to/file.ext")
for line in a:
do_something_wit
the_file = open(path, 'r')
for this_line in the_file:
#do stuff with this_line
-Steve Johnson
On Jul 24, 2008, at 3:09 PM, korean_dave wrote:
a = open("Thefile.txt","r")
while ?:
result = a.readln()
what do i put in if i want to keep reading line by line until i
reach the e
a = open("Thefile.txt","r")
while ?:
result = a.readln()
what do i put in if i want to keep reading line by line until i
reach the end of the file?
I don't want to break the loop if there is a blank line, because there
will be.
Ex. of a file:
map1
result1
map2
result 2
map3
result
"Matimus" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| On Jun 5, 12:58 pm, maehhheeyy <[EMAIL PROTECTED]> wrote:
| > I'm not sure what it means but it always highlights the last line with
| > nothing on it. My program has 63 lines and it highlights the 64th
| > line. This keeps p
On Jun 5, 12:58 pm, maehhheeyy <[EMAIL PROTECTED]> wrote:
> I'm not sure what it means but it always highlights the last line with
> nothing on it. My program has 63 lines and it highlights the 64th
> line. This keeps popping up whenever I try to run my program. Can you
> please help me fix this?
I'm not sure what it means but it always highlights the last line with
nothing on it. My program has 63 lines and it highlights the 64th
line. This keeps popping up whenever I try to run my program. Can you
please help me fix this?
--
http://mail.python.org/mailman/listinfo/python-list
En Wed, 09 Apr 2008 02:19:47 -0300, erikcw <[EMAIL PROTECTED]>
escribió:
> I keep getting this error from poplib:
> (error_proto(-ERR EOF) line 121 poplib.py
>
> Does this mean the connection has timed out? What can I do to deal
> with it?
If it happens from time to
Hi,
I keep getting this error from poplib:
(error_proto(-ERR EOF) line 121 poplib.py
Does this mean the connection has timed out? What can I do to deal
with it?
Thanks!
Erik
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 24, 12:03 am, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
> class open(file):
> def __init__(self, name):
> self.size = os.stat(name).st_size
> file.__init__(self, name)
> def eof(self):
> return self.tell() == self.size
>
> f = open('tmp
# ==> Empty String
f.eof # ==> True
In other words, don't rely on "f.eof" telling you that there is or is
not more data... on Unix systems, no matter what, you ALWAYS have to
read past EOF to detect it. Languages (like C with FILE*, or Ruby, or
anything else) that detects EOF eit
ZeD wrote:
> Grant Edwards wrote:
>
>> The user-defined xor is operates on "logical" boolean values.
>> The one in the operator module is a bitwise operator.
>
> def xor(a, b):
> return bool(a) ^ bool(b)
>
> seems more explicit to me.
> maybe, to make "more" explicit (too much, onestly...)
>
Grant Edwards wrote:
> The user-defined xor is operates on "logical" boolean values.
> The one in the operator module is a bitwise operator.
def xor(a, b):
return bool(a) ^ bool(b)
seems more explicit to me.
maybe, to make "more" explicit (too much, onestly...)
from operator import xor as b
On 2007-11-26, Boris Borcic <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>> def xor(a, b):
>> return a and not b or b and not a
>
>
> >>> from operator import xor
> >>> help(xor)
> Help on built-in function xor in module operator:
>
> xor(...)
> xor(a, b) -- Same as a ^ b.
Which
[EMAIL PROTECTED] wrote:
> def xor(a, b):
> return a and not b or b and not a
>>> from operator import xor
>>> help(xor)
Help on built-in function xor in module operator:
xor(...)
xor(a, b) -- Same as a ^ b.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 23, 2:06 am, greg <[EMAIL PROTECTED]> wrote:
> There's a fair amount of overhead associated with providing
> the ability to set arbitrary attributes on an object, which
> is almost never wanted for built-in types, so it's not
> provided by default.
>
> You can easily get it if you want it by
t;lazy" scheme which deferred the read until
you tried to do something with the buffer. But they
couldn't completely hide the fact that testing for eof
requires a lookahead.
> Original Pascal uses
>
> f = open(somefile)
> do something with f^
> read(f)
Actually, I think
On Nov 23, 10:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> This is not the same as ISO C. f.tell could be equal to
> File.size(f.path) and eof could be false. An extra read() is required.
My bad. As you might have surmised, I'm not a genius when it comes t
On Nov 24, 2:24 am, MonkeeSage <[EMAIL PROTECTED]> wrote:
>
> Actually, to be a bit more technical, IO#eof acts like standard C eof
> for File objects, it only blocks / requires a previous read() on
> character devices and pipes and such. For files, it's the same as
On Nov 23, 10:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Ruby doesn't have the good ol' eof. Good old eof tests a single flag
> and requires a pre read(). Ruby's eof blocks and does buffering (and
> this is a very strong technical statement
On Nov 22, 1:17 pm, braver <[EMAIL PROTECTED]> wrote:
> Ruby has iterators and generators too, but it also has my good ol'
> f.eof(). I challenge the assumption here of some majectically Python-
Ruby doesn't have the good ol' eof. Good old eof tests a single f
On Nov 23, 6:56 pm, greg <[EMAIL PROTECTED]> wrote:
> By not providing an eof() function, C -- and Python -- make
> it clear that testing for eof is not a passive operation.
> It's always obvious what's going on, and it's much harder to
> make mistakes like the ab
braver wrote:
> Historically, is it possible to trace the eof-related design decision
> in stdlib?
You seem to be assuming that someone started out with a design
that included an eof() of the kind you want, and then decided
to remove it.
But I doubt that such a method was ever considered
On 2007-11-23, braver <[EMAIL PROTECTED]> wrote:
> Can we say that f.eof() in fact can check for EOF right after
> we've read all characters from a file, but before a failed
> attempt to read beyond? In Python's idiom,
>
> for line lin file:
># look at a
1 - 100 of 238 matches
Mail list logo