[Zope] I've added you as a friend on Facebook...

2007-10-11 Thread Allen Huang
I've requested to add you as a friend on Facebook.  You can use Facebook to see 
the profiles of the people around you, share photos, and connect with friends.

Thanks,
Allen

Here's the link:
http://www.facebook.com/p.php?i=587615679k=53L2Y2SRQWTBWEA1XB4Trv=2

___
This e-mail may contain promotional materials. If you do not wish to receive 
future commercial mailings from Facebook, please click on the link below. 
Facebook's offices are located at 156 University Ave., Palo Alto, CA 94301.

http://www.facebook.com/o.php?u=587509028k=dd0ab0

___
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 )


[Zope] mass editing timeout problem

2007-03-22 Thread Allen Huang
I made a python product for a photo album and I have store a lot of pictures.
But the problem arise when I have too many pictures of high resoution that 
taken up too much hdd space so I have written some codes in dtml and python to 
resize and reduces each image size in zodb without download any pictures.

I written my code so it informs me on dos command prompt about what picture it 
is processing and how long it took until starts the next one. The process 
started fast, but it gradually slows down and eventually my web browser (my 
interface to start the process) timeout  but the command prompt is still 
running. I waited until the command prompt finish all the picture and click 
open the picture in zope and no action was done on any pictures that was 
supposely to be resized. 

I try the same process but targeted only one folder (less pictures)and the 
process worked fine and all the picture were resized accordingly and the web 
browser didn't timeout.

How come nothing happened when the browser timeout??


 

Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html ___
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 )


[Zope] catalog aware not working.. help

2007-03-20 Thread Allen Huang
I made a pyhon product with catalogaware as one of my base class but my 
zcatalog named 'catalog' doesn't automatically catalog when I add a product 
item. what could be a problem?

Please help

this is part of my code that include catalogawareness:

class ShpTypePointClass(Item, Persistent, Implicit, CatalogAware):
#print ShpTypePointClass
id='ShpTypePoint'
meta_type='ShpTypePoint'
manage_options = (
{ 'label':'Properties','action':'manage_editShpTypePoint' },
) + Item.manage_options

#_properties=(
#{ 'id':'title', 'type':'string', 'mode':'w'},
#{ 'id':'x', 'type':'string', 'mode':'w'},
#{ 'id':'y', 'type':'string', 'mode':'w'}
#)

def __init__(self, id, x, y, dbfInfo):
#print 'initializing'
self.id = id
self.x = x
self.y = y
self.dbfInfo = dbfInfo
self.reindex_object()
def printPoint(self):
#print print Point
return br printPoint Method br ID: + self.id +  -- (  + self.x  
+ ,  + self.y +  )
def edit(self, x, y, REQUEST=None):
Edit the Point
#print edit
self.x = x
self.y = y
self.reindex_object()
if REQUEST is not None:
return self.manage_editShpTypePoint(self, REQUEST)
##Web Methods
index_html = HTMLFile('DTML/index_html', globals())
manage_editShpTypePoint = HTMLFile('DTML/manage_editShpTypePoint', 
globals())
InitializeClass(ShpTypePointClass)


 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097___
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 )


[Zope] adding files and folder in a object during generation

2007-03-14 Thread Allen Huang
I created an external product using python to creates a folderish object. 
During object instantiation by 
manage_addProduct(self, id, ..): 
I wish to add a couple of empty files and folder. 
 
I tried 
self.manage_addFolder('folderID', , 'folderName') 
but it just create a folder outside of the object.
I tried
id.manage_addFolder('folderID', , 'folderName') 
but id is a str and does not have manage_addFolder
I tried 
self.getitem(id).manage_addFolder('folderID', , 'folderName')
_.getitem(id) is a method I frequently used in DTML but it didn't work in 
python.
 
what expression do I use to replace with self so ZOPE will create folders and 
files in the newly generated object?


 

Looking for earth-friendly autos? 
Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/___
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] adding files and folder in a object during generation

2007-03-14 Thread Allen Huang
Could anyone give me any examples?


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Thursday, March 15, 2007 1:23:14 PM
Subject: Re: [Zope] adding files and folder in a object during generation


--On 14. März 2007 22:18:06 -0700 Allen Huang [EMAIL PROTECTED] wrote:

 I created an external product using python to creates a folderish object.
 During object instantiation by  manage_addProduct(self, id,
 ..):
 I wish to add a couple of empty files and folder.

Such tasks belong into manage_afterAdd() or should be implemented using the 
lately introduced event-based notification mechanism.

-aj


 

TV dinner still cooling? 
Check out Tonight's Picks on Yahoo! TV.
http://tv.yahoo.com/___
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] have problem with managing objects within a external product

2007-03-11 Thread Allen Huang
Dear AJ, 

Thanks, but I still have some problems with creating a Folderish Object product

I imported Folder from OFS.Folder but I wasn't able to add any products like 
File, Folder, Image with in my folderish object.

my code looks like this--

class ShpProjectClass(Item, Folder, Persistent, Implicit, CatalogAware):
id = 'ShpProject'
meta_type = 'ShpProject'
manage_options = (
{'label':'Contents', 'action':'manage_main'},
{'label':'Properties', 'action':'manage_editShpProjectForm'},
{'label':'View', 'action':'index_html'},
) + Item.manage_options

def __init__(self, id, projectDesc = 'Test Project'):
 Initialize a ShpProject Object 
self.id = id
self.projectDesc = projectDesc

def getProjectInfo(self):
 print a ShpProject Object Info 
return 'This project is called: ' + self.id + '. This project is about 
' + self.projectName + '.'

def edit(self, projectDesc, REQUEST=None):
 edit a ShpProject Object 
self.projectDesc = projectDesc
if REQUEST is not None:
return self.index_html(self, REQUEST)

##Web Methods
index_html = HTMLFile('DTML/index_html', globals())
manage_editShpProjectForm = HTMLFile('DTML/manage_editShpProjectForm', 
globals())

InitializeClass(ShpProjectClass)

what else am I missing? and is using ObjectManager unsave in anyway?


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Friday, March 9, 2007 4:05:16 PM
Subject: Re: [Zope] have problem with managing objects within a external product


--On 9. März 2007 00:01:50 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I made a simple product using python that stores some varibles, but I
 couldn't make it acts like a folderish, stores objects, and have a
 content tab page using manage_main like when I use to have when I use
 internal product.

 I reviewed the tutorials on how to make internal products and I found the
 base class modules ObjectManager and PropertySheets under OFS folder but
 I really ahve no idea how to use them.

 So it I want my product to act like an internally made product with
 baseclass ObjectManager, CatalogAware, and use propertysheets to manage
 my attributes and control what object type I want to store,

 would importing ObjectManager, PropertySheets, CatalogAware baseclass be
 enough?

For folderish content you derive from ObjectManager or for being on the 
safe side from OFS.Folder

from OFS.Folder import Folder

class MyType(Folder):

  meta_type= 'MyType'



.

IntiializeClass(MyType)

-aj


 

Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html ___
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] have problem with managing objects within a external product

2007-03-11 Thread Allen Huang
Hi. 
 
I found out what my problem is.
in my code I please baseclass Item before Folder
 class ShpProjectClass(Item, Folder, Persistent, Implicit, CatalogAware):
when I change the order, it worked normally
 class ShpProjectClass(Folder, Item, Persistent, Implicit, CatalogAware):
but I don't understand why? could someone explain this to me?


- Original Message 
From: Allen Huang [EMAIL PROTECTED]
To: Zope zope@zope.org
Sent: Monday, March 12, 2007 10:31:27 AM
Subject: Re: [Zope] have problem with managing objects within a external product


Dear AJ, 
 
Thanks, but I still have some problems with creating a Folderish Object product
 
I imported Folder from OFS.Folder but I wasn't able to add any products like 
File, Folder, Image with in my folderish object.
 
