[Zope] centos

2008-05-13 Thread Garry Saddington
Does anyone have any experience running Zope on Centos 5. I have some Python 
scripts which just will not work. They work on Windows, Ubuntu, and SuSe but 
just don't do anything on Centos. I have tried various Zope 2.9.0 and 
2.9.6-final, various psycopg connectors and Postgres 8.1 and 8.3.
Here is an example script that works everywhere except Centos(excuse email 
formatting):

request=context.REQUEST
datefrom=request.datefrom
dateto=request.dateto
today = DateTime(datefrom)
end = DateTime(dateto)
auth=request.auth
year=request.year
while today = end:
for result in context.getstudentsbyyear(year=year):
studentid=result.studentid
if context.getday(today=today): #picks out non-weekend days only
   if context.checkholidays(today=today): #picks out holidays
   pass
   else:
   
context.insertabsence(entered=today,auth=auth,studentid=studentid)

today += 1
return b class=redAbsences entered/b

Any ideas because I am getting very frustrated here.
Regards
Garry
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] centos

2008-05-13 Thread Andreas Jung



--On 13. Mai 2008 08:14:05 +0100 Garry Saddington 
[EMAIL PROTECTED] wrote:



Does anyone have any experience running Zope on Centos 5. I have some
Python  scripts which just will not work. They work on Windows, Ubuntu,
and SuSe but  just don't do anything on Centos. I have tried various Zope
2.9.0 and  2.9.6-final, various psycopg connectors and Postgres 8.1 and
8.3. Here is an example script that works everywhere except Centos(excuse
email  formatting):


Such functionality should be (and is) basically independent of the OS.
If there is an issue, debug the script step-by-step using pdb.

-aj

pgpTjUYDCyLWd.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] centos

2008-05-13 Thread Jonathan


- Original Message - 
From: Garry Saddington [EMAIL PROTECTED]

To: zope@zope.org
Sent: Tuesday, May 13, 2008 3:14 AM
Subject: [Zope] centos


Does anyone have any experience running Zope on Centos 5. I have some 
Python
scripts which just will not work. They work on Windows, Ubuntu, and SuSe 
but

just don't do anything on Centos. I have tried various Zope 2.9.0 and
2.9.6-final, various psycopg connectors and Postgres 8.1 and 8.3.
Here is an example script that works everywhere except Centos(excuse email
formatting):

request=context.REQUEST
datefrom=request.datefrom
dateto=request.dateto
today = DateTime(datefrom)
end = DateTime(dateto)
auth=request.auth
year=request.year
while today = end:
   for result in context.getstudentsbyyear(year=year):
   studentid=result.studentid
   if context.getday(today=today): #picks out non-weekend days only
  if context.checkholidays(today=today): #picks out holidays
  pass
  else:

context.insertabsence(entered=today,auth=auth,studentid=studentid)

   today += 1
return b class=redAbsences entered/b


We run Zope 2.9.2 and 2.9.4 on centos 4.3 without any problems.  What error 
is being generated?


Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] centos

2008-05-13 Thread Garry Saddington
On Tuesday 13 May 2008 08:09, Andreas Jung wrote:
 --On 13. Mai 2008 08:14:05 +0100 Garry Saddington

 [EMAIL PROTECTED] wrote:
  Does anyone have any experience running Zope on Centos 5. I have some
  Python  scripts which just will not work. They work on Windows, Ubuntu,
  and SuSe but  just don't do anything on Centos. I have tried various Zope
  2.9.0 and  2.9.6-final, various psycopg connectors and Postgres 8.1 and
  8.3. Here is an example script that works everywhere except Centos(excuse
  email  formatting):

 Such functionality should be (and is) basically independent of the OS.
 If there is an issue, debug the script step-by-step using pdb.
 I have now traced it to the wrong datestyle in zope.conf - a new server and 
only half the brain awake!. It was set to US and we use international so the 
method did not do anything because the entered dates were presented wrongly 
to the database.
Thanks anyway
Garry

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )