In response to Kent's suggestion here is an updated post showing the
python code and the error log. The original reason for using try was
I thought maybe this was scoping problem and that maybe 2nd time
through the call it needed to import it again from scratch. As a side
observation for Ke
Thank you for your replies.I think lockfile is a good solution.
Kent, I have python 2.2.3 running on my server (not my choice) could you
tell me which module(s) I could use to access cron. Otherwise the only other
relavent way I can access my sever is Secure Shell Access (SSH). And what
about for
I don't know what the problem is but here are some things that might help:
- don't catch the exception, let it print out. Send the traceback to the
list.
- note you never reload siberia900 - in the load function the reload
fails for an unknown reason and at the interpreter prompt you reload
myte
Lawrence Shafer wrote:
> What is the difference between "from name import *" and "import name"?
http://effbot.org/pyfaq/tutor-whats-the-difference-between-import-foo-and-from-foo-import.htm
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python
Tom wrote:
> So all my ideas for how to record task x as 'done', like using shelve
> or writing a log file etc are not sufficient because, I need an 'atomic
> read/ write action' (I think that's the jargon).
A couple of ideas:
- Michael's file lock
- lockfile is another way to lock files
http://
pierre cutellic wrote:
> Hi,
> I wrote this script to select some data from a csv file.
> Actually it writes it into a file but i would like to append it into an
> existing one to a specific line without removing existing code.
> does the open(' filename.csv','a+') can do that?
>
> ag =
On 05/11/2007, SwartMumba snake <[EMAIL PROTECTED]> wrote:
> Hi
>
> I would like to know which is the best module to use, with regard to my
> needs:
>
> - I would like to read an image off a website
> e.g. http://www.examplecom/image/1/PNG/
>
> - I would then like to read the pixels and do other th
What is the difference between "from name import *" and "import name"?
The reason I ask is because I was using the former, and switched to the
latter only to find out "NameError: global name 'name' is not defined"
and I think using the latter is going to fix another problem I have. I
just want
Hi
I would like to know which is the best module to use, with regard to my needs:
- I would like to read an image off a website
e.g. http://www.examplecom/image/1/PNG/
- I would then like to read the pixels and do other things to the image
I am currently using python 2.5
Thanks in advance . .
I'm writing a simple modelling environment that provides a GUI for
dynamically coupling fortran and C subroutines to solve a science
problem. The GUI and environment glue are all python. One thing I
want to do is allow the user to load a python file that provides the
user defined details on
Varsha Purohit wrote:
> Hello everyone,
>I wanted to know what are the differences between perl and
> python, since both of them are scripting languages...
There is plenty of difference between them and between all the other
scripting languages. Look beyond the notion of "scripting" and
Hello everyone,
I wanted to know what are the differences between perl and
python, since both of them are scripting languages...
thanks
--
Varsha,
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
You don't need an atomic read and write, you need a blocking file lock
mechanism. This page explains them and how to use them:
http://www.voidspace.org.uk/python/pathutils.html#file-locking
--Michael
On 11/4/07, Tom <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to write a cron/ task sche
On 11/4/07, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
>
> * linda.s (Sun, 4 Nov 2007 01:39:46 -0800)
> > On Nov 2, 2007 1:03 AM, ALAN GAULD <[EMAIL PROTECTED]> wrote:
> > > > > >I want to run an .exe file and get the output many times.
> > > >> Given that I know that you know about loops I have to
Remember to seek to the end of the file before you start writing. See:
http://mail.python.org/pipermail/python-list/2000-August/048839.html
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi,
I wrote this script to select some data from a csv file.
Actually it writes it into a file but i would like to append it into an
existing one to a specific line without removing existing code.
does the open('filename.csv','a+') can do that?
here is the existing code:
*import csv
import sys
Hi,
I am trying to write a cron/ task scheduler like system for my website. The
users of my site and also more than one external rss feed reader request my
scripts regularly and I'd like to insert code in each script that
will decide whether to run a scheduled task or not.
It would go something l
* linda.s (Sun, 4 Nov 2007 01:39:46 -0800)
> On Nov 2, 2007 1:03 AM, ALAN GAULD <[EMAIL PROTECTED]> wrote:
> > > > >I want to run an .exe file and get the output many times.
> > >> Given that I know that you know about loops I have to
> > >> ask what you see as the problem?
> > >
> > >I want to run
John wrote:
> Thanks,
>
> One last question (okay, one MORE question ;) ) when you call a
> method/function with optionaly *args **kwargs, I'm finding I need to
> make the statement like;
>
> def myFunc(self, *args,**kwargs):
> do something
>
>
> In ord to pass the kwargs:
> myFunc(**kw
Thanks,
One last question (okay, one MORE question ;) ) when you call a
method/function with optionaly *args **kwargs, I'm finding I need to make
the statement like;
def myFunc(self, *args,**kwargs):
do something
In ord to pass the kwargs:
myFunc(**kwargs) # where kwargs is a dictionary
or f
John wrote:
> I've now written my first set of Classes to do some fairly specific
> processing for work I do. I have a few questions.
>
> First, in looking through what I've done, I basically just incorporated
> all my previous scripts into classes... they are still highly specific
> to my app
John wrote:
> Does anyone know why the script below works fine (in regards to the
> 'source function') but when I try to uncomment the line from mymod
> import source and use it that way without defining the function in the
> script, I get an error that N_id does not exist. It must have somethin
"John" <[EMAIL PROTECTED]> wrote
> I've now written my first set of Classes to do some fairly specific
> processing for work I do. I have a few questions.
>
> First, in looking through what I've done, I basically just
> incorporated all
> my previous scripts into classes... they are still highly
Does anyone know why the script below works fine (in regards to the 'source
function') but when I try to uncomment the line from mymod import source and
use it that way without defining the function in the script, I get an error
that N_id does not exist. It must have something to do with namespace
I've now written my first set of Classes to do some fairly specific
processing for work I do. I have a few questions.
First, in looking through what I've done, I basically just incorporated all
my previous scripts into classes... they are still highly specific to my
application, though I did try t
On Nov 2, 2007 1:03 AM, ALAN GAULD <[EMAIL PROTECTED]> wrote:
> > > >I want to run an .exe file and get the output many times.
> >> Given that I know that you know about loops I have to
> >> ask what you see as the problem?
> >
> >I want to run it many times and export all the output to a text file
26 matches
Mail list logo