On Tue, Dec 1, 2020 at 5:36 AM Dennis Lee Bieber wrote:
> Off-hand, since you aren't explicitly using "del lf" it means that
> __del__() is being called during the process shutdown. Thing is, there is
> no guarantee during shutdown of when things are deleted. There is a faint
> possibility
On 11/29/20, Chris Angelico wrote:
>
> This seems like a really REALLY bad idea. You're putting a lot of work
> into your __del__ function, and that's not getting called until
> everything's shutting down. (Also, xrange doesn't exist, hence the
> "exception ignored" thing.)
>
> Avoid putting this
On 30/11/2020 10:36, Gabor Urban wrote:
Hi guys,
I tried to solve the problem once again. I have inserted some print
statements the check the variables.
The actual code (naplo.py) is copy-pasted here:
Thanks = helpful
+1 @Chris' response!
Meantime, what happens if you start python, and ent
On Mon, Nov 30, 2020 at 8:37 AM Gabor Urban wrote:
> class Naplo:
> def __del__(self):
> if self.sor != 0:
> if self.start:
> trc = open(self.logNev,self.startMode)
> else:
> trc = open(self.logNev,self.mode)
> for idx
Hi guys,
I tried to solve the problem once again. I have inserted some print
statements the check the variables.
The actual code (naplo.py) is copy-pasted here:
class Naplo:
def __init__(self, pNeve, pMeret, pMode = 'a'):
self.logNev = pNeve
self.meret = pMeret
Gabor Urban wrote at 2020-11-29 08:56 +0100:
>I am facing an issue I was not able to solve yet. I have a class saving
>messages to a file. The relevant code is:
>
>
>
>import OS
>import sys
>
>class MxClass:
>
>def __init__(self, fName, fMode,):
>self.fileName = fName
>s
On 29/11/2020 20:56, Gabor Urban wrote:
Hi,
I am facing an issue I was not able to solve yet. I have a class saving
messages to a file. The relevant code is:
import OS
if you're wanting the Python Standard Library, this should not be in
upper-case
import sys
are these two imports
Hi,
I am facing an issue I was not able to solve yet. I have a class saving
messages to a file. The relevant code is:
import OS
import sys
class MxClass:
def __init__(self, fName, fMode,):
self.fileName = fName
self.fileMode = fMode
def writeMetho
On 4/5/2015 1:45 PM, Alexey Izbyshev wrote:
Hello!
I've hit a strange problem that I reduced to the following test case:
* Run several python processes in parallel that spin in the following loop:
while True:
if os.path.isfile(fname):
with open(fname, 'rb') as f:
f.read()
On 04/05/2015 01:45 PM, Alexey Izbyshev wrote:
Hello!
I've hit a strange problem that I reduced to the following test case:
* Run several python processes in parallel that spin in the following loop:
while True:
if os.path.isfile(fname):
with open(fname, 'rb') as f:
f.read()
On Mon, Apr 6, 2015 at 3:45 AM, Alexey Izbyshev wrote:
> The test case is attached, the main file is test.bat. Python is expected to
> be in PATH. Stderr of readers is redirected to *.log. You may need to run
> several times to hit the issue.
You have an interesting-looking problem, but the attac
Hello!
I've hit a strange problem that I reduced to the following test case:
* Run several python processes in parallel that spin in the following
loop:
while True:
if os.path.isfile(fname):
with open(fname, 'rb') as f:
f.read()
break
* Then, run another process that creates a t
On 20/06/11 08:14:14, Florencio Cano wrote:
This works:
infile=open('/foo/bar/prog/py_modules/this_is_a_test','r')
This doesn't:
infile=open('~/prog/py_modules/this_is_a_test','r')
Can't I work with files using Unix expressions?
You can use the glob module:
http://docs.python.org/library/glob
On Sun, 19 Jun 2011 23:00:38 -0700, Tim Hanson wrote:
> This works:
> infile=open('/foo/bar/prog/py_modules/this_is_a_test','r')
>
> This doesn't:
> infile=open('~/prog/py_modules/this_is_a_test','r')
>
> Can't I work with files using Unix expressions?
The argument is treated literally, just li
On Sun, Jun 19, 2011 at 11:00 PM, Tim Hanson wrote:
> Using linux and Python 2.6, learning how to work with files from a Windows
> oriented textbook:
>
> This works:
> infile=open('/foo/bar/prog/py_modules/this_is_a_test','r')
>
> This doesn't:
> infile=open('~/prog/py_modules/this_is_a_test','r')
On Mon, 2011-06-20 at 08:14 +0200, Florencio Cano wrote:
> > This works:
> > infile=open('/foo/bar/prog/py_modules/this_is_a_test','r')
> >
> > This doesn't:
> > infile=open('~/prog/py_modules/this_is_a_test','r')
> >
> > Can't I work with files using Unix expressions?
>
> You can use the glob mod
> This works:
> infile=open('/foo/bar/prog/py_modules/this_is_a_test','r')
>
> This doesn't:
> infile=open('~/prog/py_modules/this_is_a_test','r')
>
> Can't I work with files using Unix expressions?
You can use the glob module:
http://docs.python.org/library/glob.html#module-glob
--
http://mail.p
Using linux and Python 2.6, learning how to work with files from a Windows
oriented textbook:
This works:
infile=open('/foo/bar/prog/py_modules/this_is_a_test','r')
This doesn't:
infile=open('~/prog/py_modules/this_is_a_test','r')
Can't I work with files using Unix expressions?
--
http://mail.
Thanks a lot!
Youngung
On Fri, Jul 9, 2010 at 10:17 PM, Eli Bendersky wrote:
> On Fri, Jul 9, 2010 at 16:07, Youngung Jeong
> wrote:
> > Thank you for your kindness.
> > I found you're right. It's running in that folder.
> > What should I do for making this work?
> > Could you please tell me
On Fri, Jul 9, 2010 at 16:07, Youngung Jeong wrote:
> Thank you for your kindness.
> I found you're right. It's running in that folder.
> What should I do for making this work?
> Could you please tell me a bit more...
>
> Youngung
You can change the "current directory" ipython executes in, by eit
> One of the many things I tried, is as below.
>
> *
>
>
> f=open('od.txt','w')
> ---
> IOError Traceback (most recent call
> last)
>
> C:\Window
Hello pythoners!
I just dived into ipython since I'd like to make use of matplotlib.
Over the trials, I came across a problem.
One of the scripts that I have is not working with ipython, while it
has been and still is working well with Python GUI.
The problem is, even though I have the file in th
On 6/18/2010 4:26 PM, Justin Park wrote:
The problem is simple.
I have 50taxa2HGT_1.txt in the current directory,
and I can open it using any text editor (which indicates there actually
is.)
And I can read it in Python using
fd=open("./50taxa2HGT_1.txt", "r")
, and it actually got opened, beca
On Fri, 18 Jun 2010 17:22:00 -0400
"D'Arcy J.M. Cain" wrote:
> By the way, your email address doesn't work. I get a "relay access
> denied" message.
Ignore that. It was a local problem that I fixed before sending but
forgot to remove this paragraph.
--
D'Arcy J.M. Cain | Democracy i
On Fri, 18 Jun 2010 15:26:14 -0500
Justin Park wrote:
> But when I change the file access mode into "a",
> it returns an error message of "IOError: [Errno 9] Bad file descriptor. "
Exact test script and traceback please. I would like to see what line
gives you the error. Are you trying to read
Justin Park wrote:
The problem is simple.
I have 50taxa2HGT_1.txt in the current directory,
and I can open it using any text editor (which indicates there actually
is.)
And I can read it in Python using
fd=open("./50taxa2HGT_1.txt", "r")
, and it actually got opened, because I can do
for line
On Fri, Jun 18, 2010 at 2:26 PM, Justin Park wrote:
> But when I change the file access mode into "a",
> it returns an error message of "IOError: [Errno 9] Bad file descriptor. "
>
> What have I done wrong?
"a" is for appending only. You can't read from a file opened in that
mode. If you want t
The problem is simple.
I have 50taxa2HGT_1.txt in the current directory,
and I can open it using any text editor (which indicates there actually
is.)
And I can read it in Python using
>>> fd=open("./50taxa2HGT_1.txt", "r")
, and it actually got opened, because I can do
>>> for line in fd:
...
Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Apr 6, 8:41 am, [EMAIL PROTECTED] wrote:
> > I'm trying to minimise the overheads of a small Python utility, I'm
> > not really too fussed about how fast it is but I would like to
> > minimise its loading effect on the system as it could be called lots
>
On Apr 6, 8:41 am, [EMAIL PROTECTED] wrote:
> I'm trying to minimise the overheads of a small Python utility, I'm
> not really too fussed about how fast it is but I would like to
> minimise its loading effect on the system as it could be called lots
> of times (and, no, I don't think there's an eas
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On 6 avr, 15:41, [EMAIL PROTECTED] wrote:
> > I'm trying to minimise the overheads of a small Python utility, I'm
> > not really too fussed about how fast it is but I would like to
> > minimise its loading effect on the system as it could be called lot
On 6 avr, 15:41, [EMAIL PROTECTED] wrote:
> I'm trying to minimise the overheads of a small Python utility, I'm
> not really too fussed about how fast it is but I would like to
> minimise its loading effect on the system as it could be called lots
> of times (and, no, I don't think there's an easy
I'm trying to minimise the overheads of a small Python utility, I'm
not really too fussed about how fast it is but I would like to
minimise its loading effect on the system as it could be called lots
of times (and, no, I don't think there's an easy way of keeping it
running and using the same copy
On Feb 4, 10:43 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Feb 4, 6:51 pm,mcl<[EMAIL PROTECTED]> wrote:
>
>
>
> > I am obviously doing something stupid or not understanding the
> > difference between HTML file references and python script file
> > references.
>
> > I am trying to create a
On Feb 4, 6:51 pm, mcl <[EMAIL PROTECTED]> wrote:
> I am obviously doing something stupid or not understanding the
> difference between HTML file references and python script file
> references.
>
> I am trying to create a thumbnail of an existing .jpg file. It is in
> the directory 'temp', which is
I am obviously doing something stupid or not understanding the
difference between HTML file references and python script file
references.
I am trying to create a thumbnail of an existing .jpg file. It is in
the directory 'temp', which is below my script
I can display the file with , but Image.ope
Claudio Grondi wrote:
> Tim Peters wrote:
>> [Claudio Grondi]
>>
>>> Here an example of what I mean
>>> (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte
>>> large file):
>>>
>>> >>> f = file('veryBigFile.dat','r')
>>> >>> f = file('veryBigFile.dat','r+')
>>>
>>> Traceback (m
Fredrik Lundh wrote:
> Tim Peters wrote:
>
>
>>>Traceback (most recent call last):
>>> File "", line 1, in -toplevel-
>>> f = file('veryBigFile.dat','r+')
>>>IOError: [Errno 2] No such file or directory: 'veryBigFile.dat'
>>>
>>>Is it a BUG or a FEATURE?
>>
>>Assuming the file exists and is
Tim Peters wrote:
>> Traceback (most recent call last):
>>File "", line 1, in -toplevel-
>> f = file('veryBigFile.dat','r+')
>> IOError: [Errno 2] No such file or directory: 'veryBigFile.dat'
>>
>> Is it a BUG or a FEATURE?
>
> Assuming the file exists and isn't read-only, I bet it's a Wi
Tim Peters wrote:
> [Claudio Grondi]
>
>> Here an example of what I mean
>> (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte
>> large file):
>>
>> >>> f = file('veryBigFile.dat','r')
>> >>> f = file('veryBigFile.dat','r+')
>>
>> Traceback (most recent call last):
>>File
Tim Peters wrote:
> Assuming the file exists and isn't read-only, I bet it's a Windows
> bug, and that if you open in binary mode ("r+b") instead I bet it goes
> away (this wouldn't be the first large-file text-mode Windows bug).
> dir bigfile.dat
2006-08-28 11:46 5 000 000 000 bigfile.dat
[Claudio Grondi]
> Here an example of what I mean
> (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte
> large file):
>
> >>> f = file('veryBigFile.dat','r')
> >>> f = file('veryBigFile.dat','r+')
>
> Traceback (most recent call last):
>File "", line 1, in -toplevel-
>
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Claudio Grondi wrote:
>
>
>>Here an example of what I mean
>>(Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte
>>large file):
>>
>> >>> f = file('veryBigFile.dat','r')
>> >>> f = file('veryBigFile.dat','r+')
>
>
> Yo
In <[EMAIL PROTECTED]>, Claudio Grondi wrote:
>
> Here an example of what I mean
> (Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte
> large file):
>
> >>> f = file('veryBigFile.dat','r')
> >>> f = file('veryBigFile.dat','r+')
You mention the file size and gave a "speaking
Here an example of what I mean
(Python 2.4.2, IDLE 1.1.2, Windows XP SP2, NTFS file system, 80 GByte
large file):
>>> f = file('veryBigFile.dat','r')
>>> f = file('veryBigFile.dat','r+')
Traceback (most recent call last):
File "", line 1, in -toplevel-
f = file('veryBigFile.dat','r+')
>>> That also pops up a command shell window, which may not be
>>> desirable. On Windows, there is
>>> os.startfile("someknown.type")
Ack. You're right. I get them mixed up. And os.startfile is Windows
only.
Sorry.
rd
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>In <[EMAIL PROTECTED]>,
>BartlebyScrivener wrote:
>
It would probably break like mad under *nix
>>
>> I bet it would work the same way on linux or os x; it's the equivalent
>> of double-clicking on the file.
In <[EMAIL PROTECTED]>,
BartlebyScrivener wrote:
>>> It would probably break like mad under *nix
>
> I bet it would work the same way on linux or os x; it's the equivalent
> of double-clicking on the file.
No it doesn't work. Double clicking is not an OS thing but a a GUI thing.
Ciao,
>> It would probably break like mad under *nix
I bet it would work the same way on linux or os x; it's the equivalent
of double-clicking on the file.
rd
--
http://mail.python.org/mailman/listinfo/python-list
BartlebyScrivener wrote:
> don't know Jython, but in Python, I think you want:
>
> import os
>
> os.system('mytextfile.txt')
>
> Whatever file you reference should open in the application associated
> with it. At least that's the way it works on Win XP
>
> rd
I didn't think about that. It would pr
don't know Jython, but in Python, I think you want:
import os
os.system('mytextfile.txt')
Whatever file you reference should open in the application associated
with it. At least that's the way it works on Win XP
rd
--
http://mail.python.org/mailman/listinfo/python-list
I'm writing a GUI application in Jython which takes a database text
file and performs some operations on the data, finally spitting out a
group of CSV files.
I generate a log file and several CSV files and I thought it would be
helpful if I could add a button the user could click on to
automatical
"spike grobstein" write:
> I understand why it wasn't working and it makes sense based on the
> structure of namespaces that python defines, however, I'm just
> surprised that there isn't some kind of built-in facility for dealing
> with these types of things.
>
> Module packages are a spectacular
I understand why it wasn't working and it makes sense based on the
structure of namespaces that python defines, however, I'm just
surprised that there isn't some kind of built-in facility for dealing
with these types of things.
Module packages are a spectacular idea, it is just kinda easy to get
c
spike grobstein wrote:
> so, since python supports module packages like it does, you'd think
> that it would have ways of making add-on or extension modules to be
> more self contained.
Errm... You're not quite understanding what the problem is about. A class is
just an object. A class object may
oh, wow. that works!!!
thanks for the help!
so, since python supports module packages like it does, you'd think
that it would have ways of making add-on or extension modules to be
more self contained.
Thanks, again!
--
http://mail.python.org/mailman/listinfo/python-list
spike grobstein wrote:
> I'd like the packages to define a file path for supporting files
> (graphics, etc) that are stored inside the package. The problem is that
> the superclass's definition (stored elsewhere) has all of the code for
> actually opening the files, so when I use the
> os.path.dirn
So, I've got this project I'm working on where the app defines various
classes that are subclassed by module packages that act like plugins...
I'd like the packages to define a file path for supporting files
(graphics, etc) that are stored inside the package. The problem is that
the superclass's d
On 3 Dec 2004 08:38:37 -0800, ed <[EMAIL PROTECTED]> wrote:
> I do have permission toa ccess the file as that file is careted and read my
> me.
> I have read/write access to that location. regards
That shouldn't be really hard. :)
okay imagine you have a file called test.txt in C:\Python24\
now
59 matches
Mail list logo