python3 (1,339)


What's the best way to use web services in python?

What's the best way to use web services in python?

I have a medium sized application that runs as a.net web-service which I do not control, and I want to create a loose pythonic API above it to enable easy scripting. I wanted to know what is the bes…


python - Iterate over subclasses of a given class in a given module

In Python, given a module X and a class Y, how can I iterate or generate a list of all subclasses of Y that exist in module X?…


Passing on named variable arguments in python

Say I have the following methods: def methodA(arg,**kwargs): pass def methodB(arg,*args,**kwargs): pass In methodA I wish to call methodB, passing on the kwargs. However, it seems that if…


python - Getting international characters from a web page?

This question already has an answer here: Decode HTML entities in Python string? 5 answers I want to scrape some information off a football(soccer) web pa…


XML writing tools for Python

I'm currently trying ElementTree and it looks fine, it escapes HTML entities and so on and so forth. Am I missing something truly wonderful I haven't heard of? This is similar to what I'm actually do…


python - How to import a module given the full path?

How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.…


Why isn't the 'len' function inherited by dictionaries and lists in Python

example: a_list=[1, 2, 3] a_list.len()#doesn't work len(a_list)#works Python being(very) object oriented, I don't understand why the 'len' function isn't inherited by the object. Plus I keep…



Calling an external command in Python

How can I call an external command(as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?…


Building Python C extension modules for Windows

I have a C extension module and it would be nice to distribute built binaries. Setuptools makes it easy to build extensions modules on OS X and GNU/Linux, since those OSs come with GCC, but I don't k…


Which Python memory profiler is recommended?

I want to know the memory usage of my Python application and specifically want to know what code blocks/portions or objects are consuming most memory. Google search shows a commercial one is Python Me…




python install example file windows not from module pip string