473,805 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

class in IronPython?

I see from Google groups that I'm not the only one to have this
problem...

In Jim H.'s new IronPython 0.6:

mono bin/IronPythonConso le.exe
class myClass:

.... pass
....
System.NullRefe renceException: Object reference not set to an instance
of an object

....

Am I missing something basic?
Yes, I suspected Mono, and so tried it in .NET 1.1 on an XP
machine...
And actual working (non-empty) classes don't work either.

Is the class mechanism not yet implemented? Does Jim say as much in a
doc or a posting somewhere?

Thanks for any insight.

Mike Greaves
Jul 18 '05 #1
2 1525
mi***@tumladen. net (Mike Greaves) wrote in
news:31******** *************** ***@posting.goo gle.com:
In Jim H.'s new IronPython 0.6:

mono bin/IronPythonConso le.exe
class myClass:

... pass
...
System.NullRefe renceException: Object reference not set to an instance
of an object

...

Am I missing something basic?


I think you will find that classes don't (yet) work in interactive mode.
Try putting the class in a .py file and using that.

Jul 18 '05 #2
Duncan Booth <du**********@i nvalid.invalid> wrote in message news:<Xn******* *************** *****@127.0.0.1 >...
I think you will find that classes don't (yet) work in interactive mode.
Try putting the class in a .py file and using that.


Thanks. I *was* trying to debug a .py file in the first place... by
trying snippets of it interactively.. . Then I failed to realize that
I was getting a *different* exception in interactive mode...

Mike Greaves
Jul 18 '05 #3

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

Similar topics

3
5366
by: Carl Johan Rehn | last post by:
What is the difference between CPython, Python for .NET, and IronPython? For example, if I'm running IronPython, can I access modules such as Numeric and numarray? As I understand it, interoperability with C# and .NET works in both directions with IronPython, but CPython modules cannot be imported, or? With Python for .NET I can import the .NET Framework and continue using CPython modules, or?
3
2522
by: Sanghyeon Seo | last post by:
I took some time to write this HOWTO: http://sparcs.kaist.ac.kr/~tinuviel/fepy/howto/simplehttpserver-ironpython-mono-howto.html IronPython seems to get much less interest than it deserves. This howto shows how to setup IronPython to use with Mono on Linux and how to rebuild IronPython from source. It also discusses various patches to current problems. It also shows that IronPython can run SimpleHTTPServer today, not a trivial...
7
3600
by: sanxiyn | last post by:
Skip wrote: For those of us who have never used IronPython or Mono, is there a quick start document laying about somewhere? It wasn't clear to me where to even look. Okay, here we go: 1. Download IronPython Go to http://www.codeplex.com/IronPython. Click Releases tab. Click
9
2137
by: Claudio Grondi | last post by:
(just wanted to share my experience with IronPython 1.0) The context: C:\IronPythonipy.exe IronPython 1.0.60816 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. vs. C:\Python24python.exe Python 2.4.2 (#67, Sep 28 2005, 12:41:11) on win32
2
5637
by: Troels Thomsen | last post by:
Hello , When an exeption occurs in a IronPython executet script, and I print the sys.exc , i get something ugly like the example below. How can I get the fileName and line number? Thx in advance Troels
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
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
7645
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
6875
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
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.