Do you know an awesome Python library for manipulating dates? [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I search an awesome Python library date like Moment.js. Do you know some?
I want especially a library that can do conversions like this: 09/25/2012 00:00 - 09/25/2012 13:00 to 09/25/2012 00:00 - 13:00.

Some Python libraries inspired by Moment.js:
arrow
delorean
moment
Arrow and Delorean seem a bit more mature, although I have not really used any of them extensively.

datetime is as good as it gets. See it action here

datetime and it comes with the standard library. And here is Doug Hellman's introduction to the "module of the week".

You can try these 3rd party packages:
dateutil
mxDatetime : its parser is pretty good. Check whether the license works for you, though.

Related

The best way to document python code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm starting to work on documentation of python33 modules. But I'm beginner in this field.
I will be very grateful if you will help me to choose good instrument to do this.
I read a lot of topics in Internet. I've fount that the most popular are sphinx and Epydoc. But which of them is better to use? Almost all problems discussed in the Internet are quite old. I'm sure that situation is changed since 2011 year.. May be somebody is pro in doing docs for python docs. Please help to make first steps.
Cannot imagine more useful and helpful material except:
PEP8 Comments section
PEP8 Documentation Strings section
Documentation thread of The Hitchhiker’s Guide to Python
And, yes:
Epydoc is discontinued. Use Sphinx instead.
Hope that helps.

matplotlib documentation in html format [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
I like the matplotlib documentation at this web address,
http://matplotlib.org/index.html
but I cannot access it when my laptop computer is offline (traveling, etc.)
Can anyone recommend a way to download the html docs for matplotlib?
This is possible for the python docs.
Thanks.
Bill
The whole matplotlib.org website is stored in a github repository. You can download the whole thing from:
https://github.com/matplotlib/matplotlib.github.com
(direct zip link: https://github.com/matplotlib/matplotlib.github.com/archive/master.zip)
The result will probably be a pretty big zip file. Alternatively, as others have said, you can build the documentation yourself by following:
http://matplotlib.org/devel/documenting_mpl.html
HTH
The Documentation is available as a PDF for download at:
http://matplotlib.org/Matplotlib.pdf

Python to C converter / interpreter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What are various tools to convert Python scripts to C. I am mainly looking at speed of such tools/converter/interpreter.
Thanks,
-J
cython is what you are looking for http://www.cython.org/
Mark Dufour's Shedskin is an interesting alternative, that can parse a large subset of python, and translate it to C++. The project also has a really good blog
You could use Pypy to translate a subset of Python language to C.

XMPP server in python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking hard but I cannot find any XMPP server in python with the following features:
using epoll, just like http://www.gevent.org/
supporting BOSH
modular design
use little RAM/CPU for up to 1000 users
more important than the previous requirement: the CPU/RAM usage must be predictable
Prosody looks quite good feature-wise, but I don't know how many users it can support simultaneously and how it is performance-wise.
Could someone give me an idea?
For a rough idea of how Prosody is performance-wise, see this post on their ML. https://groups.google.com/d/topic/prosody-users/SlXpfwJfgY4/discussion
xmpp.org uses Prosody, any other questions? :P
btw, if you want to toy with it a little, you can always run prosody using luajit (didn't test that myself, but I'm fairly sure it would work). Expect at least 2-4x faster execution.
Look # ejabberd too.

Parsing HTML in Python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What's my best bet for parsing HTML if I can't use BeautifulSoup or lxml? I've got some code that uses SGMLlib but it's a bit low-level and it's now deprecated.
I would prefer if it could stomache a bit of malformed HTML although I'm pretty sure most of the input will be pretty clean.
Python has a native HTML parser, however the Tidy wrapper Nick suggested would probably be a solid choice as well. Tidy is a very common library, (written in C is it?)
Perhaps µTidylib will meet your needs?
You can install lxml and many other python modules easily and seamlessly on the Mac (OS X) using Pallet, which is the MacPorts official GUI
The module name is py27-lxml. Easy as 1,2,3.
http://www.xmlhack.com/read.php?item=1392
http://sourceforge.net/projects/pirxx/
http://pyxml.sourceforge.net/topics/
I don't have much experience with python, but I have used Xerces (from the Apache foundation) in the past and found it to be very useful. The learning curve isn't bad either, though I'm not coming from a python perspective. I suggest you consider it though. (The first two links I've included discuss python interfaces to Xerces and the last one is the first google hit on "python xml").
htql is good at handling malformed html:
http://htql.net/
html5lib is good:
http://code.google.com/p/html5lib/
Update: The link above is broken. A third-party mirror of above, can be accessed from https://github.com/html5lib/gcode-import

Categories