RE: [Zope] simple python question
Thanks, it works. One more question, instead of adding XML Document object everytime, I want to update the content of same document. Can I do xml = self.manage_addProduct['XMLDocument'].edit('xxx', 'XXX', str(token)) Sushil
I'm not entirely clear what you're asking but I suspect this will work:
xml = self.manage_addProduct['XMLDocument'].add('xxx', 'XXX', str(token))
When writing products, I had to keep calling str() on things since they were usually acquisition wrappers. It gets quite annoying.
If it does fix your problem, foward this to the list so folks know your problem is solved.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Sushil Bhattarai Sent: Thursday, September 26, 2002 10:19 AM To: zope@zope.org Subject: [Zope] simple python question
I'm absolutely new to python, so please help me out
I have this calculator2 function which calls the webservice and gets token as a XML file. At the same time I'm creating an XML Document (with is xxx and title XXX). I want to feed the xml content I'm getting (in this case token) into the XML document I'm creating. If I hard code the xml text in quotes it works. But I want to feed the text I'm getting in as token. What is the proper syntax to do that?
def calculator2(self, REQUEST, RESPONSE): ssfService = ServiceProxy ('http://localhost.ssc.com:8080/ssfsoap/services/CalcService?WSDL') token = ssfService.addInt(3,8) REQUEST.set('token1', token) xml = self.manage_addProduct['XMLDocument'].add('xxx', 'XXX', REQUEST ['token1']) return token
-- Sirvisetti Systems 347 Plainfield Avenue Edison, NJ 08817 (732) 985-2200
-- Sirvisetti Systems 347 Plainfield Avenue Edison, NJ 08817 (732) 985-2200
Probably not. I'm not familiar with XML document but I'm pretty sure you'll have to find something in that if you want to update the body.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Sushil Bhattarai Sent: Thursday, September 26, 2002 11:13 AM To: creiman@kefta.com Cc: zope@zope.org Subject: RE: [Zope] simple python question
Thanks, it works.
One more question, instead of adding XML Document object everytime, I want to update the content of same document. Can I do xml = self.manage_addProduct['XMLDocument'].edit('xxx', 'XXX', str(token))
Sushil
I'm not entirely clear what you're asking but I suspect this will work:
xml = self.manage_addProduct['XMLDocument'].add('xxx', 'XXX', str(token))
When writing products, I had to keep calling str() on things since they were usually acquisition wrappers. It gets quite annoying.
If it does fix your problem, foward this to the list so folks know your problem is solved.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Sushil Bhattarai Sent: Thursday, September 26, 2002 10:19 AM To: zope@zope.org Subject: [Zope] simple python question
I'm absolutely new to python, so please help me out
I have this calculator2 function which calls the webservice and gets token as a XML file. At the same time I'm creating an XML Document (with is xxx and title XXX). I want to feed the xml content I'm getting (in this case token) into the XML document I'm creating. If I hard code the xml text in quotes it works. But I want to feed the text I'm getting in as token. What is the proper syntax to do that?
def calculator2(self, REQUEST, RESPONSE): ssfService = ServiceProxy ('http://localhost.ssc.com:8080/ssfsoap/services/CalcService?WSDL') token = ssfService.addInt(3,8) REQUEST.set('token1', token) xml = self.manage_addProduct['XMLDocument'].add('xxx', 'XXX', REQUEST ['token1']) return token
-- Sirvisetti Systems 347 Plainfield Avenue Edison, NJ 08817 (732) 985-2200
-- Sirvisetti Systems 347 Plainfield Avenue Edison, NJ 08817 (732) 985-2200
Zope Stars: I have recently become laid-off and have some time to get up-to-date with all the cool new code out there that I can import or plop into my Products directory and I am asking the Main Corpus of the Zope Community to help me out. I will try just about anything, but I am focusing these days on automating my little firm, so I am interested in Professional Services tools such as Groupware, Project Management, Timesheets, Time Management, the elusive Zope IMAP Client, etc... Cheers, Chris ===== -- chris abraham <chrisabraham@yahoo.com> +1 202-452-7442 tel po box 15163 washington, dc 20003-0163 +1 202-478-0276 fax
I think there is just one word: Plone -- Andy McKay www.agmweb.ca ----- Original Message ----- From: "Chris Abraham" <chrisabraham@yahoo.com> To: <zope@zope.org> Sent: Thursday, September 26, 2002 2:51 PM Subject: [Zope] What New Zope Products & Python Extensions I HAVE to Try Right Away?
Zope Stars:
I have recently become laid-off and have some time to get up-to-date with all the cool new code out there that I can import or plop into my Products directory and I am asking the Main Corpus of the Zope Community to help me out.
I will try just about anything, but I am focusing these days on automating my little firm, so I am interested in Professional Services tools such as Groupware, Project Management, Timesheets, Time Management, the elusive Zope IMAP Client, etc...
Cheers,
Chris
===== -- chris abraham <chrisabraham@yahoo.com> +1 202-452-7442 tel po box 15163 washington, dc 20003-0163 +1 202-478-0276 fax
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
To anyone who knows... I guess I am confused about what Plone really is? Is it really all these things?
little firm, so I am interested in Professional Services tools such as Groupware, Project Management, Timesheets, Time Management, the elusive Zope IMAP Client, etc...
If so, great. Is IMAP really in there? Or is it popular opinion that Plone is the best place to implement them? Please respond with opinions, Richard Shebora Andy McKay wrote:
I think there is just one word: Plone -- Andy McKay www.agmweb.ca
----- Original Message ----- From: "Chris Abraham" <chrisabraham@yahoo.com> To: <zope@zope.org> Sent: Thursday, September 26, 2002 2:51 PM Subject: [Zope] What New Zope Products & Python Extensions I HAVE to Try Right Away?
Zope Stars:
I have recently become laid-off and have some time to get up-to-date with
all
the cool new code out there that I can import or plop into my Products directory and I am asking the Main Corpus of the Zope Community to help me
out.
I will try just about anything, but I am focusing these days on automating
my
little firm, so I am interested in Professional Services tools such as Groupware, Project Management, Timesheets, Time Management, the elusive
Zope
IMAP Client, etc...
Cheers,
Chris
===== -- chris abraham <chrisabraham@yahoo.com> +1 202-452-7442 tel po box 15163 washington, dc 20003-0163 +1 202-478-0276 fax
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Richard Sshebora wrote:
Andy McKay wrote:
I think there is just one word: Plone
To anyone who knows...
I guess I am confused about what Plone really is? Is it really all these things?
little firm, so I am interested in Professional Services tools such as Groupware, Project Management, Timesheets, Time Management, the elusive Zope IMAP Client, etc...
If so, great. Is IMAP really in there? Or is it popular opinion that Plone is the best place to implement them?
Please respond with opinions, Richard Shebora
I'm with Richard here. Until reading Andy's post, I had the vague impression that plone is a "graphically souped up" CMF, or an "example" application with some content_types added - please, I do not want to do unjustice to plone developers here, just trying to bring a point across. I went to plone.org and didn't really find something which explained the added value relative to CMF - or at least the difference to CMF. Is there such a document? cheers, oliver
I don't know if such a doc exists, if it does you'll probably find it at http://plone.org/documentation/ Plone IMO basically *is* a very souped-up CMF. Its pretty flexible, pretty heavy, very pretty and you don't have to know very much to use it. Its got lots of features, its high profile and in these ways its kind of nice for the zope world in general because it has caught people's attention outside of the zope world in a positive way. it doesn't do all the things that Chris was looking for, i don't think it does any of them really? I would say its a bit more than just an example app, its something that works well and looks good right out of the box. <--> george donnelly - http://zettai.net/ - "We Love Newbies" :) Zope Hosting - Dynamic Website Design - Search Engine Promotion
From: Oliver Bleutgen <myzope@gmx.net>
I'm with Richard here. Until reading Andy's post, I had the vague impression that plone is a "graphically souped up" CMF, or an "example" application with some content_types added - please, I do not want to do unjustice to plone developers here, just trying to bring a point across.
I went to plone.org and didn't really find something which explained the added value relative to CMF - or at least the difference to CMF.
Is there such a document?
george donnelly wrote:
I don't know if such a doc exists, if it does you'll probably find it at
http://plone.org/documentation/
Plone IMO basically *is* a very souped-up CMF. Its pretty flexible, pretty heavy, very pretty and you don't have to know very much to use it. Its got lots of features, its high profile and in these ways its kind of nice for the zope world in general because it has caught people's attention outside of the zope world in a positive way.
it doesn't do all the things that Chris was looking for, i don't think it does any of them really?
I would say its a bit more than just an example app, its something that works well and looks good right out of the box.
Ok, I went again to plone.org and found what I didn't see the first time, it's at http://plone.org/documentation/EuroPlonePresentation Sorry, I just had looked at the introduction link, which is apparently targeted to another audience. thanks, oliver
Some other useful links are: http://plone.org/Members/runyaga/presentations/OSCOM/index_html/view http://plone.org/Members/runyaga/Plone-Announcement.news/view Form validation and navigation tools: http://plone.org/Members/geoff/plone_forms_and_navigation/view I18N support: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/plone/CMFPlone/i18n/ Unfortuantely some of the other things like CMFTypes and solving the premature object creation haven't gotten the docs yet, we're getting there. And after customizing Plone for ZopeZen, I have to say its a lot better base to start with on anything CMF related. The skin is now a tenth of the size. -- Andy McKay www.agmweb.ca ----- Original Message ----- From: "Oliver Bleutgen" <myzope@gmx.net> Cc: <zope@zope.org> Sent: Friday, September 27, 2002 7:19 AM Subject: plone "vs." CMF was (Re: [Zope] What New Zope...)
george donnelly wrote:
I don't know if such a doc exists, if it does you'll probably find it at
http://plone.org/documentation/
Plone IMO basically *is* a very souped-up CMF. Its pretty flexible, pretty heavy, very pretty and you don't have to know very much to use it. Its got lots of features, its high profile and in these ways its kind of nice for the zope world in general because it has caught people's attention outside of the zope world in a positive way.
it doesn't do all the things that Chris was looking for, i don't think it does any of them really?
I would say its a bit more than just an example app, its something that works well and looks good right out of the box.
Ok,
I went again to plone.org and found what I didn't see the first time, it's at http://plone.org/documentation/EuroPlonePresentation
Sorry, I just had looked at the introduction link, which is apparently targeted to another audience.
thanks, oliver
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
(...)
And after customizing Plone for ZopeZen, I have to say its a lot better base to start with on anything CMF related. The skin is now a tenth of the size. -- Andy McKay www.agmweb.ca
I like Plone's graphic design, but after diving into the guts of CMF's default skins and compare them to Plone's I still need to know whether Plone is much more than a set of templates over zpt templates, or not. (I must confess I haven't read any of the documentation but I did installed many of its releases including Andy's installer.) When I look at Plone I see its graphic designer's decisions all over the site. Ok, I know I can chage many of them by modifying the stylesheet, but if want other kind of modifications, if I want to have the commands at different places than its defaults, for instance, I still need to perform them skin by skin, am I right?. In my humble opinion there's still room for a new general-purpose CMF skin that takes over the repetitive tasks during the skin customization process, without the usual constraints that come as a result of being template-based. Something like a skin-control layer that allows developers to focus on features rather on just code, but powerful enough to allow every level of per-case customization, when needed. I agree that Plone has suceeded at driving people's attention to CMF/Zope, but from a developer point of view I should tell, IMHO again, Plone neither can be opposed to CMF, neither Plone is CMF. :) Ausum
Can you give me some more details on what you would like? What repetitive tasks are you referring to? (there are so many ;P) <--> george donnelly - http://zettai.net/ - "We Love Newbies" :) Zope Hosting - Dynamic Website Design - Search Engine Promotion
From: "Ausum Studio" <ausum_studio@hotmail.com>
In my humble opinion there's still room for a new general-purpose CMF skin that takes over the repetitive tasks during the skin customization process, without the usual constraints that come as a result of being template-based. Something like a skin-control layer that allows developers to focus on features rather on just code, but powerful enough to allow every level of per-case customization, when needed.
I agree that Plone has suceeded at driving people's attention to CMF/Zope, but from a developer point of view I should tell, IMHO again, Plone neither can be opposed to CMF, neither Plone is CMF. :)
For example, if you need to add a dropdown menu in between your portal objects views, you have to add its caller to every one of its default-view methods: One portal type, one skin to be opened and modified. If you change your mind and find that your recently created menu is better at the bottom than in between the title and the cookedbody - for instance -, you need to peform the previous all over again. I call that repetitive, though not as a critic but as an invitation to think of a tool that solves this problem. Maybe it takes the form of a CMF skin, maybe just as an enhancement to the regular portal_skins tool. My vote is for the first alternative (as it's probable that the solution is code that writes code, while coexisting with previously installed skins.) Ausum ----- Original Message ----- From: "george donnelly" <list@zettai.net> To: "Ausum Studio" <ausum_studio@hotmail.com>; <zope@zope.org> Sent: Friday, September 27, 2002 3:08 PM Subject: Re: plone "vs." CMF was (Re: [Zope] What New Zope...)
Can you give me some more details on what you would like? What repetitive tasks are you referring to? (there are so many ;P)
<--> george donnelly - http://zettai.net/ - "We Love Newbies" :) Zope Hosting - Dynamic Website Design - Search Engine Promotion
From: "Ausum Studio" <ausum_studio@hotmail.com>
In my humble opinion there's still room for a new general-purpose CMF skin that takes over the repetitive tasks during the skin customization process, without the usual constraints that come as a result of being template-based. Something like a skin-control layer that allows developers to focus on features rather on just code, but powerful enough to allow every level of per-case customization, when needed.
I agree that Plone has suceeded at driving people's attention to CMF/Zope, but from a developer point of view I should tell, IMHO again, Plone neither can be opposed to CMF, neither Plone is CMF. :)
Have folks looked at uPortal (www.ja-sig.org)? The model uPortal provides is one of Views arranged by Tabs; each View is composed of one or more Channels. A Channel can be thought of as a window to a particular web service (not uppercase Web Service, though certainly that is supported) such as, perhaps, an RSS feed. Tabs are typically arranged across the top of the browser window: 'Home', 'Campus', 'MyPortal' ... Clicking on a Tab brings into view a browser window of the channels that make up that View. Users have the option to create their own "MyPortal" view, placing on that page the channels they choose and arranging them in the order they choose. Individual channels can be opened/closed/deattached/minimized. I think the uPortal model is appealing, though pieces, such as the screens for setting MyPortal's organization, are klunky. If you attended last February's Python conference, maybe you saw the canned NATO demo? That was a sort-of uPortal-in-Zope design (with a really slick javascript-based MyPortal organizer tool that definitely one-ups uPortal's). anyway What I'd like to see in the CMF/Plone kit is some uPortal-like functionality. For example, once I, as regular joe-user, register with a site, I'd like to be able to arrange my home page as I see fit. Maybe put the Calendar "channel" on my home page at the top-left in place of the Merchandise "channel" ... 'course there's no real content management capabilities in uPortal and in a dozen other ways uPortal comes up short compared to Zope/CMF/Plone ... but it does demonstrate some cool ideas. --- Tim Lynch National Agriculture Library Beltsville, MD tlynch@nal.usda.gov
(...)
And after customizing Plone for ZopeZen, I have to say its a lot better base to start with on anything CMF related. The skin is now a tenth of the size. -- Andy McKay www.agmweb.ca
I like Plone's graphic design, but after diving into the guts of CMF's default skins and compare them to Plone's I still need to know whether Plone is much more than a set of templates over zpt templates, or not. (I must confess I haven't read any of the documentation but I did installed many of its releases including Andy's installer.)
When I look at Plone I see its graphic designer's decisions all over the site. Ok, I know I can chage many of them by modifying the stylesheet, but if want other kind of modifications, if I want to have the commands at different places than its defaults, for instance, I still need to perform them skin by skin, am I right?.
In my humble opinion there's still room for a new general-purpose CMF skin that takes over the repetitive tasks during the skin customization process, without the usual constraints that come as a result of being template-based. Something like a skin-control layer that allows developers to focus on features rather on just code, but powerful enough to allow every level of per-case customization, when needed.
I agree that Plone has suceeded at driving people's attention to CMF/Zope, but from a developer point of view I should tell, IMHO again, Plone neither can be opposed to CMF, neither Plone is CMF. :)
Ausum
I guess I am confused about what Plone really is? Is it really all these things?
little firm, so I am interested in Professional Services tools such as Groupware, Project Management, Timesheets, Time Management, the elusive Zope IMAP Client, etc...
Its none of those things. If you haven't used it for a long time though I think it fits in with subjects title as a "New Zope Product" you have to try right away. -- Andy McKay www.agmweb.ca
participants (10)
-
Andy McKay -
Ausum Studio -
Charlie Reiman -
Chris Abraham -
george donnelly -
Jerome Alet -
Oliver Bleutgen -
Richard Sshebora -
Sushil Bhattarai -
Tim Lynch