[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

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

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

Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Asad Habib
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 that Java uses to define an object. Also

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

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 does

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 pdf

Re: [Zope] Saving a Rendered DTML Document

2005-12-07 Thread Asad Habib
, Chris 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

[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

[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

[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

[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: dtml-call REQUEST.set('parentFolder', PARENTS[2].id + 'Test') dtml-call REQUEST.get('parentFolder').initialize_vars() I get the following error: Error Type: AttributeError

[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 Mac OS X. Also

Re: [Zope] Re: PHPGateway Issues

2005-12-01 Thread Asad Habib
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 Asad Habib

[Zope] Re: PHPGateway Issues

2005-12-01 Thread Asad Habib
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 anyone else on the Zope group has experienced a similar problem

[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] 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

Re: [Zope] Error Executing runzope Command

2005-11-29 Thread Asad Habib
, 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 Mac OS X Tiger and I

[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

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 find

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,

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

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

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 render

Re: [Zope] Passing Parameters to External Methods

2005-11-17 Thread Asad Habib
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('/Applications/Plone2

[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 script using

[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] 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

Re: [Zope] Traceback Lines for Send Mail Error

2005-07-25 Thread Asad Habib
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__ Module Products.MailHost.SendMailTag, line 116

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

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 the mail

[Zope] Send Mail Tag

2005-07-22 Thread Asad Habib
My current Zope setup uses SSL and FastCGI. For some reason, dtml-sendmail 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

[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

[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: dtml-var _.string.replace(testString, _.chr(10), 'br /') For this string, I want to replace both newlines and carriage returns

[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

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? Any

[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

[Zope] Exiting a Loop

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

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 to exit

[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

[Zope] Session Variable Error

2005-04-28 Thread Asad Habib
I have a session variable called 'undergraduateProjectsDirected' that I declare using the following syntax: dtml-call REQUEST.SESSION.set('undergradProjectsDirected', [ ]) When I try to append items to this list variable, I get the following error: AttributeError: 'NoneType' object has no

Re: [Zope] Session Variable Error

2005-04-28 Thread Asad Habib
wrote: --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: dtml-call REQUEST.SESSION.set('undergradProjectsDirected', [ ]) When I try

Re: [Zope] Session Variable Error

2005-04-28 Thread Asad Habib
of the session vars are completely different.. so why should this work? -aj --On Donnerstag, 28. April 2005 13:56 Uhr -0400 Asad Habib [EMAIL PROTECTED] wrote: Actually, it does exist as I mentioned in my original message. If it did not exist, then dtml-var REQUEST.SESSION would yield a value

[Zope-dev] Changing the Appearance of the Contents of a Local File System Object

2003-12-12 Thread Asad Habib
Hello. I have a folder that I have created at the root level and inside this folder I have placed one Local File System object. The Local File System object contains two File objects. When I view the Local File System object by clicking on the 'View' option provided by the management interface, I

[Zope-dev] Environment for Python Development

2003-12-12 Thread Asad Habib
Hello. Do any of you know of an IDE(preferably open source) that I can use to develop/debug/test python code in? Thanks. - Asad ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML

[Zope-dev] Creating a Zope Product

2003-12-12 Thread Asad Habib
Does anyone know how to create a Zope Product? One example would be the Local File System Object that I am using. If you could point me to some resources that would be great. Thanks. - Asad ___ Zope-Dev maillist - [EMAIL PROTECTED]

[Zope-dev] Changing the Appearance of a Local File System Object

2003-12-11 Thread Asad Habib
Hello. I have a folder that I have created at the root level and inside this folder I have placed one Local File System object. The Local File System object contains two File objects. When I view the Local File System object by clicking on the 'View' option provided by the management interface, I

[Zope-dev] Information on ZpdfDocument and Zpdf

2003-12-02 Thread Asad Habib
Hello. I am looking for extensive documentation on both ZpdfDocument and Zpdf. I checked out www.zope.org but did not find anything substantial on these products. Your help would be greatly appreciated. Thanks. -Asad __ Do you Yahoo!? Free Pop-Up Blocker - Get it

[Zope-dev] Testing a value returned from a Zope Python Script

2003-02-04 Thread Asad Habib
Hello. I am trying to test a value returned from a Python script using the following syntax: dtml-if expr=dtml-call expr=checkRowLength(fileObject_index, rowLength) == 0 /dtml-if checkRowLength is the name of the script. Apparently Zope flags me with an error saying that this is an invalid

[Zope-dev] Creating a variable in a DTML method that may be modified

2003-02-04 Thread Asad Habib
Hello. Does anyone know how to create a variable in a DTML method which may be updated by a Python script? I am currently using the set method of the REQUEST object to create a variable. However, creating a variable in this fashion renders it permanent. Any help would be appreciated. Thanks.

[Zope-dev] Running Python Scripts via the Management Interface

2003-02-03 Thread Asad Habib
Hello. Does anyone know why the following script stalls when I run it in Zope's Management Interface using the 'Test' command? context.manage_addProperty(propertyId, propertyValue, propertyType) All it does is add a property to a folder. The script does function properly and doesn't stall when

[Zope-dev] Adding Properties to Folder Objects via a Zope Python Script

2003-01-30 Thread Asad Habib
Hi. I was wondering whether any of you know if it is possible to create properties for Folder objects using a Zope Python script that can then be invoked from a DTML method. I know that this is possible using Zope's management interface, but this procedure is not scalable. Any input would be