Gmpy documentation anywhere? [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I installed gmpy-1.11rc1.win32-py2.6.exe, but can't figure out how to use it, I can see some exported functions like mpz, mpq, mpf, etc., but how do I call a function like mpz_probab_prime_p() in GNU MP C library?
I looked at gmpy on Google Code, but still can't figure out. I couldn't find gmpy's documentation anywhere either. Thanks.

You can find the docs here.

For now the txt file jbochi mentions is all there is -- and unfortunately it's not structured in the terms the OP requires, i.e., showing what underlying GMP functions are used in each gmpy-exposed function or method. If you're a GMP expert you can search the gmpy code here -- specifically in this file, which implements MPZ functionality, you'll see the call you seek at line 1538 (within the is_prime function/method).
I did recently acquire site gmpy.org with the idea of developing better online docs, but haven't gotten started yet (of course I could equally well use the wiki pages at gmpy's google code hosting site) -- as always in open source, volunteers are welcome!-)

GMPY2 documentation is now on ReadTheDocs. There are installation instructions and an API reference.

This may be useful as well:
>>> import(gmpy)
>>> help(gmpy)

Related

A cryptographic tool for specific fields in data [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I was thinking of building a piece of software that would be able to encrypt specific fields in a data file. So I started to consider writing some code in Python using cryptographic libraries. However I wonder: is it really safe? Should I rather use existing cryptographic tools?
If so, do you know a good cryptographic tool I could rely on? The only tools I find only encrypt entire files or disks. Thank you!
This greatly depends (obviously), on how you write it.
There are libraries like cryptography which already provide this solution though and are considered very safe.
https://github.com/fugue/credstash, for instance, which is widely used, uses cryptography.
https://github.com/lyft/confidant uses it also.
I implemented a locally usable secret store using cryptography (which you could use to encrypt any type of data) - https://github.com/nir0s/ghost which you could use as a reference implementation or simply use it (hope I'm not breaking any rules here)

Looking for example or documentation for wikidump python lib [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I stumbled upon the wikidump python library, which I think suits me just fine.
I could get by by looking at the source code, but I'm new at python and I don't want to write BS code as the project I need it for is kind of important to me.
I got the 'wiki-SPECIFICDATE-pages-articles.xml.bz2' file and I would need to use that as my source for single article fetching. Can anyone give me some pointers as to properly achieve this or, even better, point at some documentation? I couldn't find any!
(p.s. if you got any better and properly doc'd lib, please tell me)
Not sure if I understand the question, but if you have the Wikipedia dump and you need to parse the wikicode, I would suggest mwparserfromhell lib.
Another powerful framework is Pywikibot, that is the historic framework for bot users on Wikipedia (thus, it has many scripts dedicated to writing pages, instead of reading and parsing articles). It has a lot of documentation (though, sometimes obsolete) and it uses MediaWiki API.
You can use them both, of course: PWB for fetching articles and mwparserfromhell for parsing.

API reference to WebKit WebView implementation in GTK (Python) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm working on a Python Gtk3 app on Ubuntu, which primarily uses WebView from WebKit. I couldn't find all the methods available to WebView object in python, currently I only know its open() method, so, where can I get detailed reference to all its methods, including some documentation on handling cookies and user password saving, etc?
I went through http://webkitgtk.org/ but I couldn't find Python related API, or (I might have missed it out).
Because of GOBject Introspection, you should have access to every public class/method/function available in the WebKit. Hence, the original API documentation should help.
To know every method available, you can even use the classic help from Python. For instance:
$ python
>>> from gi.repository import WebKit2
>>> help(WebKit2.WebView)
Now, you can match the method names against the documentation for other languages (likely Objective-C).
In addition the API reference on webkitgtk.org is pretty good too, even though it is not Python specific. But if you're used to read GTK documentations it's pretty easy to use it for Python applications.

What is a good configuration file library for c thats not xml (preferably has python bindings)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for a good config file library for c that is not xml. Optimally I would really like one that also has python bindings. The best option I have come up with is to use a JSON library in both c and python. What would you recommend, or what method of reading/writing configuration settings do you prefer?
YaML :)
If you're not married to Python, try Lua. It was originally designed for configuration.
You could use a pure python solution like ConfigObj and then simply use the CPython API to query for settings. This assumes that your application embeds Python. If it doesn't, and if you are shipping Python anyway, it might make sense to just embed it. Your C .exe won't get that much bigger if it's a dynamic link, and you will have all the flexibility of Python at your disposal.
Despite being hated by techies and disowned by Microsoft, INI files are actually quite popular with users, as they are easy to understand and edit. They are also very simple to write parsers for, should your libraries not already support them.

Python tool that builds a dependency diagram for methods of a class [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm digging into a huge legacy Python class that has a lot of methods. I eventually break complex ones into smaller pieces so the amount of methods increases even more. I wonder if there is a tool that can scan the Python code and build some kind of dependency diagram for its methods.
I define method x() to be a dependency of method y() if x() is called at least once in y().
I could use such a tool to isolate (if possible) subsets of class methods that have no external dependencies (all their dependencies are methods from the same subset).
I'm planning to move some functionality into other classes and I think that such an approach would help me to decide which parts to extract from the initial huge class.
Edit: I would really like a command-line tool.
Have you looked at Snakefood yet? It looks like it's exactly what you're looking for.
Have you tried pydev? It's a python extension for eclipse. I believe it allows you to use the "call hierarchy" feature of Eclipse to view a call graph for a given method. It's not quite what you want but maybe it's enough to get started.
Pycallgraph should do what you are looking for.
Just started using pydeps and so far it works well.
i was confuse in this question too,i have found a search helper help me to find the call hierarchy in another way. not very good but better than donot have. sorry about my english.
ps.IDE eclipse+pydev

Categories