View Full Version : For .NET developers, a possible alternative
bilu
24th August 2003, 23:28
I've heard wonders about this.
The nice structured script language Python combined with cross-platform GUI development. I'm not a programmer but I intend to learn by starting here :).
http://www.wxpython.org/
http://www.python.org/
I'm presenting this as an alternative to .NET because the framework is smaller to download and I think it can do most of what .NET does. But lightweight and cross-platform.
Some background on Python and .NET:
http://starship.python.net/crew/mhammond/dotnet/PythonForDotNetPaper.doc
This is just to get your attention on wxPython, I think it has potential. I'm ignorant about programming so I would never bash those who already have work done :)
Best regards,
Bilu
stax76
25th August 2003, 02:45
I'm quite happy with .NET :D , lately I developed a user control (the new options dialog in DVX ;) ) in C# with some design time features, with other programming models you can forget about such things. The .NET framework even provides interfaces for hosting a form designer, menu designer etc. which developed applications can interoperate at design time. I'm even planning to host a form designer myself in a future project I describe as "wizard creator for command line programs"
Doom9
25th August 2003, 15:57
there's still a difference between a script language and an intermediate language (managed .NET code, java). Python is interpreted whereas VB.NET, C#, Managed C++ (and whatever other language there's a .NET extension for) and Java are all compiled into an intermediate binary code which is compiled to platform specific code upon runtime.
int 21h
26th August 2003, 04:30
Java is an interpreted language, Java byte code is interpeted by the runtime installed on the machine. (http://java.sun.com/docs/white/langenv/Intro.doc2.html#528)
TheUnforgiven
26th August 2003, 05:34
you can now even compile java into native executables for both windows and linux using gcj
http://www.thisiscool.com/gcc_mingw.htm
clip9
26th August 2003, 13:26
I'm gonna get famed for this. :devil: But IMO python is one of the worst (scripting) languages ever. It's even worse than TLC. It's VERY slow. And what kind of modern langauge has witespace as part of the syntax?! One good thing about python is the portabillity, Python works on most platforms. But after mono http://www.go-mono.org i dont see the point of moving to this "wierd" langauge.
Maybe I'm just a grumpy old C coder.. :o
C# for RAD. And C for the other stuff. ;)
bilu
26th August 2003, 19:00
It's better than Perl from what I've heard... :rolleyes:
And probably more than enough for GUI development.
Bilu
stax76
26th August 2003, 20:18
dunno if it's good for Windows, on Linux it has a fanbase and also some larger project like portage, zope and many rad hat apps are written with Python. I recommend C#, VB .NET or Delphi (did I say Delphi :eek: ) for Windows
Monarch73
26th August 2003, 23:39
Originally posted by int 21h
Java is an interpreted language, Java byte code is interpeted by the runtime installed on the machine. (http://java.sun.com/docs/white/langenv/Intro.doc2.html#528)
Sorry, you've been misinformed. Most of the newer JRE compile the java-bytecode to native maschine code just after its been loaded. So does the most recent Sun JRE.
stax76
27th August 2003, 00:37
you can now even compile java into native executables for both windows and linux using gcj
afaik there are similar solutions for .NET as well but not free yet. I see no advantages in this, it makes the downloads _much_ bigger and speed is with just in time compilation and ahead of time compilation no issue
bilu
27th August 2003, 01:01
Originally posted by Dolemite
dunno if it's good for Windows, on Linux it has a fanbase and also some larger project like portage, zope and many rad hat apps are written with Python. I recommend C#, VB .NET or Delphi (did I say Delphi :eek: ) for Windows
I think PaintShop Pro uses it for scripting language.
b0b0b0b
27th August 2003, 04:25
A JVM will compile your byte code into native code under certain circumstances. On sun's jvm, one thing it depends on is how many times that segment of code has been executed. The number differs between -client and -server (and -interpreted). I think that in newer versions you can actually specify the number.
That's why in a java benchmark you should "warm up" the jvm by running your code ahead of the benchmark many times. Have a look at www.javaperformancetuning.com if you're interested in a more rigorous (and accurate) write-up. Or just google for: java microbenchmark.
As for gcj, eh-- they only recently got the eclipse IDE to actually run after being gcj'ed and I think they had to branch gcj to accomplish even that. Go forth and use the JIT.
stickboy
27th August 2003, 11:03
Originally posted by Doom9
there's still a difference between a script language and an intermediate language (managed .NET code, java). Python is interpreted whereas VB.NET, C#, Managed C++ (and whatever other language there's a .NET extension for) and Java are all compiled into an intermediate binary code which is compiled to platform specific code upon runtime. There are no such things as "compiled languages" and "interpreted languages". There are languages that are often compiled, and there are languages that are often interpreted, but that doesn't mean there can't be interpreters and compilers for both.
I see no reason why a Python interpreter couldn't do JIT compilation like the Java bytecode interpreter.
(Besides, doesn't Python have an intermediate bytecode system too?)
stax76
27th August 2003, 12:57
there are already a couple of other solution
http://www.activestate.com./Products/Visual_Python
http://zope.org/Members/Brian/PythonNet
http://www.jython.org
int 21h
27th August 2003, 22:57
Originally posted by Monarch73
Sorry, you've been misinformed. Most of the newer JRE compile the java-bytecode to native maschine code just after its been loaded. So does the most recent Sun JRE.
When you run the application launcher, by default -Xmixed is specified. This allows heavily used portions of the code (i.e. 'Hotspots' as Sun calls them) to be compiled to native machine code, but all of the remaining bytecode that is not designated as such is interpreted by the bytecode interpeter. And last I checked, all the 1.4* series from Sun still did this...
TheUnforgiven
28th August 2003, 09:58
dolemite: I see no advantages in this, it makes the downloads _much_ bigger and speed is with just in time compilation and ahead of time compilation no issue i could make an independent GUI application with GCJ that is 1.6 mb compressed. the JRE is 10mb compressed. regarding speed there is no much gain except startup time.
stax76
28th August 2003, 13:59
I could make an independent GUI application with GCJ that is 1.6 mb compressed
wouldn't this be 10 to 100 times larger than a zipped program in MSIL or Java byte code, I think yes. The download size of .NET or Java is actually a pro argument, not a contra argument because after you downloaded a couple of programs which usually are incrediby small (at least more then 10 times smaller than binary programs with statically linked libraries) you save time, space, money etc. The only problem is most people don't seem to understand this
stickboy
28th August 2003, 17:44
That only works if you download a lot of Java or .NET programs. If you only have a handful, there's no gain.
Furthermore, for small programs, the time and memory requirements to start the runtime environment often dwarf those of the program itself. For small programs, this hurts.
There are also the additional steps of installing the runtime environment in the first place and making sure the user has the correct version of the runtime environment. Extra steps make things more complicated, not easier.
bilu
28th August 2003, 18:54
Read the conclusion:
http://www.flat222.org/mac/bench/
Starting from the shaky premise that these benchmarks actually mean anything for "real world" applications, one conclusion is that Python is really really slow (unless you're doing nothing ;-)
I found the performance of Python for these benchmarks really surprising as it is at odds to my everyday experience. I've just completed a small demonstration program that does interactive scientific simulations in a VR environment. Whilst both the simulation code and the rendering system are C++, the app itself is Python, and used wxPython for the GUI. Even the eventloop was inside Python, and the app was running very fast. Python is not fast in an absolute sense - by absolute I regard C or C++ as the defacto baseline for comparing execution speed. However, it's fast enough, at least for acting as a glue layer for C++ objects. Coupled with the freedom and ease of working in Python, it really shines.
That's what I meant in the first place. For an encoding GUI wxPython could probably be better that .NET. That's what I'd like to hear opinions about. We all know it is slower in the rest, but it's portable and probably easier to debug.
Bilu
stax76
28th August 2003, 21:50
That only works if you download a lot of Java or .NET programs. If you only have a handful, there's no gain.
Furthermore, for small programs, the time and memory requirements to start the runtime environment often dwarf those of the program itself. For small programs, this hurts.
There are also the additional steps of installing the runtime environment in the first place and making sure the user has the correct version of the runtime environment. Extra steps make things more complicated, not easier.
that's certainly true, but also true is the .NET architecture is great and there are people who think this architecture is the future, people with influence like Bill Gates and Miguel de Icasa, the founder of Gnome and Mono. After using .NET quite some time now, I believe this as well
For an encoding GUI wxPython could probably be better that .NET
for an encoding GUI you would do yourself a favor using a RAD IDE/language like .NET or Delphi, you have to work with things like COM, everything other than .NET, Delphi or C++ would probably be a pain in the ass if possibly at all
edit: it would be also hard to compete with existings GUI's, maybe contributing to a AviSynth editor could be interesting for you. I'm making a lot progress with the DVX AviSynth editor, code completion is already finished as well as all sub dialogs are moved to dockable/tabed windows like you find in VisualStudio and SharpDevelop. When everything is finished I'm making a single application out of all AviSynth related features in DVX which will be similar to AviSynthEditor but will have much more features. I'm looking for a experienced VB .NET progarmmer to maintain this project since I want to focus on DVX
Joe999
3rd September 2003, 04:54
I've been using WxPython with the Boa IDE for a couple years now and love it. I will say that it took me quite a while to get used to python. The commenting and issues with white space made up the majority of that adjustment time. But once you get past that there's amazing potential there. Anything you write with it will run in Windows, Linux, BSD, and OS X, usually with no need for modification - and all having the native look and feel for the operating system.
I think you're going to be happy with the choice of learning python and the wxwindows bindings. Aside from the advantages in portability, detractions here aside, I've actually found it to be quite fast. I wouldn't use it for writing something extreamly processor intensive like a video encoder or window manager. But for everything else it's proven pretty impressive for me. I've been writing a fairly large rpg engine, and none of the people using it on either Windows or Linux have noticed any slowness or difference betwean it and any other program on their system.
Another very nice thing about WxPython is that you're learning the basic WxWindows API. So if later on you want to learn C++, you'll allready have a good idea how to write very portable portable programs with it. I believe there are also bindings available for Java, and a work in progress for C# as well.
You might look into the Boa IDE for constructing GUIs with WxPython as well. It gives a nice drag and drop interface for laying things out.
bilu
3rd September 2003, 08:37
Thanks for an enlightened and detailed opinion :)
Bilu
jonny
3rd September 2003, 17:03
I'm learing python too.
I'm using perl for a while, but at a first look, python have a better range of modules & better/easy integration with c (this is essential for some particular tasks).
IMHO scripting language are the best to build gui programs (and with c integration you can really do what you want).
String, array, hashes are integrated in the language, i dunno how this compare to .NET (never used it, so Dolemite could expand this), but for example i see the differences between VB & Perl (and i prefer Perl and probably Python... after learing it a bit more ^^).
stax76
3rd September 2003, 19:42
String, array, hashes are integrated in the language, i dunno how this compare to .NET
in .NET you have Arrays and the System.Collection namespace with some classes that can be used directly or can be used for derived classes or own classses can be build by using various interfaces (which the predefined classes are based on as well), more information can be found here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemarrayclasstopic.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemCollections.asp
jonny
6th September 2003, 13:42
Only a quick update
I've found py2exe here: http://starship.python.net/crew/theller/py2exe/
Running it over a WxPython example, the files in the distribution comes out around 6MB (2MB compressed with rar), so it's possible to release this without letting the user download the full python&wx packages.
stax76
6th September 2003, 19:48
IDE for Python and wxPython can be found here (http://boa-constructor.sourceforge.net/Screenshots/FrameDesign.html). It was project of the month at SourceForge last month. Anyway, I still recommend VisualStudio :devil: , next version (2004) will feature tons of new features and there will be a new .NET version as well, operator overloading and XML-based code documentation for VB are my favorits :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.