Please reply to the list / newsgroup. That way you get a much larger
audience, which might actually include somebody who knows something
about IronPython -- I know little more than what I posted in the HOWTO.
> yeah sir as u said i set the path with python 2.4 and its working with
> IronPython 1.1.1 really i am glad.
> but when i used with Microsoft IronPython for ASP.NET(which i
> installed there is only 2 folder named WebAppTemplate,LanguageService
> and one file AddPyScriptMap) and tried with default.aspx.py like this
> import System
> from System.Data import *
> from System.Web import *
> from System.Web.UI import *
> from IronPython.Hosting import PythonEngine
>
> from clr import *
> import sys
> import clr
> sys.path.extend([
> r'd:\Python24\Lib',
> r'd:\Python24\Lib\site-packages',
> ])
> import xlrd
> book = xlrd.open_workbook("myfile.xls")
>
>
Here you should insert some code to show that you have successfully
opened the workbook e.g.
print >> sys.stderr, book.sheet_names()
The following code seems totally irrelevant to the problem ....
> import SampleModule
> from SampleModule import SampleClass
> def Page_Load():
> pass
> _PrivateMethod("1")
> PublicMethod("2")
> def _PrivateMethod(text):
> lblPrivate.Text="private %s" %text
> def PublicMethod(text):
> lblPublic.Text="public %s" %text
> def Private_Click(sender,args):
> _PrivateMethod("3")
> def Button1_Click(sender, args):
> sc = SampleClass()
> sc.TestString = TextBox1.Text
> Label1.Text = sc.TestString
> Label1.Visible="True"
> Then its showing error --------------->.. Value cannot be null.
> Parameter name: encoding.
What is "it"? Do you mean that "it" showed "..Value cannot be null.
Parameter name: encoding. " and no other information??? Don't you get a
traceback???
What function/method has a parameter whose name is "encoding" and whose
value allegedly cannot be null??
> now i am happy atleast with the help of you
> i am able to resolve that error xlrd module is not found. please help
> me out to resolve this error.
>
>
Without a traceback I can't help you. Even with a traceback you may need
to ask on one of the IronPython forums what "Value cannot be null"
really means.
Cheers,
John
Not sure what you mean by this...
- xlrd is *not* included in the standard python distribution
- don't know what you mean by "package", you're not using the term in
it's normal python context ;-)
- John's comments mean that xlrd doesn't have any extension modules, so
xlrd will run happilly on normal Python, Jython or IronPython.
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
1. "pure-Python": source code is in Python, no C.*, assembler, etc
2. "package": consists of 1 or more modules
3. appending those directories to sys.path allows access to pure-Python
packages in the *CPython* distribution (Lib) or 3rd-party packages that
have been installed in site-packages.
4. If you want to import a package that comes with CPython and includes
C code and has not been implemented in IronPython [check the IronPython
website], you are out of luck ... IronPython won't use .pyd files.
Cheers,
John