[Zope] Session Variable Error

2005-04-28 Thread Asad Habib
I have a session variable called 'undergraduateProjectsDirected' that I declare using the following syntax: When I try to append items to this list variable, I get the following error: AttributeError: 'NoneType' object has no attribute 'append' I know for a fact that this variable exists since

Re: [Zope] Session Variable Error

2005-04-28 Thread Asad Habib
> --On Donnerstag, 28. April 2005 13:44 Uhr -0400 Asad Habib > <[EMAIL PROTECTED]> wrote: > > > I have a session variable called 'undergraduateProjectsDirected' that I > > declare using the following syntax: > > > > > > > > When I try t

Re: [Zope] Session Variable Error

2005-04-28 Thread Asad Habib
t('undergraduateProjectsDirected')).append([student_name, > description])"> > > Of course it does not work because in both cases the names of the session > vars are completely different.. > so why should this work? > > -aj > > > > --On Donnerstag, 28. Ap

[Zope] Z SQL Methods and the SQL LIMIT clause

2005-05-11 Thread Asad Habib
Is there a reason why Z SQL methods do not allow the use of the LIMIT clause? I am absolutely certain that my query has the right syntax since I executed it against the MySQL server and it gave me the correct results. FYI, I have provided the query below: SELECT course_id FROM course WHERE course_

[Zope] Exiting a Loop

2005-06-15 Thread Asad Habib
Is there a way to exit a based loop? I searched numerous resources but did not find anything on this topic that relates to the tag. Any help would be greatly appreciated. Thanks. - Asad ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/l

Re: [Zope] Exiting a Loop

2005-06-15 Thread Asad Habib
Yes, I should not be doing this but I am using DTML not ZPT and since DTML provides programming functionality and in this case the ability to loop, there should be a way to exit a loop as well. - Asad On Wed, 15 Jun 2005, J Cameron Cooper wrote: > Asad Habib wrote: > > Is there a way

[Zope] Checking for an Integer Argument

2005-06-30 Thread Asad Habib
Is there any way to check if an argument is an integer in Python? Offcourse, there is the int function but it chokes when passed an argument that is not a string and then the user is inconvenienced (it throws a ValueError to be specific). I guess I could check each digit of the integer to determine

[Zope] Z MySQL Database Connections

2005-07-13 Thread Asad Habib
I have two Z MySQL database connection objects that I have to use in the same DTML method. How do I specify that I want to use one or the other? Any help would be appreciated. Thanks. - Asad ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailma

Re: [Zope] Z MySQL Database Connections

2005-07-13 Thread Asad Habib
Hello. Please disregard my previous message as this is specified in the Z SQL method. Thanks. - Asad On Wed, 13 Jul 2005, Asad Habib wrote: > I have two Z MySQL database connection objects that I have to use in the > same DTML method. How do I specify that I want to use one or the other?

[Zope] String Replacement Function

2005-07-14 Thread Asad Habib
Is it possible to replace more than 1 type of character in a string simultaneously? If so, what is the correct syntax for this? I am currently using the following: ')"> For this string, I want to replace both newlines and carriage returns (_.chr(13)) with the break tag. Any help would be appreci

[Zope] Passing a variable to RESPONSE.redirect

2005-07-15 Thread Asad Habib
Is it possible to pass a variable to RESPONSE.redirect or does the page name have to be a literal string? I was unable to pass in a variable via the REQUEST object (i.e. REQUEST.get('pageName')) or the SESSION attribute of the REQUEST object (i.e. REQUEST.SESSION.get('pageName')). Any help would be

[Zope] Send Mail Tag

2005-07-22 Thread Asad Habib
My current Zope setup uses SSL and FastCGI. For some reason, is no longer working for me. The error I get is the following: Exception Type gaierror Exception Value (7, 'No address associated with nodename') I have confirmed the name of our mail server with IT staff so the problem is not in the

[Zope] Traceback Lines for Send Mail Error

2005-07-22 Thread Asad Habib
If it helps, the last lines in the traceback are as follows: Module DocumentTemplate.DT_String, line 474, in __call__ Module Products.MailHost.SendMailTag, line 116, in render Module Products.MailHost.MailHost, line 125, in send Module Products.MailHost.MailHost, line 144, in _send Module smtplib,

