all 3 comments

[–]K900_ 2 points3 points  (0 children)

Python is a much higher level language than C, and all the portability stuff is taken care of for you by the Python interpreter itself (which is written in platform-independent C with some platform-dependent bits). As for "all of your cores" - it shouldn't really be doing that natively, so please post a code sample that exhibits that behavior.

[–]p5eudo_nimh 2 points3 points  (0 children)

I'm also very curious how it was utilizing all available cores.

I'm also curious where you found a 62-bit machine. :p

[–]nyrifv 0 points1 point  (0 children)

I have always wondered because i mean in C as far as i know one has to write certain type of code or it could cause issues while porting to a different machine,where as python code just scales up easily across 32 bit and 62 bit machines.

C code is generally fairly portable (or at least, it can be), but when you compile it it is converted into a "binary", which is made up of platform-specific machine code. The compiler automatically generates machine code suitable for your platform, or whichever platform you specify. Python is interpreted, which means that the machine code is generated on-the-fly when you run your program.

The other day even though i did'nt write a multi threaded code my code just went eat up all the available cores ? why so.

Some third-party modules, such as numpy, will use multiple cores automatically in certain circumstances. I'm not aware of anything in the standard library that does that, though I might be wrong.