[Python-Dev] Python script language or not
Hi, I have very basic question about Python that do we consider pyhton as script language. I searched in google but it becomes more confusion for me. After some analysis I came to know that Python support oops . Can anyone clarify me. Please let me know also it is right forum or not. I was looking for Python forum but i did not find any forum. Do we have forum like linux forum so it will be very easy for me to ask this question in forum and i will not ask repeated question becuase i am sure this question may be raised before Abhishek Goswami Chennai Phone No -0996227099 Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] 32 bit to 64 bit migration of C-API(Python)
Hi, I am working in Python-C ApI (Integrated Project). The Project has migrated to 64 bit machine from 32 bit machine. Every thing was working fine in 32 bit machine. But we getting following error in 64 bit machine. " Python int too large to convert to C long". When I start debug the code and found that we are using long variable which has size of 8 bit in C code. If I replace long to int32_t variable in C and all long value become garbage and I got index out of error from Python.The reason to become garbage value of long(after int conversion),we are using lot of Place Python api which give the long result and we use in further process like ( write/reading file).I have tried to replace with int but it did not work. I am not sure really this is only reason but it may be one of the reason to get the above error.I have also done google search but not able to get exact reason. After spending 3 days,I am not able to figure out the solution of this issue. Does anyone provide some insight. we are using Python 2.7.2 and Gcc : 4.7.0 Please let me know if I need to provide more info. Your earlier response will help us lot as we need to fix this issue as soon as possible.( it is kind of blockage for us) Thanks Abhishek Goswami Bangalore Phone No -07829580867 Skype : abhishekgoswami1 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 32 bit to 64 bit migration of C-API(Python)
Hi Nick, Thanks a lot for your quick responce Thanks Abhishek Goswami Bangalore Phone No -07829580867/9962270999 Skype : abhishekgoswami1 From: Nick Coghlan To: abhishek goswami Cc: "python-dev@python.org" Sent: Sunday, 27 January 2013 11:46 AM Subject: Re: [Python-Dev] 32 bit to 64 bit migration of C-API(Python) On Sun, Jan 27, 2013 at 3:42 PM, abhishek goswami wrote: > Hi, > I am working in Python-C ApI (Integrated Project). The Project has migrated > to 64 bit machine from 32 bit machine. Every thing was working fine in 32 > bit machine. > But we getting following error in 64 bit machine. > " Python int too large to convert to C long". Hi Abhishek, python-dev is for the development *of* CPython, rather than development *with* CPython (including the C API). More appropriate places for this question are the general python-list mailing list or the C API special interest group. However, from the sounds of it, you are running into trouble with the fact that on a 64-bit machine, Python stores many internal values as "Py_ssize_t" (which is always 8 bytes on a 64 bit machine), rather than a C int or long. PEP 353 [1] describes the background for this change, which allows Python containers to exploit the full size of the address space on 64-bit systems. C API functions that may be of interest in that context include: http://docs.python.org/2/c-api/number.html#PyNumber_AsSsize_t http://docs.python.org/2/c-api/int.html#PyInt_FromSsize_t http://docs.python.org/2/c-api/int.html#PyInt_AsSsize_t http://docs.python.org/2/c-api/long.html#PyLong_FromSsize_t http://docs.python.org/2/c-api/long.html#PyLong_AsSsize_t As well as the "n" format character for argument processing http://docs.python.org/2/c-api/arg.html#parsing-arguments-and-building-values [1] http://www.python.org/dev/peps/pep-0353/ Regards, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com