my code looks like this--
 
class ShpProjectClass(Item, Folder, Persistent, Implicit, CatalogAware):
id = 'ShpProject'
meta_type = 'ShpProject'
manage_options = (
{'label':'Contents', 'action':'manage_main'},
{'label':'Properties', 'action':'manage_editShpProjectForm'},
{'label':'View', 'action':'index_html'},
) + Item.manage_options

def __init__(self, id, projectDesc = 'Test Project'):
 Initialize a ShpProject Object 
self.id = id
self.projectDesc = projectDesc
 
def getProjectInfo(self):
 print a ShpProject Object Info 
return 'This project is called: ' + self.id + '. This project is about 
' + self.projectName + '.'
 
def edit(self, projectDesc, REQUEST=None):
 edit a ShpProject Object 
self.projectDesc = projectDesc
if REQUEST is not None:
return self.index_html(self, REQUEST)
 
##Web Methods
index_html = HTMLFile('DTML/index_html', globals())
manage_editShpProjectForm = HTMLFile('DTML/manage_editShpProjectForm', 
globals())
 
InitializeClass(ShpProjectClass)

what else am I missing? and is using ObjectManager unsave in anyway?
 
 
- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Friday, March 9, 2007 4:05:16 PM
Subject: Re: [Zope] have problem with managing objects within a external product


--On 9. März 2007 00:01:50 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I made a simple product using python that stores some varibles, but I
 couldn't make it acts like a folderish, stores objects, and have a
 content tab page using manage_main like when I use to have when I use
 internal product.

 I reviewed the tutorials on how to make internal products and I found the
 base class modules ObjectManager and PropertySheets under OFS folder but
 I really ahve no idea how to use them.

 So it I want my product to act like an internally made product with
 baseclass ObjectManager, CatalogAware, and use propertysheets to manage
 my attributes and control what object type I want to store,

 would importing ObjectManager, PropertySheets, CatalogAware baseclass be
 enough?

For folderish content you derive from ObjectManager or for being on the 
safe side from OFS.Folder

from OFS.Folder import Folder

class MyType(Folder):

  meta_type= 'MyType'



.

IntiializeClass(MyType)

-aj





Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
___
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 )


 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121___
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 )


[Zope] have problem with managing objects within a external product

2007-03-09 Thread Allen Huang
I made a simple product using python that stores some varibles, but I couldn't 
make it acts like a folderish, stores objects, and have a content tab page 
using manage_main like when I use to have when I use internal product.

I reviewed the tutorials on how to make internal products and I found the base 
class modules ObjectManager and PropertySheets under OFS folder but I really 
ahve no idea how to use them.

So it I want my product to act like an internally made product with baseclass 
ObjectManager, CatalogAware, and use propertysheets to manage my attributes and 
control what object type I want to store, 

would importing ObjectManager, PropertySheets, CatalogAware baseclass be enough?


 

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html ___
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 )


[Zope] can someone help me with PIL

2007-02-28 Thread Allen Huang
Can some one show me two example with using PIL module in ZOPE

1. creating an image from inputed data an safe into zope
for example: given x,y,r as a center coordinate and radius and draw a 
circle and save it as circle.jpg

2. read an exisiting image, edit it, and save it
for example: read circle.jpg and add a letter A in the center of the 
circle and save it as circleA.jpg


 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com___
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] need advice on mass data processing

2007-01-09 Thread Allen Huang
Sorry Andreas..

My product is rewritten in python placed in the product folder. So yes, it is a 
instance of a class. 

In the future, I will be storing more data into one instance from other dbase 
file (The total columns may vary).

I'm still in the developing stage and this is just a test run to know that is 
the length of processing time I'm look at. I want each entry to be an instance 
because I'm planning to create other interactive functions (edit and 
query(ZCatalog maybe, I'm not sure yet) and more ) for particular info.

I've never thought of using a BTree because I don't know enough about it. I'll 
look into it but will BTree still be a better choice than making instance if 
I'm going to make interactive functions?

Any other suggestions?



- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Tuesday, January 9, 2007 1:55:34 PM
Subject: Re: [Zope] need advice on mass data processing


--On 8. Januar 2007 19:28:32 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I have a data file that has over 11 entry of 3 column data (string,
 float, float)
 currently I have written my program so it will do an entry by entry
 processing with zope. This operation is like this
 1. read data (the data file)
 2. create product (a python product that store three field data: one
 string and two float data) 3. update product (update the three field
 entries)

Please name things the right way. A Product is basically a Zope/Python 
package that contains definitions of classes, scripts, templates etc.

You mean instances of a particular class?


 when I first tried it out with the first 1000 entries it took about 30
 seconds. That means its going to take 50 ~ 60 minutes for 11 entries.

You're creating 110k instances for storing a string and two floats?
If yes, that's stupid idea.

You can persistent large amounts of data within a single instances
by using Zope BTrees.

 It not every day that you have to process over 11 data entries but
 processing over 60 minutes is still kind of long.


What kind of processing?

-aj

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] need advice on mass data processing

2007-01-09 Thread Allen Huang
There is other solution that uses RDBMS to what I'm trying to do, and I'm 
considering using PostGreSQL after. But before that, I want to using ZOPE and 
ZODB because I feel this could work. 
 
But in ZOPE vs RDBMS, why do you consider RDBMS first, why not ZOPE? can your 
give me the pros and cons in your perspective?


- Original Message 
From: Jonathan [EMAIL PROTECTED]
To: zope@zope.org
Sent: Tuesday, January 9, 2007 9:21:18 PM
Subject: Re: [Zope] need advice on mass data processing


- Original Message - 
From: Andrew Milton [EMAIL PROTECTED]
To: Andreas Jung [EMAIL PROTECTED]
Cc: Zope zope@zope.org
Sent: Tuesday, January 09, 2007 4:21 AM
Subject: Re: [Zope] need advice on mass data processing


 +---[ Andreas Jung ]--
 |
 | Sorry, but you are misusing Zope. Put your data into a RDBMS and be the
 | happiest man in the world. The ZODB is not a data toilet. Nothing more
 | to add from my side on this particular issue.

 I concur.

One caveat though... if you want to be able to do a text search on the 
string portion of your data, then ZCatalog would be an appropriate tool.


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 )

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] need advice on mass data processing

2007-01-08 Thread Allen Huang
I have a data file that has over 11 entry of 3 column data (string, float, 
float)
 
currently I have written my program so it will do an entry by entry processing 
with zope. This operation is like this
 
1. read data (the data file)
2. create product (a python product that store three field data: one string and 
two float data)
3. update product (update the three field entries)
 
when I first tried it out with the first 1000 entries it took about 30 seconds. 
That means its going to take 50 ~ 60 minutes for 11 entries. 

It not every day that you have to process over 11 data entries but 
processing over 60 minutes is still kind of long.

So I was wondering if anyone could propose a different method of doing this.

Love to heard any replies...

Allen

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] saving/creating an object to an exsisting folderish object

2007-01-07 Thread Allen Huang
'name' is a string obj
I have a exsisting folder

name == folder.getId()

say I want to use manage_addFile('point', 'a point') into this folder with the 
getId() == name

but I can't do name.manage_addFile('point', 'a point') because 'name' is a str 
object

so how do I create a file inside a folder whose id is 'name'?


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Sunday, January 7, 2007 3:39:39 PM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object


--On 6. Januar 2007 21:28:06 -0800 Allen Huang [EMAIL PROTECTED] wrote:


 is there a method that uses 'name'(a str object) as an argument to call
 upon this folder?

to call upon this folder? No idea what you mean.

-aj

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] saving/creating an object to an exsisting folderish object

2007-01-07 Thread Allen Huang
I don't have a problem with manage_addProduct(). I know how it works. Creating 
objects in a folder is not a problem to me.
My problem is the folderish object which I'm trying to find with a string input.

