Just to add a little bit to the mix, I have started having these
problems since I rebuilt my machine (Xubuntu 11) and I changed the
disc formats to ext4 without even thinking about it ... I was
wondering if maybe that had something to do with it?
--
http://mail.python.org/mailman/listinfo/python-l
Thanks for those suggestions.
I tried something last night before I got your ideas.
1. I added a line to send a copy of the report just to me, 2 lines
before the line where it emails the report to all the recipients.
2. I also added a timer.sleep(5) pause just before the line that
emails the repo
11 at 5:46 PM, Astley Le Jasper
> wrote:
>>
>> Any ideas?
>>
>
> Is it possible that the first email is sent before the network connection
> has been properly established?
>
> --
> David
> blog: http://www.traceback.org
> twitter: http://twitter.com/dsta
I have a laptop that wakes up and then runs a script that collects
info and sends an email with a spreadsheet (zipped and about 350KB)
report to a number of people. However, every time I get the following
error:
File "/usr/lib/python2.7/smtplib.py", line 343, in getreply
raise SMTPServerDisco
Thanks for the pointer. I'll have a look into it.
--
http://mail.python.org/mailman/listinfo/python-list
My query isn't specific to Python, but some of you might have been in
a similar position and if there are any technical solutions, I'd
prefer to do it in Python.
I have developed an application using Django and the supporting
documentation needs to be multilingual. This isn't at code level,
rather
> I think you have the same bug as Alf's code, you never merge existing
> groups. Have you tried Arnaud's counterexample?
>
> By the way, are ('a', 'b') and ('b', 'a') to be considered equivalent for
> your problem?
>
> Peter
Hi Peter,
Yes. I realise that this doesn't take into account existing
Thanks all. I was playing around with this and came up with another
solution using dictionaries (... comfort zone ...!!)
<<< Code
>>
from operator import itemgetter
def group_stuff(data):
group_dic = {}
group_id = 0
Thanks for the feedback both. I'll have a look at these.
One of the frustrating things I find about python is that there are so
many modules. There have been times when I've spend ages doing
something and then some has said, "Oh yeah, there is a module for
that".
Anyway. Nearly finished.
Cheers
I have a list of tuples that indicate a relationship, ie a is related
to b, b is related to c etc etc. What I want to do is cluster these
relationships into groups. An item will only be associated with a
single cluster.
Before I started, I wondered if there was any particular tool within
Python I
On Jun 15, 10:44 am, Tim Golden wrote:
> On 15/06/2010 09:32, Astley Le Jasper wrote:
>
> > Does pywin32 use elements from Windows itself, or excel when
> > dispatching?
>
> Yes: it's simply exposing to the Python user the API provided
> by MS Office (or whatever
I'm creating excel docs on the fly using XLWT. However, I need to
include filters which I believe can only be done with pywin32.
Does pywin32 use elements from Windows itself, or excel when
dispatching?
--
http://mail.python.org/mailman/listinfo/python-list
On May 29, 4:10 pm, superpollo wrote:
> Astley Le Jasper ha scritto:
>
>
>
> > This is probably a really silly question but, given the example code
> > at the bottom, how would I get a single list?
>
> > What I currently get is:
>
> > ('id
This is probably a really silly question but, given the example code
at the bottom, how would I get a single list?
What I currently get is:
('id', 20, 'integer')
('companyname', 50, 'text')
[('focus', 30, 'text'), ('fiesta', 30, 'text'), ('mondeo', 30,
'text'), ('puma', 30, 'text')]
('contact', 5
... oh ... that simple. Now I feel dumb.
Thanks!
ALJ
--
http://mail.python.org/mailman/listinfo/python-list
I realise I could roll my own here, but I wondered if there was an
inbuilt version of this?
>.
def default_if_none(*args):
for arg in args:
if arg:
return arg
return None
x = None
y = 5
z = 6
print default_if_none(x,y,z)
>> 5
>
Hi Robin,
It looks like you've been busy. I'm sorry but you are well over my
head at the moment!
:-)
If you need me to test an install then I'd be happy to help. However,
I just received an email from Christoph Gohlke saying:
" ... There are 64 bit versions of Reportlab and PIL for Python 2.6
f
@Robin
Thanks. I thought that this seemed to be a general python thing
because it was effecting both installs. However, after also reading
Martin's comments ...
@Martin
> This is somewhat imprecise: is it
> a) that your CPU is AMD64, and thus supports 64-bit mode, or
> b) that *in addition*, your
I have a Windows 7 (64bit AMD) machine and am having quite a lot of
problems installing Reportlabs and Pil. I wondered if anyone else has
had the same issues and what the best way of dealing with it.
So far I've tried:
1. Reportlabs / Pil 32 installers - I've tried using these but they
can't find
When you say don't forget about the GIL, what should I not be
forgetting? I'm using sqlite and the following:
<<>
thread_lock = threading.RLock()
def db_execute(sql):
thread_lock.acquire()
try:
connection = sqlite3.connect(database_name)
Cheers for the responses.
ALJ
--
http://mail.python.org/mailman/listinfo/python-list
I have a number of threads that write to a database. I have created a
thread lock, but my question is this:
- If one thread hits a lock, do a) all the other threads stop, or b)
just the ones that come to the same lock?
- I presume that the answer is b. In which case do the threads stop
only if the
Gosh ... it's all gone quite busy about logging in, gui etc.
Certainly, I would try to make it clearer what is free and what isn't.
But flash ... using that doesn't bother me. Loggin in ... fine ... I
don't care as long as it's quick and there is something I might want.
i just wanted to know if th
Hi,
I've just stumbled over this (http://showmedo.com/) and being the very
visual person I am, it seems like it could be a good way to learn
about python. However, before I smack down $60, I wondered if anyone
had any opinions on it. My gut feel is that it could be pretty good.
ALJ
--
http://mail
Thanks MRAB.
What do you mean about backslashes?
--
http://mail.python.org/mailman/listinfo/python-list
I want to batch extract files from a directory of zips. The thing is
that the files are excel spreadsheets. I don't want to read them in
python, just dump them as extracted files in another directory.
However, when I do a test the excel file becomes corrupted. Any clues?
>>
On Dec 4, 12:34 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message <[EMAIL PROTECTED]>, Philip
>
> Semanchuk wrote:
> > In my experience, the environment in which a cron job runs is
> > different from the environment in which some command line scripts run...
>
>
On 3 Dec, 19:49, Philip Semanchuk <[EMAIL PROTECTED]> wrote:
> On Dec 3, 2008, at 1:33 PM, Astley Le Jasper wrote:
>
>
>
> > On 3 Dec, 16:41, Philip Semanchuk <[EMAIL PROTECTED]> wrote:
> >> On Dec 3, 2008, at 10:29 AM, Astley Le Jasper wrote:
>
> >
On 3 Dec, 16:41, Philip Semanchuk <[EMAIL PROTECTED]> wrote:
> On Dec 3, 2008, at 10:29 AM, Astley Le Jasper wrote:
>
> > I've included a switch to include or exclude theloggingto console.
> > Whenloggingonly to file, the script runs fine.
>
> > Of course, I
I've included a switch to include or exclude the logging to console.
When logging only to file, the script runs fine.
Of course, I still don't understand why dual logging, and specifically
to the console, causes a problem and if anyone has any comments about
the dual output logging code above then
Ok ... this is odd.
I tried gregory's suggestion of redirecting the stdout & stderr to a
text file. This worked. I could see all the logging information.
However, there was no error to see this time ... the application
worked completely without any problems.
I also then tried Jon's suggestion of
James ... thanks for the suggestion. I have done this and the error
logging usually catches all my errors and logs them. I wondered if
logging itself was failing!
Philip ... thanks also. I did wonder about making the everything
explicit. I've seen that mentioned elsewhere. Writing out the stdout &
I need help ... I've been looking at this every evening for over a
week now. I'd like to see my kids again!
I have script that runs fine in the terminal but when I try to run it
in a crontab for either myself or root, it bails out.
The trouble is that obviously I get no console when using crontab
On 10 Nov, 16:20, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Astley Le Jasper wrote:
> > I have an application that put on an old machine with a fresh Xubuntu
> > installation (with Python 2.5). But I can't get the threading to work
>
> > The application was wri
On 10 Nov, 11:07, Astley Le Jasper <[EMAIL PROTECTED]> wrote:
> Sorry ... that should be:
>
> for sitename in mysites:
> log.info("define thread")
>
> thread_list[sitename]=threading.Thread(name=sitename,target=myproceedure,
> args=(sitename,))
> log
Sorry ... that should be:
for sitename in mysites:
log.info("define thread")
thread_list[sitename]=threading.Thread(name=sitename,target=myproceedure,
args=(sitename,))
log.info("done")
thread_list[sitename].start()
log.info("Started")
--
http://mail.python.org/mailman/listinfo/p
I have an application that put on an old machine with a fresh Xubuntu
installation (with Python 2.5). But I can't get the threading to work
The application was written on a combination of Windows XP and
OpenSuse and has been running without any problems using Eclipse/
Pydev. However, now that I tr
On 8 Nov, 05:39, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Fri, 07 Nov 2008 14:36:52 +0100, Gerhard Häring <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > Astley Le Jasper wrote:
> > > I've been getting errors recently whe
On Nov 7, 6:36 am, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Nov 6, 3:46 pm, Astley Le Jasper <[EMAIL PROTECTED]> wrote:
>
> > I've been getting errors recently when using pysqlite. I've declared
> > the table columns as real numbers to 2 decimal place
I've been getting errors recently when using pysqlite. I've declared
the table columns as real numbers to 2 decimal places (I'm dealing
with money), but when doing division on two numbers that happen to
have no decimal fractions, the results through pysqlite are coming
through as integers. The funn
Thanks for all the responses. That helps.
Ta
ALJ
--
http://mail.python.org/mailman/listinfo/python-list
On 16 Oct, 18:53, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Astley Le Jasper schrieb:
>
>
>
> > On 16 Oct, 16:52, Carsten Haese <[EMAIL PROTECTED]> wrote:
> >> Astley Le Jasper wrote:
> >>> Sorry for the numpty question ...
> &g
On 16 Oct, 16:52, Carsten Haese <[EMAIL PROTECTED]> wrote:
> Astley Le Jasper wrote:
> > Sorry for the numpty question ...
>
> > How do you find the reference name of an object?
>
> > So if i have this
>
> > bob = modulename.objectname()
>
> >
Sorry for the numpty question ...
How do you find the reference name of an object?
So if i have this
bob = modulename.objectname()
how do i find that the name is 'bob'
--
http://mail.python.org/mailman/listinfo/python-list
On 12 Sep, 12:44, Bruno Desthuilliers wrote:
> Astley Le Jasper a écrit :
>
> > I'm still learning python and would like to know what's a good way of
> > organizing code.
>
> > I am writing some scripts to scrape a number of different website that
> >
Can anyone suggest something inthat can process an XPath like the
following:
"/html/body/table[2]/tbody/tr/td[5]/table/tbody/tr[3]/td/table[3]/
tbody/tr[5]/td"
Cheers
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I was a bit limited with time so in the end used an online service
with an API which is great for the limited number of look-ups I
needed. It can be found at:
http://www.nearby.org.uk/
It was also very useful for site for other conversions and lookups.
I manage to find a couple of other exa
47 matches
Mail list logo