473,802 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XL-RPC Recipe

Hi list!

I'm struggling with a recipe from the Python Cookbook (2nd ed.)
concerning XML-RPC. It's recipe 15.2 "Serving XML-RPC Requests", and
since I thought it's a popular book some other folks might have
discovered (and probably solved) the same issue.

The recipe provides server and client code, and I get an
error when trying the following client request:

print server.python_s tring.join(['I', 'like it!'], " don't ")

(In the server code the string name space is mapped into the
'python_string' member with "import string; self.python_str ing = string").

The error report says:

xmlrpclib.Fault : <Fault 1: '<type \'exceptions.Ex ception\'>:meth od
"python_string. join" is not supported'>

This happens with all the string methods in
StringFunctions .python_string. Is there a general issue with mapping
name spaces into an RPC object? Or am I missing a major point here?

I tried all of this on a fairly up-to-date Linux with a stock
Python 2.5 (also tried with WinXP/cygwin/Python2.5.1 and with a
Stackless 2.5.1, always with same outcome, so I don't believe it's an
issue of a local installation).

Any hints?

=Thomas
Jul 18 '07 #1
1 1654
Ah, sorry, found the answer myself (not that I wasn't looking for it for
days...): I was aware that the recipe is online at ActiveState's site
(http://aspn.activestate.com/ASPN/Coo.../Recipe/81549), but I
didn't read all of the comments carefully:

KAMOSAWA Masao wrote on 2006/04/29 that the use of dotted functions is
disabled by default in the server (from Python 2.4 onwards). But it can
be enabled with:

server.register _instance(Strin gFunctions(), allow_dotted_na mes = True)

=Thomas
Jul 18 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1764
by: hari krishna | last post by:
hi all, My requirement is to generate xl reports throu Asp.Net without installing xl on web server computer. i am using Response object and wrtifile method as below. i dont know whether it is correct, but giving error says " file is accessed by other process cannot access" I have some logic inbetween and write the info using response.write in to html format Ex: Response.Write("<td>" & "client_no" & "</td>"). I am getting the error at :...
2
1242
by: hari krishna | last post by:
hi, I have a web control lybrary project. i have some classes. calling that component though asp.net web form. i am using visual basic for coding. my requirement is to generate xl reports without installig XL on that web server machine. i will fetch data from stored procedures and that data to be sent to each cells in to XL sheet without opening the XL (also there will be no installation of XL). kindly help me how to do that. pls mail...
0
1307
by: hari krishna | last post by:
hi, I have a web control lybrary project. i have some classes. calling that component though asp.net web form. i am using visual basic for coding. my requirement is to generate xl reports without installig XL on that web server machine. i will fetch data from stored procedures and that data to be sent to each cells in to XL sheet without opening the XL (also there will be no installation of XL). kindly help me how to do that. pls mail...
1
915
by: m. via DotNetMonster.com | last post by:
hi. i have to import data from xl into an existing access table. can someone please help me? im not sure about what sort of connection string to use for XL (im ok with the access part). also, is there a row count function in XL? please let me know if someone out there knows. thanks! -- Message posted via DotNetMonster.com
2
2158
by: jeffsnox | last post by:
Is there a simple way to read the content of uploaded Microsoft XL spreadsheet files? TIA
5
3188
by: stuart79 | last post by:
I am looking for a code that enables me to open another excel spread sheet while i am in my XL form i have this code - Workbooks.Open Filename:= "OtherFilename.xls" - which opens up the XL spread sheet that i need however my form sits ontop of the xl spread sheet and i am unable to do anything to the spread sheet in the back ground. I need a code which will bring up the other spread sheet and allow me to use it without closing my form?????
4
1756
by: Accessed | last post by:
Hi All I need to check that a Range name exists in an XL worksheet so I can import data into it from Access VB code. ( I have found it is easiest to do a Transferspreadsheet to a named range called "data" eg. DoCmd.TransferSpreadsheet acExport, 8, "qryXLExport", "myworksheet.xls", True, "data" DoEvents)
10
11205
by: DarrenW | last post by:
I've been trying to find a reasonable way to sort a collection of clothing items by size but google isn't helping my out very much. I know this has to have been done before. I've seen an example written in Python but I don't do Python and the syntax is far too abstract to even sit and try to pick it apart. The best thing I've been able to come up with is to: 1. Reverse the strings 2. Sort them reversed 3. Reverse the order 4. Reverse the...
5
1385
by: Bill Schanks | last post by:
I have this code that takes ~3 Mins to run while automating an XL Instance (XL 2003). There are 558 Rows and 15 Columns in rngSelection. So it is adding Named ranges on 8,000+ Cells. Is this just as good as it's going to get? Imports Excel = Microsoft.Office.Interop.Excel <<Snip>> With XL .Application.Calculation = Excel.XlCalculation.xlCalculationManual
1
1656
by: mmisbah69 | last post by:
there is a an type mismatch error i am getting, when i want to creat an XL file for my code. Private Sub Command6_Click() ' Forward mode1 Dim scanner As Integer Dim StrMsgn As Integer Dim Forwardn As Integer Dim StoreVal(20) As Integer 'StrMsgn = "forwardn" & vbCrLf
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10536
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.