If you've read my previous message,  
the server output error with name.manage_addFile('point', 'a point') because 
name is a str object and does not have manage_addFile.
I understand this.
But name is an id to an exsisting folder that I want to access and do operation 
inside.

how would I modify name.manage_addFile('point', 'a point') into a working 
statement?

- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Sunday, January 7, 2007 4:06:27 PM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object


--On 7. Januar 2007 00:02:21 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 'name' is a string obj
 I have a exsisting folder

 name == folder.getId()

 say I want to use manage_addFile('point', 'a point') into this folder
 with the getId() == name

 but I can't do name.manage_addFile('point', 'a point') because 'name' is
 a str object

 so how do I create a file inside a folder whose id is 'name'?



here is a german FAQ:

http://www.zope.de/dokumentation/faqs/entwicklung/PythonScripts/add_product/?searchterm=manage_add*

Google for manage_addProduct() or search on zope.org

-aj

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] saving/creating an object to an exsisting folderish object

2007-01-07 Thread Allen Huang
I found the solution...   use _.getitem(name)

this took some book flipping through some basic methods of zope modules in 'The 
Book of ZOPE' by Beehive. A pretty good book for beginners


- Original Message 
From: Allen Huang [EMAIL PROTECTED]
To: zope@zope.org
Sent: Sunday, January 7, 2007 5:00:03 PM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object


I don't have a problem with manage_addProduct(). I know how it works. Creating 
objects in a folder is not a problem to me.
My problem is the folderish object which I'm trying to find with a string input.
 
If you've read my previous message,  
the server output error with name.manage_addFile('point', 'a point') because 
name is a str object and does not have manage_addFile.
I understand this.
But name is an id to an exsisting folder that I want to access and do operation 
inside.
 
how would I modify name.manage_addFile('point', 'a point') into a working 
statement?

- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Sunday, January 7, 2007 4:06:27 PM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object


--On 7. Januar 2007 00:02:21 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 'name' is a string obj
 I have a exsisting folder

 name == folder.getId()

 say I want to use manage_addFile('point', 'a point') into this folder
 with the getId() == name

 but I can't do name.manage_addFile('point', 'a point') because 'name' is
 a str object

 so how do I create a file inside a folder whose id is 'name'?



here is a german FAQ:

http://www.zope.de/dokumentation/faqs/entwicklung/PythonScripts/add_product/?searchterm=manage_add*

Google for manage_addProduct() or search on zope.org

-aj



__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] saving/creating an object to an exsisting folderish object

2007-01-07 Thread Allen Huang
Will... I just found out that I'm suppose to migrate to ZPT. But, I start with 
DTML to begin with and I've be doing it for the past two years, so it's kind 
hard for me to move on to xml and ZPT right off the bat. 
 
But the tag:attribute structure still confuses me. 

 
Anyways, thanks for all your help Andreas, couldn't done it without you forcing 
me to think about my problem.



- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Monday, January 8, 2007 4:39:32 AM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object


--On 7. Januar 2007 08:07:28 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I found the solution...   use _.getitem(name)

 this took some book flipping through some basic methods of zope modules
 in 'The Book of ZOPE' by Beehive. A pretty good book for beginners

Why (the hell) are you (still) using DTML (as newbie). You are strongly
encouraged to use ZPT.

-aj

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] problem with createing a product object using dtml

2007-01-06 Thread Allen Huang
I created a product using python scripting and worked fine when I create it 
from the pulldown add menu. But when I try to use

  dtml-let number=sequence-index
   dtml-with manage_addProduct['ShpType']
dtml-call 
REQUEST.set('id',readShpPoint(shpPath,number)[0])
dtml-call 
REQUEST.set('x',readShpPoint(shpPath,number)[1])
dtml-call 
REQUEST.set('y',readShpPoint(shpPath,number)[2])
dtml-call manage_addShpTypePoint
   /dtml-with
  /dtml-let

it didn't create an product object.

what am I missing here??


ShpType - the product name

readShpPoint - external method

manage_adShpTypePoint - constructor method in the 
product.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] problem with createing a product object using dtml

2007-01-06 Thread Allen Huang
Thanks for Replying Andreas..
but I found the problem... it was at the dtml-call manage_addShpTypePoint

I forget that I was calling a python method that required 4 argument in the 
parenthesis.

If I were to do it using python scripting (do you mean internal or external 
methods or python scripting) what would it look like?



- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Saturday, January 6, 2007 9:52:36 PM
Subject: Re: [Zope] problem with createing a product object using dtml


--On 6. Januar 2007 05:50:10 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I created a product using python scripting and worked fine when I create
 it from the pulldown add menu. But when I try to use

   dtml-let number=sequence-index
dtml-with manage_addProduct['ShpType']
 dtml-call
 REQUEST.set('id',readShpPoint(shpPath,number)[0])
 dtml-call REQUEST.set('x',readShpPoint(shpPath,number)[1])
 dtml-call REQUEST.set('y',readShpPoint(shpPath,number)[2])
 dtml-call manage_addShpTypePoint
/dtml-with
   /dtml-let

 it didn't create an product object.


Sorry but your code is nonsense. Use a PythonScript instead.
There is no need to use DTML at this point.

-aj

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] saving/creating an object to an exsisting folderish object

2007-01-06 Thread Allen Huang
This is a problem a got a lot and I never able to seem to solve it. 
I want save or create a object to a specific folder or other folderish object, 
I ask the user for the id of that folder or folderish object
I store the id name in a variable 'name'

the problem is I know the type of the folder or folderish object but 'name' is 
a str object and I can't use command like name.manage_addFile().
The server just tells me that name is a str which contains no function 
manage_addFile().

I always end up doing a 
dtml-in objectValues(['Folder'])
dtml-if getId() == name
do something
/dtml-if
/dtml-in


this is very ineffecient when you have a lot of data. Is there a ways I could 
do something like getFolder( name ).doSomething(). Is there anything like 
that in dtml?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] saving/creating an object to an exsisting folderish object

2007-01-06 Thread Allen Huang
dear Andreas

make my question short.
I have a string object 'name' and it is a name of an exsiting folder
is there a method that uses 'name'(a str object) as an argument to call upon 
this folder? 



- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Saturday, January 6, 2007 10:20:16 PM
Subject: Re: [Zope] saving/creating an object to an exsisting folderish object


--On 6. Januar 2007 06:17:40 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 This is a problem a got a lot and I never able to seem to solve it.
 I want save or create a object to a specific folder or other folderish
 object,  I ask the user for the id of that folder or folderish
 object I store the id name in a variable 'name'

 the problem is I know the type of the folder or folderish object but
 'name' is a str object and I can't use command like name.manage_addFile().
 The server just tells me that name is a str which contains no function
 manage_addFile().

 I always end up doing a
 dtml-in objectValues(['Folder'])
 dtml-if getId() == name
 do something
 /dtml-if
 /dtml-in



Please take the advice and learn Python. Such logic should be implemented
in Python and *not* in DTML. DTML/ZPT are for presentation *only*, not for
implementing business logic.

-aj

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] The product I made isn't in the product management page

2007-01-03 Thread Allen Huang
I got it to work.. thank a lot everyone, couldn't hav done it without you guys.


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Maciej Wisniowski [EMAIL PROTECTED]; Allen Huang [EMAIL PROTECTED]
Cc: Zope zope@zope.org
Sent: Wednesday, January 3, 2007 3:13:48 PM
Subject: Re: [Zope] The product I made isn't in the product management page


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 3. Januar 2007 07:59:23 +0100 Maciej Wisniowski 
[EMAIL PROTECTED] wrote:


 What is the problem here?

 As Marco said use SimpleItem as base class and
 add:

 from Globals import InitializeClass
 (...)
 InitializeClass(helloClass)

 to helloModule.py.

 You'll need security declarations too.

 Take may take a look at
 http://www.upfrontsystems.co.za/courses/zope/ch04.html



