Re: [Tutor] I am not really convinced using Python...
> I am not a newbie to programming.I already learnt C language.I > enjoyed it a lot. > But I am not a computer student.So I don't require a hifi language > like C. C is a tterrible language for computer students, its usually used by engineering types who need to interact with the computer at a low level. C is full of what computer scientists view as very bad practice! > I am an electronics student.I would really like to know if the > language like Python will be of any help(use) to me As an electronics grad who workds in telecoms designing large scale software systems I'll try to answer! :-) It is extremely useful for modelling problems - if you already use tools like mathematica to build math models of waveshapes, filter characteristics, stochastic noise models, data traffic analyses, etc etc Python can do all that too. For general purpose programming Python can build all your test harnesses, integrate your code libraries, manage your project files etc. For network access there are very good socket and serial port libraries and a bunch of internet protocols supported, it can also use a pile of more obscure libraries contributed by others - I've seen HPIB, Centronics and S-COM interface libraries and several others have been discussed on this list. Where its not so great is in building bespoke interfaces to new hardware - there are no direct input/output peek/poke type functions, no direct memoruy access etc. The usual silution is build a thi access library in C then wrap that as a Python module with the higher level interface functions written in python and calling the hardware routines in C. > .Also I heard that it is an intrepeter language. > Is it true? Yes in the same sense that Java, C#, Perl and Smaltalk are interpreted. The code is compiled into byte code and then run in a virtual machine interpreter. There are even translators from python to Java byte code so you can run it on any JVM and integrate with all the Java libraries out there. > If yes I would like to know whether it is fast or not. Try it and see. The answer will depend on what you are doing, what your computing architecture is and how well you write the code. If its not fast enough you can usually idfentify the bottleneck and rewrite that part in C. Python was explicitly designed with that style of build it, tune it, rewqrite the bottlenecks type of development cycle in mind. Only Tcl is better suited to that kind of tweaking IMHO. > Also I would like to know the capabilities of Python. It can do most things, and usually more easily than in other languages but have a look at the python web page, there are lots of advocacy stories and case studies there. > (If I am really convinced I would use it for my life).. No language is perfect and you will likely find it easier to have several languages to use as appropriate. But Python can do the lions share. Personally I now use Python 70%, Delphi 15%, C/C++/ObjectiveC 10% and a variety of others(Tcl, Awk, Java, Smalltalk, Lisp etc) for the final 5% HTH, Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] I am not really convinced using Python...
K.R.L. NARASIMHA wrote: > Hey friends,good day. > I am *_not a newbie_* to programming.I already learnt C language.I > enjoyed it a lot. > But I am not a computer student.So I don't require a hifi language like C. > I am an electronics student.I would really like to know if the > language like Python will be of any help(use) to me.Also I heard that > it is an intrepeter language. > Is it true?If yes I would like to know whether it is fast or not.Also > I would like to know the capabilities of Python. > *(If I am really convinced I would use it for my life)..* Take a look at the material on the python web site www.python.org, especially the ABOUT page. Take a few hours to work through a tutorial; if you know C, the tutorial that comes with Python will probably get you started. Python is not as fast as C to execute, but it is pretty fast and for many uses it is fast enough. It is much, much faster to write working Python code than C. There are quite a few techniques to make Python faster, also, including just-in-time compilation (psyco), compiling of an annotated subset (pyrex), or rewriting to a C extension. For many uses, you can just write your program in Python and it will be fast enough. If it isn't, you can profile to find the hotspots and optimize them If you value *your* time, give Python a try. Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] I am not really convinced using Python...
andrew clarke wrote: > On Tue, Jul 25, 2006 at 05:14:35PM +0200, Rob Sinclar wrote: > > >> Yep Python is an interpreted language. In other words every python app needs >> the python interpreter to be able to run. >> > > I'm not sure, but I don't think there's anything particular about the > language that says it should be interpreted. > Jython compiles Python classes to Java byte code, so I guess it is only interpreted because Java is. But there is still overhead to using Jython because the generated code implements its own types system, etc, using the Jython run-time. I wouldn't be surprised if IronPython does something similar. > As far as I know, programs built with IronPython don't require Python to > be installed - only the .NET (2.0?) Framework. > No IronPython runtime libraries? > http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython > > You can also build .exe files for Windows using py2exe. > > http://www.py2exe.org/ > py2exe just bundles all the needed files in a nice double-clickable package. It still runs the Python interpreter under the hood. There are major technical difficulties to compiling Python code to something that doesn't need a run-time to make it work. ShedSkin and PyPy are two projects that compile a restricted subset of Python to native code. Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] I am not really convinced using Python...
On Tue, Jul 25, 2006 at 05:14:35PM +0200, Rob Sinclar wrote: > Yep Python is an interpreted language. In other words every python app needs > the python interpreter to be able to run. I'm not sure, but I don't think there's anything particular about the language that says it should be interpreted. As far as I know, programs built with IronPython don't require Python to be installed - only the .NET (2.0?) Framework. http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython You can also build .exe files for Windows using py2exe. http://www.py2exe.org/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] I am not really convinced using Python...
On Tuesday 25 July 2006 16:42, K.R.L. NARASIMHA wrote: > Hey friends,good day. > I am not a newbie to programming.I already learnt C language.I enjoyed it > a lot. But I am not a computer student.So I don't require a hifi language > like C. I am an electronics student.I would really like to know if the > language like Python will be of any help(use) to me.Also I heard that it is > an intrepeter language. Is it true?If yes I would like to know whether it > is fast or not.Also I would like to know the capabilities of Python. (If I > am really convinced I would use it for my life).. Hi, Yep Python is an interpreted language. In other words every python app needs the python interpreter to be able to run. As for performances, it is slightly above Perl end PHP. Slightly, question of microseconds. I've been doing benchmark tests. In terms of GUI apps, when it comes to widgets there's no difference between Python and the C language (our only one real and verifiable religion) . But they can't be compared as C produces native code. As a high-level language -with all this involves- Python simply rules it all. Particulary for scientists. I guess you're one of them. Best Regards, Rob Sinclar ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] I am not really convinced using Python...
On Tuesday 25 July 2006 16:42, K.R.L. NARASIMHA wrote: > Hey friends,good day. > I am not a newbie to programming.I already learnt C language.I enjoyed it > a lot. But I am not a computer student.So I don't require a hifi language > like C. I am an electronics student.I would really like to know if the > language like Python will be of any help(use) to me.Also I heard that it is > an intrepeter language. Is it true?If yes I would like to know whether it > is fast or not.Also I would like to know the capabilities of Python. (If I > am really convinced I would use it for my life).. Hi, Yep Python is an interpreted language. In other words every python app needs the python interpreter to be able to run. As for performances, it is slightly above Perl end PHP. Slightly, question of microseconds. I've been doing benchmark tests. In terms of GUI apps, when it comes to widgets there's no difference between Python and the C language (our only one real and verifiable religion) . But they can't be compared as C produces native code. As a high-level language -with all this involves- Python simply rules it all. Particulary for scientists. I guess you're one of them. Best Regards, Rob Sinclar ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] I am not really convinced using Python...
Hey friends,good day. I am not a newbie to programming.I already learnt C language.I enjoyed it a lot. But I am not a computer student.So I don't require a hifi language like C. I am an electronics student.I would really like to know if the language like Python will be of any help(use) to me.Also I heard that it is an intrepeter language. Is it true?If yes I would like to know whether it is fast or not.Also I would like to know the capabilities of Python. (If I am really convinced I would use it for my life).. Find out what India is talking about on Yahoo! Answers India. SMS memory full? Store all your important SMS in your Yahoo! Mail. Register for SMS BAK UP now! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor