doubts in using gnowsys

View: New views
2 Messages — Rating Filter:   Alert me  

doubts in using gnowsys

by HimanshuChauhan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
we are trying to write the following code in zope for adding object in GNOWSYS:

import polib


po = polib.pofile('/home/himanshu/Desktop/final po/hi.po')
dictParameters = {
'nid':'L3006',
'uid':'1',
'status':'Public',
'content':"<p><b>align=justify><b>ebbvcditifdfgfsng dfsd cfgo17dfs hghjg fgfdg</b></p>",
'title':[po.metadata['Language-Name']],
'description':"<b>URI</b>",
'instanceof':['package'],
'company':'HBCSE'
}

print context.gnowql.manageAddObject( dictParameters )
return printed

and got the following error:

Error Type
ImportError
Error Value
import of "polib" is unauthorized
the error is with respect to import.
But we tried to import math and it allowed us to do so without any error.We are not able to fix the problem.So guide asap.



Himanshu Chauhan
Khushbu Bhayani
Deepti Shetty
 



Bollywood, fun, friendship, sports and more. You name it, we have it.
_______________________________________________
Gnowsys-help mailing list
Gnowsys-help@...
http://lists.gnu.org/mailman/listinfo/gnowsys-help

Re: doubts in using gnowsys

by Nagarjun G. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Feb 28, 2008 at 12:06 AM, Himanshu Chauhan
<anshu781126@...> wrote:
>
> we are trying to write the following code in zope for adding object in
> GNOWSYS:
>
>  import polib
>
>

are you writing this code in the script object?  if so, you cannot
import polib.  what you have to do is to create a file within the
Extensions folder of the product.

I suggest to harvest the pofiles not from zope, but connect to zope
using xmlrpc from a regular python application.  for harvesting you do
need only a gnowsys server running, but you can run the python
application from any client.

Hope you understood.

Nagarjuna


_______________________________________________
Gnowsys-help mailing list
Gnowsys-help@...
http://lists.gnu.org/mailman/listinfo/gnowsys-help