In addition: look at the Zope Developer Guide. You need to read the docs
before starting trial-and-error programming.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFm1esCJIWIbr9KYwRAoBdAJ0am9MXaaFEIerfy7LchFM/e+XB4gCgkcq8
/uW0/m1+bwfWceu/3qgX0y8=
=30W2
-END PGP SIGNATURE-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] about make products

2007-01-02 Thread Allen Huang
I starting to use Zope 2.9 and I'm told not to use ZClass anymore. Instead of 
make products with in zope, I should make products using python coding and 
place it in the product folder. But I don't know zope modules will enough to 
make my own product. 

Where should I start?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] The product I made isn't in the product management page

2007-01-02 Thread Allen Huang
thanks for repling Marco.
 
I'm using a window version of zope and linux command 'zopectl fg' doesn't work.
 
what is the forground command in windows? Is the run in console the same as 
forground??



- Original Message 
From: Marco Bizzarri [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]
Cc: Zope zope@zope.org
Sent: Wednesday, January 3, 2007 11:48:59 AM
Subject: Re: [Zope] The product I made isn't in the product management page


Two suggestions:

1) run zope in foreground, so that you can see if Zope is complaining
about your project;

2) make helloClass derive from OFS.SimpleItem.SimpleItem.

Regards
Marco

On 1/3/07, Allen Huang [EMAIL PROTECTED] wrote:



 I'm using Zope 2.8.8 and I trying to make my own product.



 Whenever I make a product with errors in the python coding, I could see my
 product name registered in the product management page. But when I fix all
 the error, the product disappears; it not in the product management page or
 the add menu.



 What is the problem here?



 here is my coding



 __init__.py

 ---

 import helloModule

 def initialize(context):
 context.registerClass(
 helloModule.helloClass,
 permission=Add Hello Object,
 constructor=(
 helloModule.manage_addHelloForm,
 helloModule.manage_addHello
 )
 )




 helloModule.py

 

 def manage_addHelloForm(self):
  Form for adding a Hello Object 
 return 
 html
 head
 title/title
 /head

 body
 form method=post action=./manage_addHello
 input type=text name=id
 input type=submit value=Add Hello
 /form
 /body
 /html
 

 def manage_addHello(self):
  Method for adding a Hello Object 
 newHello=helloClass(id)
 self._setObject(id, newHello)
 return self.manage_main(self, REQUEST)

 class helloClass:
 meta_type='Hello Object'

 def __init__(self, name='World'):
 self.name=name

 def saySomething(self):
 return Hello,  + self.name

 def edit(self, name):
 self.name=name

 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com
 ___
 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 )





-- 
Marco Bizzarri
http://iliveinpisa.blogspot.com/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] usering module problem on zope 2.8.8

2006-12-28 Thread Allen Huang
I'm sorry Andreas. But I still don't see any solution to this problem. Do you 
have a solution? or there is no solution at all?


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Thursday, December 28, 2006 3:33:44 PM
Subject: Re: [Zope] usering module problem on zope 2.8.8


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 16:12:23 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I basicly copy what I have from 2.8 to 2.9
 its the same problem with the self generated python constructor and the
 self constructor that I made both worked in 2.8 but won't for 2.9

 my constructor look like this using

 dtml-with shpTypeClass.createInObjectManager(REQUEST['id'], REQUEST)
  dtml-call
 propertysheets.shpTypePoint_desc.manage_editProperties(REQUEST)
  dtml-if NoRedir
   dtml-return name=this
  dtml-else
   dtml-if DestinationURL
dtml-call RESPONSE.redirect(DestinationURL+'/manage_workspace')
   dtml-else
dtml-call RESPONSE.redirect(URL2+'/manage_workspace')
   /dtml-if
  /dtml-if
 /dtml-with

 the error is

 Time2006/12/27 19:48:33.523 GMT+8
 User Name (User Id)admin (admin)
 Request
 URLhttp://localhost/test/manage_addProduct/shpProcessing/shpTypeClass_fac
 tory/shpTypeClass_add Exception TypeTypeError
 Exception Valuedefault __new__ takes no parameters

 Traceback (innermost last):
 Module ZPublisher.Publish, line 121, in publish
 Module Zope2.App.startup, line 240, in commit
 Module transaction._manager, line 96, in commit
 Module transaction._transaction, line 380, in commit
 Module transaction._transaction, line 378, in commit
 Module transaction._transaction, line 433, in _commitResources
 Module ZODB.Connection, line 484, in commit
 Module ZODB.Connection, line 526, in _commit
 Module ZODB.Connection, line 553, in _store_objects
 Module ZODB.serialize, line 407, in serialize
 Module ZODB.serialize, line 416, in _dump
 Module copy_reg, line 70, in _reduce_ex
 TypeError: default __new__ takes no parameters

 what is the problem??

http://www.zope.org/Collectors/Zope/2005

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFk3NZCJIWIbr9KYwRAgXnAKDc609jQzO/7J1DFWVsAUAwruTSJgCgmJuO
c00q/FmZLZlfb1wkpobNtuI=
=75fR
-END PGP SIGNATURE-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] usering module problem on zope 2.8.8

2006-12-28 Thread Allen Huang
Then is it possible to use zope 2.8.x with python 2.4.x modules?


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Thursday, December 28, 2006 9:42:43 PM
Subject: Re: [Zope] usering module problem on zope 2.8.8


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 28. Dezember 2006 05:39:55 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I'm sorry Andreas. But I still don't see any solution to this problem. Do
 you have a solution? or there is no solution at all?




As Tres wrote: ZClasses are a dying beast and nobody cares about it.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFk8nVCJIWIbr9KYwRAqUhAKCr0GEt5+HabXZpyLYNygyNGrN8hgCg3Rj/
GGOd54sAEgN4mPPCQpN4gIs=
=7rZz
-END PGP SIGNATURE-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] usering module problem on zope 2.8.8

2006-12-27 Thread Allen Huang
I know I'm not suppose to use Z Class anymore but I really aren't familiar with 
make Products yet and I just want to do some quick result before I translate it 
into a product but it seem that something is different with Z Class in Zope 2.9 
and I couldn't make a Z Class like I use to do when I'm was using Zope 2.8.

Why is that?


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Wednesday, December 27, 2006 3:03:52 PM
Subject: Re: [Zope] usering module problem on zope 2.8.8


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 26. Dezember 2006 20:05:41 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 zope 2.8.8 uses python 2.3.5
 but I want to use modules that will only work with python 2.4

 I've being adviced not to change runzope.bat file since it might disrupt
 functionalities of zope 2.8.8 designed for python 2.3.5. what should I do?

Use Zope 2.9 or Zope 2.10 that will require Python 2.4.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFkhrYCJIWIbr9KYwRAgtlAJ0a2fcP15hkbO6FX0yD9zrUSGGKyQCcCiPE
b1BfidjHojTfIXVdsx1Ui9c=
=khQQ
-END PGP SIGNATURE-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] usering module problem on zope 2.8.8

2006-12-27 Thread Allen Huang
I basicly copy what I have from 2.8 to 2.9
its the same problem with the self generated python constructor and the self 
constructor that I made
both worked in 2.8 but won't for 2.9
 
my constructor look like this using 
 
dtml-with shpTypeClass.createInObjectManager(REQUEST['id'], REQUEST)
 dtml-call propertysheets.shpTypePoint_desc.manage_editProperties(REQUEST)
 dtml-if NoRedir
  dtml-return name=this
 dtml-else
  dtml-if DestinationURL
   dtml-call RESPONSE.redirect(DestinationURL+'/manage_workspace')
  dtml-else
   dtml-call RESPONSE.redirect(URL2+'/manage_workspace')
  /dtml-if
 /dtml-if
