473,320 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Algorithm for Python's pack function

I'm looking into how the Python's pack function is implemented. Does anyone know where the source is located? I grep the entire lib folder but couldn't find it. I have the unfortunate task of converting some python code which uses pack extensively into C++ :(
Nov 7 '08 #1
3 2851
YarrOfDoom
1,247 Expert 1GB
I believe that function is located in (starting from your python install folder): Lib/struct.pyc
Which is, unfortunately, compiled python code. So you can't read it, unless you can find a python decompiler.
Nov 7 '08 #2
I believe that function is located in (starting from your python install folder): Lib/struct.pyc
Which is, unfortunately, compiled python code. So you can't read it, unless you can find a python decompiler.
That's really unfortunately. Is there a better description what the function does other than what is given in the manual for struct module pack?
Nov 7 '08 #3
oler1s
671 Expert 512MB
You could always download the Python source code. It is available on the website along with the binary installer.
Nov 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mark S Pryor | last post by:
dear c.l.p, I'm posting a Py script to change the wordfile from inside the UE editor. Define this into the adv. tool menu. I found 100 posts in groups.google discussing Python and UltraEdit....
0
by: Bryan Olson | last post by:
I've run into a problem with Python/TkInter crashing, with an attempt to read illegal addresses, on Win on Win2000 and WinXP. With some web-searching, I found that people say not to manipulate...
12
by: Erik the Red | last post by:
In Fundamental Algorithms (The Art of Computer Programming), the first algorithm discussed is Euclid's Algorithm. The only idea I have of writing this in python is that it must involve usage of...
4
by: Kinsley Turner | last post by:
Hey-ho, I'm getting a bit out of my depth porting the 'tiny encryption algorithm' from C to python. Ref: http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm...
2
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c...
0
by: | last post by:
Greetings. In an effort to get python2.4 on my Centos 3.7, I installed the python bootstrap rpm. This installed 2.4 alongside 2.2 and updated yum to 2.4.0. Oddly, it didn't create a symlink...
9
by: jezonthenet | last post by:
I started using Python a couple of days ago - here are a few questions: * Doesn't the __main__() method automatically execute when I run my python program? * Only when I do an import of my...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 385 open (+21) / 3790 closed (+21) / 4175 total (+42) Bugs : 1029 open (+43) / 6744 closed (+43) / 7773 total (+86) RFE : 262 open...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.