Re: [Zope] Traceback Lines for Send Mail Error

2005-07-25 Thread Asad Habib
. Any help would be appreciated. Thanks. - Asad On Sun, 24 Jul 2005, Dieter Maurer wrote: > Asad Habib wrote at 2005-7-22 09:19 -0400: > >If it helps, the last lines in the traceback are as follows: > > > >Module DocumentTemplate.DT_String, line 474, in __call__ > >Modu

Re: [Zope] Traceback Lines for Send Mail Error

2005-07-25 Thread Asad Habib
Maurer, I am certain that this is a Zope issue that has not been figured out as yet. I was even able to connect to my SMTP server via the Terminal application on a Mac. Do I have any other options? - Asad ___ Zope maillist - Zope@zope.org http://mail.

Re: [Zope] Traceback Lines for Send Mail Error

2005-07-25 Thread Asad Habib
Thanks Dieter. You hit the nail on the head. socket.gethostname() is not returning the full canonical name of the machine. But how do I correct this? Any idea? - Asad On Mon, 25 Jul 2005, Dieter Maurer wrote: > Asad Habib wrote at 2005-7-25 09:24 -0400: > >Well, nothing has changed in

[Zope] Database Connections

2005-08-10 Thread Asad Habib
Has anyone had problems with Zope hanging on to database connections? I am using MySQL with Zope and when I last checked there were 25 connections (both active and sleeping connections included). I only have 5 Zope database objects so I don't know how so many connections were created. Any help woul

[Zope] htmltopdf

2005-11-14 Thread Asad Habib
Has anyone successfully used htmltopdf, a PHP script written by Jason Rust (www.rustyparts.com) to convert an HTML file to PDF, with Zope? In particular, I wanted to find out if anyone had used the python equivalent of this PHP script. I am currently in the process of trying this and if anyone

[Zope] Passing Parameters to External Methods

2005-11-16 Thread Asad Habib
Hello. I am trying to use the Python version of the PHP script written by Jason Rust called 'HTML_ToPDF.php'. I have represented this script using an External Method since it uses functions, such as open, which cannot be used in Zope Python scripts for security reasons. The python code for the

Re: [Zope] Passing Parameters to External Methods

2005-11-16 Thread Asad Habib
Hi Cameron. You are right but the self parameter is implicitly passed. - Asad On Wed, 16 Nov 2005, J Cameron Cooper wrote: Asad Habib wrote: Hello. I am trying to use the Python version of the PHP script written by Jason Rust called 'HTML_ToPDF.php'. I have represented this scrip

Re: [Zope] Passing Parameters to External Methods

2005-11-17 Thread Asad Habib
ng the request object as well as hard-coding them in but in both cases a pdf is not generated and there is no traceback. The code for my External Method is as follows: # Added by Asad Habib to allow use as an External Method from Zope def createHtmlToPdf(self): return html2pdf('/Applicat

Re: [Zope] HTML to PDF.

2005-11-23 Thread Asad Habib
Fernando, take a look at HTML_ToPDF (www.rustyparts.com). It's free and it works. - Asad On Wed, 23 Nov 2005, Fernando Lujan wrote: Andreas Jung wrote: --On 23. November 2005 16:08:42 -0200 Fernando Lujan <[EMAIL PROTECTED]> wrote: Chris Withers wrote: A tool to do what, specificall

Re: [Zope] HTML to PDF.

2005-11-23 Thread Asad Habib
Fernando. There is a python equivalent of the PHP script HTML_ToPDF.php that you can use as well. And it's free as well! - Asad On Wed, 23 Nov 2005, Fernando Lujan wrote: Andreas Jung wrote: --On 23. November 2005 16:45:00 -0200 Fernando Lujan <[EMAIL PROTECTED]> wrote: Yes and I fou

Re: [Zope] HTML to PDF.