/dtml-with
 
the error is
 
Time2006/12/27 19:48:33.523 GMT+8
User Name (User Id)admin (admin)
Request 
URLhttp://localhost/test/manage_addProduct/shpProcessing/shpTypeClass_factory/shpTypeClass_add
Exception TypeTypeError
Exception Valuedefault __new__ takes no parameters

Traceback (innermost last): 
Module ZPublisher.Publish, line 121, in publish 
Module Zope2.App.startup, line 240, in commit 
Module transaction._manager, line 96, in commit 
Module transaction._transaction, line 380, in commit 
Module transaction._transaction, line 378, in commit 
Module transaction._transaction, line 433, in _commitResources 
Module ZODB.Connection, line 484, in commit 
Module ZODB.Connection, line 526, in _commit 
Module ZODB.Connection, line 553, in _store_objects 
Module ZODB.serialize, line 407, in serialize 
Module ZODB.serialize, line 416, in _dump 
Module copy_reg, line 70, in _reduce_ex 
TypeError: default __new__ takes no parameters 
 
what is the problem??



- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Wednesday, December 27, 2006 7:35:42 PM
Subject: Re: [Zope] usering module problem on zope 2.8.8


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 03:26:28 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I couldn't make a Z Class like I
 use to do when I'm was using Zope 2.8.


Why not? Where is your error description?

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFklqOCJIWIbr9KYwRAhK1AKCaei70217Ma7gMn/1bdCUBNl5ciQCff99b
KAMazCP5qofY2mIhe/OIetc=
=2Vxi
-END PGP SIGNATURE-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] usering module problem on zope 2.8.8

2006-12-26 Thread Allen Huang
zope 2.8.8 uses python 2.3.5
but I want to use modules that will only work with python 2.4

I've being adviced not to change runzope.bat file since it might disrupt 
functionalities of zope 2.8.8 designed for python 2.3.5.
what should I do?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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: Fw: [Zope] problem with the shapelib module.. help

2006-12-24 Thread Allen Huang
Thanks a lot for replying... I still a newbie at this ... 
in order for shapelib to read shapefile, you need a set of three files(.shp, 
.shx, .dbf).

so, if I have to download this to a temp location into my computer filesystem, 
could you show me how this is done? 


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Sunday, December 24, 2006 2:47:52 PM
Subject: Re: Fw: [Zope] problem with the shapelib module.. help


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 23. Dezember 2006 22:27:29 -0800 Allen Huang [EMAIL PROTECTED] wrote:



 2. but when I save the shapefiles (taiwan1.shp, taiwan1.shx, taiwan1.dbf)
 into zope and call it using dtml it return the same error message.
 import shapelib, dbflib
 def readshp(filename):
 shp = shapelib.ShapeFile(filename)
 return shp.info()

 and in zope
 dtml-var expr=readshp(taiwan1.shp)
 or
 dtml-var expr=readshp('http://localhost/pytest/taiwan1.shp');

No idea what shapelib is doing but reading a file from the locale 
filesystem as it seems to work from an external method is *different* from 
a accessing
content that is stored within the ZODB. I really wonder why you think it 
would work the same way? The hierarchical object storage of Zope looks 
similar to a filesystem but it is not a filesystem and the Python APIs for 
accessing filesystems don't apply. We have no idea what the ShapeFile 
constructors expects as data. If it expects a filename of a file within the 
filesystem then you must obtain the content of your data stored within the 
ZODB, create a temporary file and call the constructor as you did within
your external method. Possibly the constructor accepts the data directly
as *string*..in this case this would make things a bit easier. But it is up 
to *you* to check the Shapelib API and take appropriate action.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFjiKYCJIWIbr9KYwRAk0oAKCSyEo5ykswElgi9jFGWf89NthzmwCfRvEM
nSMyeIu/cK7NpecUlof2BR8=
=B0Mw
-END PGP SIGNATURE-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] processing data problem

2006-12-24 Thread Allen Huang
I'm new at data processing using zope and I could need some advice

I want to make a online system that can processing a set data of three files 
and record them info zodb. I have running into some problem where I could 
process the set data if it was on my computer in the same extension directory 
as my python program but couldn't when I store the set data into some directory 
on zodb. I heard from some mail-list users telling me that it is not the same 
even though in concept it is similar but I still don't understand why it 
doesn't work even though I direct my program into the same directory. 

Anyways, since I have encounter some initial problem, I was wondering if I 
should do this
1. have the user upload the set data or transfer the set data to my computer
2. process and record the data into zodb
3. delete the set data(since I really don't need a copy of it, but I don't 
see how I could do that)

or is there any way that I could just process the data right on the user's 
computer without transfer it to my computer, like bring the programming to them 
instead of bring the set data to us since set data's could be quite large (over 
1GB).

I appreciate any input... as soon as possible. Thanks

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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] processing data problem

2006-12-24 Thread Allen Huang
Hi Andreas Jung 

I'm sure you have seen my earlier post about shapefiles.

the files that i'm working with are .shp, .shx, .dbf
and I'm aware that zodb is not the place to store big files. I just need to 
translate individual entries in the data set into individual object in zodb.
I already have the tools to do it but I just don't know where to do it. Is it 
to bring the program to the user and process it on the user's computer or bring 
the data to my server and do it.

If its on the user's computer, I could save the time from transfering files, 
which could be a really problem if the file is over 500mb, let alone 1GB. but 
the user's computer might not have the libraries needed to translate the set 
data. If I where to bring the file over to my computer I have to wait for the 
file to transfers to my computer but I wouldn't have to worry about the program 
not working.

I would really like to work on the first case, since I think it is the most 
effeicient way, but I don't know how to do it (bring the program to a computer 
that probably won't have python or the required libraries). Do you know how to 
accomplish this? Could you help me?



- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Andreas Jung [EMAIL PROTECTED]; Allen Huang [EMAIL PROTECTED]; Zope 
zope@zope.org
Sent: Sunday, December 24, 2006 11:31:09 PM
Subject: Re: [Zope] processing data problem


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1




 - --On 24. Dezember 2006 07:10:21 -0800 Allen Huang [EMAIL PROTECTED]
 wrote:


 Anyways, since I have encounter some initial problem, I was wondering if
 I should do this 1. have the user upload the set data or transfer the
 set data to my computer 2. process and record the data into zodb
 3. delete the set data(since I really don't need a copy of it, but I
 don't see how I could do that)
 or is there any way that I could just process the data right on the
 user's computer without transfer it to my computer, like bring the
 programming to them instead of bring the set data to us since set data's
 could be quite large (over 1GB).

In addition: what is an online system? Keep in mind that the ZODB
not a data bog for temporary or large files. There are possibly better 
solutions for your purpose but you did not tell us exactly what you are 
trying to do and what kind of data you have and how often you update them.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFjp09CJIWIbr9KYwRAvQfAKCRnqdIrVxizT829VSJxdXwBhtpHQCgiZ0p
uw11mrYAk6y/czpZKKnr7i8=
=tI7S
-END PGP SIGNATURE-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


Fw: [Zope] problem with the shapelib module.. help

2006-12-23 Thread Allen Huang
shapelib still didn't work for me.. help
 
I've being trying different things for the pass day
 
1. I put the shapefile directly in the Extensions with the external method and 
it work fine
import shapelib, dbflib
def readshp():
shp = shapelib.ShapeFile('taiwan1.shp')
return shp.info()

   and in zope
dtml-var expr=readshp()
 
2. but when I save the shapefiles (taiwan1.shp, taiwan1.shx, taiwan1.dbf) into 
zope and call it using dtml it return the same error message. 
import shapelib, dbflib
def readshp(filename):
shp = shapelib.ShapeFile(filename)
return shp.info()

and in zope
dtml-var expr=readshp(taiwan1.shp)
or
dtml-var expr=readshp('http://localhost/pytest/taiwan1.shp')


The error message are

1. in Run Zope in Console
Exception exceptions.AttributeError:ShapeFile instance has no 
attribute 'thisown' in ignored
 
2. in web browser
Site Error
An error was encountered while publishing this resource. 
Error Type: IOError
Error Value: new_ShapeFile failed

 
is there something wrong with how I constructed it? Do I need to do something 
before hand?

3. in error_log
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module OFS.DTMLMethod, line 143, in __call__
   - DTMLMethod at /testPython/test
   - URL: http://localhost/testPython/test/manage_main
   - Physical Path: /testPython/test
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: readshp
  Module string, line 1, in expression
  Module Products.ExternalMethod.ExternalMethod, line 231, in __call__
   - __traceback_info__: (('http://localhost/testPython/taiwan1.shp',), {}, 
None)
  Module C:\web\ZopeInstance\Extensions\shapetools.py, line 4, in readshp
  Module shapelib, line 44, in __init__
IOError: new_ShapeFile failed





- Forwarded Message 
From: Dieter Maurer [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]
Cc: Zope zope@zope.org
Sent: Saturday, December 23, 2006 3:52:53 AM
Subject: Re: [Zope] problem with the shapelib module.. help


Allen Huang wrote at 2006-12-21 23:23 -0800:
I want to do some mapping application with zope.. but I have run into this 
problem over and over..

in Run Zope in Console
Exception exceptions.AttributeError:ShapeFile instance has no attribute 
'thisown' in ignored

Hmm. I doubt that you have really seen this text. There should be something
in between the in and the ignored. It is *vital* that you
are as precise as possible in your problem reports...


Python emits messages of the kind above in some (rare) situations,
e.g. when exceptions occur in destructors.


The exception above seems to have been raised in such a situation.
The missing thing betwenn in and ignored should tell us which situation
this was.

It tells you that something tries to access the attribute thisown
on a ShapeFile instance but this does not have the attribute.


in web browser
Site Error
An error was encountered while publishing this resource. 
Error Type: IOError
Error Value: new_ShapeFile failed


Another tip for the future. When you report problems, you need
to include full error information. Beside the Error Type and
Error Value above, this also includes the traceback.
You find all this information in the error_log object in
Zope's Root Folder (Management Interface).



-- 
Dieter

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] problem with the shapelib module.. help

2006-12-21 Thread Allen Huang
I want to do some mapping application with zope.. but I have run into this 
problem over and over..

in Run Zope in Console
Exception exceptions.AttributeError:ShapeFile instance has no attribute 
'thisown' in ignored

in web browser
Site Error
An error was encountered while publishing this resource. 
Error Type: IOError
Error Value: new_ShapeFile failed


I change some setting to my runzope.bat because I want zope to use python2.4.4 
instead of the build 2.3.5 because I have install shapelib 
module(pyshapelib-0.3.win32-py2.4) which is the module I want to use for the 
import of my external methods. The runzope.bat looks like this:
@set PYTHON=C:\Python24\python.exe
@set ZOPE_HOME=C:\web\Zope\Zope
@set INSTANCE_HOME=C:\web\ZopeInstance
@set SOFTWARE_HOME=C:\web\Zope\Zope\lib\python
@set CONFIG_FILE=C:\web\ZopeInstance\etc\zope.conf
@set 
PYTHONPATH=C:\Python24\Lib;%INSTANCE_HOME%\lib\python;%SOFTWARE_HOME%;%PYTHONPATH%
@set ZOPE_RUN=%SOFTWARE_HOME%\Zope2\Startup\run.py
%PYTHON% %ZOPE_RUN% -C %CONFIG_FILE% %1 %2 %3 %4 %5 %6 %7

I made a very short python external method to test the shapelib module 

import shapelib, dbflib
def testShapeLib(self):
f1 = shapelib.ShapeFile('C:\\web\\ZopeInstance\\taipei.shp') 

but all I get out of it is the above two errors
anyone have any idea what i'm do wrong with my settings or my code? any thought?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
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 )


[Zope] want to learn ZPT

2006-12-05 Thread Allen Huang
Hi.. I want to start learning ZPT since I heard from a lot of people that dtml 
is too outdated. Could anyone point me in the right direction? What should I 
starts on?


 

Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited___
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 )


[Zope] How to get the type of an object by dtml

2006-11-29 Thread Allen Huang
I want to do different operation to different object groups that I created my 
adding new products. But before I could do that I need to determine what the 
object I'm working with. 

Could anyone help me.. how do I use DTML to return the type of the object I'm 
currently working with?




 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com___
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 )


[Zope] reading text file object

2006-10-22 Thread Allen Huang
I made a template that changes the location name and contentdue to theinformation stored inthe titleproperty variable and the file contentof a"File" object.

I used the dtml tag dtml-var title to call the "title" information but I don't know of any dtml tag that would call the contentother than calling the "id" of the File object.
 ex. File object "test"
  Call method "dtml-var test"

Could anyone help out. Is there any other ways to call the content of the text "File" object?___
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] put python gui on the web(zope)?

2006-10-16 Thread Allen Huang

Thank you for your reply.. I'm planning to make a dynamic interface that do drag selection and catches coordinate information, but if I can't put GUI on a webpage, like java applet, are there any other methods? (anything beside _javascript_, I java tried it and I don't get it, unless you could give me some pointers.)

I know that I could use Java with python, but I really don't want to combine two languages. I want to keep it as simple as possible.
- Original Message From: Peter Bengtsson [EMAIL PROTECTED]To: Allen Huang [EMAIL PROTECTED]Cc: Zope zope@zope.orgSent: Monday, October 16, 2006 12:12:52 AMSubject: Re: [Zope] put python gui on the web(zope)?
sure. Your GUI apps can communicate with an online Zope database via XMLRPC. You can't put the GUI online of course :)Allen Huang wrote: I'm new at this, but can you put python GUIs on the web that will  interact with zope database?     ___ 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-announcehttp://mail.zope.org/mailman/listinfo/zope-dev )-- Peter Bengtsson,work www.fry-it.comhome www.peterbe.comhobby www.issuetrackerproduct.com___
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 )


[Zope] put python gui on the web(zope)?

2006-10-15 Thread Allen Huang
I'm new at this, but can you put python GUIs on the web that will interact with zope database?___
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 )


[Zope] how to set higher security for zope ftp

2006-10-13 Thread Allen Huang
how to set higher security for zope ftp?   I want people to upload but can't download, delete, replace any of the existing file.. how do I do that on zope ftp? 
		Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.___
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 )


[Zope] zope or python reading big or little Endian...

2006-08-27 Thread Allen Huang
can anyone help me with this? I have a file that is written in a combination of big and little Endian bit-coding, can does anyone know how I can translate using python or zope? 
		How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.___
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 )


[Zope] how to convert object id into string values?

2006-08-20 Thread Allen Huang
I using a python program that create thumbnails that I upload into zope. But the problem is that my program wants to recieve string values and apparently zope object id is not.can anyone help with this? How do I convert zope object id into string values? 
	

	
		Do you Yahoo!? Everyone is raving about the  all-new Yahoo! Mail Beta.___
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] trying to open a file in database but couldn't

2006-02-26 Thread Allen Huang
Hi.. thanks for replying and thanks for the helpI didn't realize that I mis type the code. The code what suppose to be ..  imageDataFile=StringIO(str(dataID.data))tfw = open(imageDataFile, "r")so, what your saying is that I don't need to open the file that I wanted to read into and extract the data? But how can that be?  I originally used tried by extracting info from a file on the computer and it works. But I couldn't do the same thing from the web.. I don't get that I did wrong or missing...How would you write the external method if you were to read a text file that you store in ZOPE database and extract the infromation line by line?Andreas Jung [EMAIL PROTECTED] wrote:  --On
 25. Februar 2006 21:55:24 -0800 Allen Huang <[EMAIL PROTECTED]>wrote: imageDataFile=StringIO(str(imageData.data)) tfw = open(imageDataFile, "r")Please consult the StringIO documentation. There is no need to open()a StringIO instance...also your code makes little sense to me becausestr() already returns a string which is usually what you need and want.Why do you have the need to put the image data into a StringIO instance.And another point: you should always use cStringIO instead of StringIO(for performance reasons)...consult the Python Library reference for details.-aj
	
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.___
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 )


[Zope] trying to open a file in database but couldn't

2006-02-25 Thread Allen Huang
I'm trying to open a file that is in database but I got this error message insteadcoercing to Unicode: need string or buffer, instance foundI don't quite understand why. My code looks like thisdef imageSetup(self, dataID, REQUEST): from StringIO import StringIO # Get the original image and data in memory and open thefile imageData=getattr(self, dataID) imageDataFile=StringIO(str(imageData.data))   tfw = open(imageDataFile, "r")I upload a text file into ZOPE database and  the file consist of six lines of float point numbers that I want to use with REQUEST.setI call this method usingdtml-call
 "imageSetup(textFile, REQUEST)" can anyone help me... please...  did I made a mistake with this code
		Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 
___
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 )


[Zope] want to use external script to read a text-file and image in database and modify REQUEST

2006-02-24 Thread Allen Huang
HiI want to use external methods to read a text file and imagein database and modify the REQUEST my code looks like this varible   ---  def imageSetup(self, imageID, dataID, REQUEST): import PIL.Image from StringIO import StringIO # Get the original image and data in memory. image=getattr(self, imageID) imageData=getattr(self, dataID) imageFile=StringIO(str(image.data)) imageDataFile=StringIO(str(imageData.data))   # open image and data file im = PIL.Image.open(imageFile) tfw = open(imageDataFile, "r") # assign data coordinate and image size to
 variables imX,imY = im.size() rX=float(tfw.readline()) tfw.readline() tfw.readline() rY=float(tfw.readline()) mnX=float(tfw.readline()) mnY=float(tfw.readline()) mxX=mnX+imX*rX mxY=mnY+imY*rY # assign variables to REQUEST REQUEST.set('resX', rX) REQUEST.set('resY', rY) REQUEST.set('minX', mnX) REQUEST.set('minY', mnY) REQUEST.set('maxX', mxX) REQUEST.set('maxY', mxY) REQUEST.set('pixelX', imX) REQUEST.set('pixelY', imY)  --  but all I get is thiszope coercing to Unic
 ode:
 need string or buffer, instance foundand the REQUEST variable is unchangedI'm still new to external scripting so I don't know what the problem is   (and I think there is a lot of it here)so, could someone help me out??
	
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.___
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 )


[Zope] installing PIL on Window Zope

2006-02-16 Thread Allen Huang
I want to install PIL into zope but I couldn't use the installation package since python that came with zope isn't register on windows. so I installed python 2.3 seperately andI found some artical on the zope website and it said to   - decompress and PIL package and move  - Copy the PIL folder and the pil.pth file from your Python folder into:YourZopeFolder/lib/python   - Copy _imaging.pyd, _imagingtk.pyd, tk83.dll and tcl83.dll into YourZopeFolder/bin/DLLs  - Copy PIL folder in Zope\lib\python\PILI did all that but I'm not sure if PIL now work with zope or not...I started importing External Script using PIL but all I get is -- 'm
 odule'
 object has no attribute 'Image'Can someone tell me how I can check if PIL works?  Does anyone have asimple PILcoding I could use?  
		  
What are the most popular cars? Find out at Yahoo! Autos 
___
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] installing PIL on Window Zope

2006-02-16 Thread Allen Huang
Hi...  I assume that you mean tomake modification to the path to the python interpreter in Zope at the \etc\zope.conf right?what lines should I add or modify?  Tino Wildenhain [EMAIL PROTECTED] wrote:  Allen Huang schrieb: I want to install PIL into zope but I couldn't use the installation package since python that came with zope isn't register on windows.   so I installed python 2.3 seperately and I found some artical on the zope website and it said to  - decompress and PIL package and move - Copy the PIL folder and the pil.pth file from your Python folder into: YourZopeFolder/lib/python  - Copy _imaging.pyd, _imagingtk.pyd, tk83.dll and tcl83.dll into YourZopeFolder/bin/DLLs - Copy PIL folder in Zope\lib\python\PIL&
 gt;
  I did all that but I'm not sure if PIL now work with zope or not...I dont know why people like it so complicated :-) You simply installwindows python in the same version your zope uses (alsoadd win32 extensions with the nice IDE at will) as well as yourPIL package. Then just change the path to the python interpreter inyour Zope installation to the system python and viola. I started importing External Script using PIL but all I get is -- 'module' object has no attribute 'Image'  Can someone tell me how I can check if PIL works?I'd go to the examples section. On the PIL website. Does anyone have a simple PIL coding I could use?I believe the zope book, section advanced scriptinghas some examples.RegardsTino
		 Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.___
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 )


[Zope] Can java applet interact with Zope ZODB database?

2006-02-14 Thread Allen Huang
Can java applet interact with Zope ZODB database? does it need any kind of connecter and driver?
		  
What are the most popular cars? Find out at Yahoo! Autos 
___
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 )


[Zope] about zope and mouse event handling

2006-02-10 Thread Allen Huang
I want to make a web page that could handle mouse events. My primary goal is to do some image processing like zooming and panning on an image displayed and redisplay it on the same page. But I don't really know how to approach this and at the same time interacting with Zope to retrieve relevent information from the database. I wasreading GUI with python coding but I don't know how toconnect itwith zope database. Is this method possible? Is thereany other methods I could look into?
		Relax. Yahoo! Mail 
virus scanning helps detect nasty viruses!___
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] about zope and mouse event handling

2006-02-10 Thread Allen Huang
Dear Lennart RegebroThanks for replying. If I use the pythonGUI, which you mention that it no longer use a brower, how would I use GUI to interact with zope database? How does the client end interact with the GUI?  Lennart Regebro [EMAIL PROTECTED] wrote:  On 2/10/06, Allen Huang <[EMAIL PROTECTED]>wrote: I want to make a web page that could handle mouse events. My primary goal is to do some image processing like zooming and panning on an image displayed and redisplay it on the same page. But I don't really know how to approach this and at the same time interacting with Zope to retrieve relevent information from the database.The method to do this is called "Ajax", and is basically all aboutwriting the user interface in _javascript_ an
 d
 talking to the web serverwith XML.http://en.wikipedia.org/wiki/AJAX I was reading GUI with python coding but I don't know how to connect it with zope database. Is this method possible?Yes, absolutely, but then you are no longer using a Web-browser. :-)But sure, that works fine too.--Lennart Regebro, Nuxeo http://www.nuxeo.com/CPS Content Management http://www.cps-project.org/
	
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.___
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] about zope and mouse event handling

2006-02-10 Thread Allen Huang
Dear LennartSorry... I'm still pretty new at this, I'm only worked with java templet.Is it possible for you to show me some example using GUI and ZODB together.. Some other guy replyed and said it couldn't be done.Lennart Regebro [EMAIL PROTECTED] wrote:  On 2/10/06, Allen Huang <[EMAIL PROTECTED]>wrote: Dear Lennart Regebro Thanks for replying. If I use the python GUI, which you mention that it no longer use a brower, how would I use GUI to interact with zope database?That depends on what method you decide to use to interact. There areinfinite options, from connecting directly to ZODB to using http someway. How does the client end interact with the GUI?Via mouse and keyboard, usually.
	
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.___
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 )


[Zope] hosting two site on one zope server