2005-11-23 Thread Asad Habib
No need to bake a pie when you can buy one at the grocery store! Asad :) On Wed, 23 Nov 2005, Andreas Jung wrote: --On 23. November 2005 17:05:36 -0200 Fernando Lujan <[EMAIL PROTECTED]> wrote: Yes... I saw this tool. But the company wants a python solution for this... :( Then bake o

Re: [Zope] HTML to PDF.

2005-11-23 Thread Asad Habib
Absolutely! Google is a man's best friend. - Asad On Wed, 23 Nov 2005, Tino Wildenhain wrote: Am Mittwoch, den 23.11.2005, 14:29 -0500 schrieb Asad Habib: No need to bake a pie when you can buy one at the grocery store! You can? Where is the store where I can buy the python wrapped r

[Zope] Zope Version

2005-11-28 Thread Asad Habib
How do I determine which version of Plone/Zope I am using? Is there a version file somewhere in the Zope hierarchy? I can't seem to find one. Any help would be appreciated. Thanks. - Asad ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman

RE: [Zope] Zope Version

2005-11-28 Thread Asad Habib
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Asad Habib Sent: November 28, 2005 3:54 PM To: zope@zope.org Subject: [Zope] Zope Version How do I determine which version of Plone/Zope I am using? Is there a version file somewhere in the Zope hierarchy? I can't seem to

[Zope] Error Executing runzope Command

2005-11-29 Thread Asad Habib
Hello. I just installed Zope 2.7.0 on Mac OS X Tiger and I running it with MacPython 2.3.3. I installed Zope in /usr/local. Now, when I try to execute './runzope' or './zopectl start', I receive the following error: Fatal Python error: PyThreadState_Get: no current thread Has anyone experience

Re: [Zope] Error Executing runzope Command

2005-11-29 Thread Asad Habib
ine 19, in ? from zope.interface import Interface ImportError: No module named zope.interface Why is this module missing? - Asad On Tue, 29 Nov 2005, Andreas Jung wrote: --On 29. November 2005 10:43:23 -0500 Asad Habib <[EMAIL PROTECTED]> wrote: Hello. I just installed Zope 2.7.0 on Ma

[Zope] PHPGateway Issues

2005-11-30 Thread Asad Habib
Hello. I am trying to use PHPGateway with Zope but I get the following error: '/usr/bin/php' may not be a PHP-CGI program. The result from the program is empty(0 byte). Also, sometimes I get the error 'File Not Found' that is thrown by the browser. Has anyone successfully used this product

[Zope] Re: PHPGateway Issues

2005-12-01 Thread Asad Habib
Hello Wei. Okay, please keep me posted when you determine what the problem is. If anyone else on the Zope group has experienced a similar problem, please let me know. Thanks. On Thu, 1 Dec 2005, Wei He wrote: Quoting Asad Habib <[EMAIL PROTECTED]>: Hello. The message came from Ma

Re: [Zope] Re: PHPGateway Issues

2005-12-01 Thread Asad Habib
p would be greatly appreciated. - Asad On Thu, 1 Dec 2005, Asad Habib wrote: Hello Wei. Okay, please keep me posted when you determine what the problem is. If anyone else on the Zope group has experienced a similar problem, please let me know. Thanks. On Thu, 1 Dec 2005, Wei He wrote: Quoting

[Zope] Re: PHPGateway Issues

2005-12-01 Thread Asad Habib
;[EMAIL PROTECTED]' is a mailing list of some PHParser/PHPGateway users. Does anyone on the list have some experiences on running PHParser on Mac OS X? Quoting Asad Habib <[EMAIL PROTECTED]>: Hello Wei. Okay, please keep me posted when you determine what the problem is. If anyo

[Zope] Accessing a Subfolder of a Parent Folder

2005-12-05 Thread Asad Habib
How do I access the subfolder of a parent folder? I am using the following but cannot seem to access the folder object: I get the following error: Error Type: AttributeError Error Value: 'str' object has no attribute 'initialize_vars' I understand that a DTML method cannot be called on a st

[Zope] Saving a Rendered DTML Document

2005-12-06 Thread Asad Habib
Hello. I have a DTML document which contains some DTML, but mostly HTML. I want to save the HTML contents of this DTML document once it is rendered by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e. this document will only contain HTML offcourse and must be since it will b

[Zope] Saving a Rendered DTML Document

2005-12-06 Thread Asad Habib
Hello. I have a DTML document which contains some DTML, but mostly HTML. I want to save the HTML contents of this DTML document once it is rendered by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e. this document will only contain HTML offcourse and must be since it will b

Re: [Zope] Saving a Rendered DTML Document

2005-12-07 Thread Asad Habib
Withers wrote: Is there any particular reason why you posted this message twice, 5 hrs apart? Asad Habib wrote: Hello. I have a DTML document which contains some DTML, but mostly HTML. I want to save the HTML contents of this DTML document once it is rendered by Zope (i.e. once the DTML is

[Zope] Broken Pipe Error

2005-12-07 Thread Asad Habib
I am using Maik Jablonski's python script to convert from html to pdf in conjunction with the htmldoc product. FYI, I am running Mac OS X Tiger. When I run the script, I get the following error which is being generated by line 20 of the script: IOError: [Errno 32] Broken pipe line 20 is as fo

Re: [Zope] Saving a Rendered DTML Document

2005-12-08 Thread Asad Habib
2005, Robert (Jamie) Munro wrote: Asad Habib wrote: Hello. I have a DTML document which contains some DTML, but mostly HTML. I want to save the HTML contents of this DTML document once it is rendered by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e. this document will only

Re: [Zope] Saving a Rendered DTML Document

2005-12-08 Thread Asad Habib
Hello. Thanks for your input. I tried doing this but it didn't work. - Asad On Thu, 8 Dec 2005, Robert (Jamie) Munro wrote: Asad Habib wrote: Hello. The PHP script that I use relies on a path to locate the HTML file on the file system and since the DTML document is a Zope object, it

Re: [Zope] Saving a Rendered DTML Document

2005-12-08 Thread Asad Habib
dtml method, so that the html file on the file system stays in sync with the dtml method. hth Jonathan - Original Message - From: "Asad Habib" <[EMAIL PROTECTED]> To: "Robert (Jamie) Munro" <[EMAIL PROTECTED]> Cc: Sent: Thursday, December 08, 2005 9:34

Re: [Zope] Broken Pipe Error

2005-12-08 Thread Asad Habib
Hi Dieter. Thanks for the input. Why would the reader die, though? I am running Mac OS X Tiger, if that helps any. Thanks. - Asad On Thu, 8 Dec 2005, Dieter Maurer wrote: Asad Habib wrote at 2005-12-7 16:47 -0500: I am using Maik Jablonski's python script to convert from html to p

Re: [Zope] Java vs Zope

2006-01-03 Thread Asad Habib
From my experience, Java development has been a lot faster when applications have middle to high level complexity. Since Java is inherently object-oriented, reusability is much easier to achieve then when using Zope. Also, Java has mature development and debugging environments and well organize

Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Asad Habib
Well, the class is simply a construct that Java uses to define an object. Also, the concept of object is well defined in Java which makes it easier for the programmer to know what can and cannot be done. In Python, it is not as explicit. Java is a programming language and hence cannot be compar

Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Asad Habib
traction and inheritance are well defined in Java. Also, both compiled and interpreted languages have their advantages and disadvantages. - Asad On Fri, 6 Jan 2006, Lennart Regebro wrote: On 1/6/06, Asad Habib <[EMAIL PROTECTED]> wrote: Well, the class is simply a construct tha

Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Asad Habib
le applications (the keywork here is I, not everyone) does not mean that you have to insult me. - Asad On Fri, 6 Jan 2006, bruno desthuilliers wrote: Asad Habib wrote: (top-post corrected) - Asad On Fri, 6 Jan 2006, bruno desthuilliers wrote: Rocky Burt wrote: (snip) In fact I'd

[Zope] Structured Text Question

2006-01-25 Thread Asad Habib
Is there any way to have multiple lines of empty space between two sections of text in a Structured Text document? I looked on Google but did not find any answers to this question. However, I did notice that others had asked the question as well. Is this a shortcoming of Structured Text? Any he

RE: [Zope] Structured Text Question

2006-01-25 Thread Asad Habib
Well, this decision was not made by me and I cannot override it. Given that I have to use Structured Text, is there a solution to this problem? Thanks. - Asad On Wed, 25 Jan 2006, Jaroslav Lukesh wrote: Is there any way to have multiple lines of empty space between two sections of text in a