2005-12-16 Thread Allen Huang
I'm trying to host two site on one zope serverI have two fix IP and I have two network card installed.   I changed my zope.conf to include two http server that listen on two different ports.  But, I placed my site under different folder and I don't know how to redirect different IP to different folder sites by listening on the same port 80 (can change 8080 t0 80 on linux, don't know what server is already using this)can someone help me?__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
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 )


[Zope] Trying zope on Linux

2005-12-15 Thread Allen Huang
I'm trying zope on linux but I have come a cross a problem.I windows, I simply changedthe portnumber from 8080 to 80 inzope.conf so I could get to my site without typeing the port.But in Linux, I did the same thing but it always tells me that some other server already occupied this port. (and I just started too, so there shouldn't be any server. right??)I'm now trying to figure out what server to close but with no luck at all.. can someone help me so I can display my site on port 80?
	
		Yahoo! Shopping 
Find Great Deals on Holiday Gifts at Yahoo! Shopping ___
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 )


[Zope] about mouse interactions..

2005-12-13 Thread Allen Huang
Hi...   This is probably not much about zope, but I want to do make a web page that does mouse drag query that query the zodb for information.For example... I have a picture and I want my mouse to be able to point a single point ordrag a selection box and what ever is selected will make a new web page and with table about its information.Would anyone give me some pointers about how I could accomplish this? what docs or books I should read?
	
		Yahoo! Shopping 
Find Great Deals on Holiday Gifts at Yahoo! Shopping ___
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 )


[Zope] how to auto refresh the browser with dtml

2005-11-28 Thread Allen Huang
how do I do an auto-refresh to my browser with dtml? anyone have any ideas?
		 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.___
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] Reading GIS files(.shp, .dbx, .) into ZopeDatabase

2005-11-08 Thread Allen Huang
I know it might be difficult, but I like try it. I don't really like to use multiple databases if I could fit all the data into onto zope or mutiple zope databases, maybe it could increase dataflow since I wouldn't need to transform data from one format to another. 

But I'm really concern on how it will stress my RAM. I made a system with zope to take in members and whenItry todo somestatistics with zope, I had to change from a 256mb ram to a 512mb ram.

what do think about this Dieter??
Dieter Maurer [EMAIL PROTECTED] wrote:
Allen Huang wrote at 2005-11-6 17:10 -0800:I want to Reading GIS files(.shp, .dbx, .iforget) into ZopeDatabase.What does "reading GIS files into ZODB" means?Storing them as blobs (Binary Large OBjects) is trivial (you use a "File"object for this). Understanding them might prove a bit more difficult.-- Dieter
		 Yahoo! FareChase - Search multiple travel sites in one click.

 

 ___
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 )


[Zope] Reading GIS files(.shp, .dbx, .) into ZopeDatabase

2005-11-06 Thread Allen Huang
I want to Reading GIS files(.shp, .dbx, .iforget) into ZopeDatabase. Does anyone have any ideas how I could accomplish this? any existing modules? Mailing list?
		 Yahoo! FareChase - Search multiple travel sites in one click.

 

 ___
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 )


[Zope] Can one zope server host to websites with two different IPs?

2005-11-03 Thread Allen Huang
Can one zope server host to websites with two different IPs?

Can someone teach me how this is done?
		 Yahoo! FareChase - Search multiple travel sites in one click.

 

 ___
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 )


[Zope] time and date of creation of a zope object

2005-09-03 Thread Allen Huang
What's the dtml method that I could use to display the creation time of a zope object.

I don't want to use bobomodification method because it changes after every update. I just need the time and date of a zope object when itwas created__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
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 )


[Zope] find a file's type

2005-07-27 Thread Allen Huang
is there any dtml codes that can display a file's type?

I made a site that allows a person to send up a document file. But in the end what I really wanted is to let people to upload .doc files. 
Since I didn't put any restriction on it, people always send up a smaller .pdf file instead.

So how do I encode my webpage to show the file type of the file that have already being uploaded??
		 Start your day with Yahoo! - make it your home page ___
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 )


[Zope] use combined propertysheet variables to form a file name for a zObject

2005-07-27 Thread Allen Huang
I made a propertysheet for a customed zclass and I wish to use some variables and combine them to form a name for my newed created object.

Say I have variable 
a = 'name a'
b = 'value b'
c = 'string c'

what do I encode in my dtml method some_add 
 dtml-with "NewsClass.createInObjectManager(REQUEST['??'], REQUEST)"

?? into the combination of a, b, and c ?
		 Start your day with Yahoo! - make it your home page ___
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 )


[Zope] how do I check if an object have being recently updated??

2005-07-23 Thread Allen Huang
I want to post a update date that will change when any ofthe objects in a folder has been updated.

So far, I only know the command bobobase_modification_time, but it only works again the object I I enter the command with.. 

Can anyone show me how this is done??
		 Start your day with Yahoo! - make it your home page ___
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 )


[Zope] About login dtml

2005-07-13 Thread Allen Huang
What do I need to do inorder for me to use cookies with login dtml or python script??
can anyone some me??__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
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 )


[Zope] dtml to pdf

2005-07-13 Thread Allen Huang
How do I change my webpage into pdf using dtml or python script?__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
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 )


[Zope] Print a web page using dtml

2005-06-05 Thread Allen Huang
How do I use dtml or python script to print a page through a printer??
		Discover Yahoo! 
Stay in touch with email, IM, photo sharing & more. Check it out!___
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 )


[Zope] Opening .doc files in zope

2005-05-27 Thread Allen Huang
Is there any way to open a .doc files using dtml or script and print them??
		Yahoo! Mail 
Stay connected, organized, and protected. Take the tour___
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 )


[Zope] How do I delete acl_users using DTML??

2005-05-12 Thread Allen Huang
How do I delete acl_users using DTML code??
		Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone.___
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 )


[Zope] Delete user from acl_users folder

2005-05-12 Thread Allen Huang

I tried your method before and it didn't work
I have a folder called conference and inside it there is acl_users folder and I write all my dtmls in the conference folder (by the way, your are talking about manage_delObjects() instead deleteObjects() right??)

I tried to use dtml-call expr="acl_users.manage_deleteObjects(AUTHENTICATED_USER)"
zope tell me an error __get__


I tried to use dtml-call expr="acl_users.manage_deleteObjects(AUTHENTICATED_USER.getUserName())"
even tough it didn't give me any errors, the user name still exists in the acl_users folder

So, any other ideas??
		Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone.___
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 )


[Zope] How do I logout using DTML

2005-05-11 Thread Allen Huang
How do I logout current user using DTML
I used dtml-call expr="acl_users.logout(REQUEST)" but it didn't work and zope gave me this.


Site Error
An error was encountered while publishing this resource. 
Error Type: AttributeErrorError Value: logout

What did I do wrong??

		Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone.___
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 )


[Zope] what are the dtml for logout and deleting a existing user??

2005-05-10 Thread Allen Huang
what are the dtml for logout of an account and deleting a existing user??
		Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone.___
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 )


[Zope] Hiding HTML URL

2005-05-09 Thread Allen Huang
I just want to show my root URL address whenever people browse into other pages of my site. How do I do this in dtml or python script or external method??
		Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. Learn more.___
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 )


[Zope] Finding an object in a folder

2005-05-08 Thread Allen Huang
Here is the problem. I want to use a form to upload a file (with a specific name)but first I want to check ifanother file with the same name already exist in that folder. How do I use a if or dtml-if to solve this problem??
		Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard.___
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 )


[Zope] Find a object in a zope list

2005-05-07 Thread Allen Huang
I have a fold and I used objectValues['Image'] to make a array list of images. I have rename each image using AUTHENTICATED_pic.jpg and want to use an if statement to find the image with the same name in the array list. Can someone tell how?? Is there a findObject function or something??
		Yahoo! Mail 
Stay connected, organized, and protected. Take the tour___
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 )