» Home » Python » Page 1
How to easily distribute Python software that has Python module dependencies? Frustrations in Python package installation on Unix
by poofyhairguy in Operating Systems

My goal is to distribute a Python package that has several other widely used Python packages as dependencies. My package depends on well written, Pypi-indexed packages like pandas, scipy and numpy, and specifies in the setup.py that certain versions or higher of these are needed, e.g. "numpy >= 1.5".

I found that it's immensely frustrating and nearly impossible for Unix savvy users

how to call a python bytecode file by boost.python or by python/c api
by comphollic in Programming Languages

I have some python bytecode file as "a.pyc","b.pyc".I want to run this file in c++ code.
The code can call boost.python or python/c api.

PyObject* PyEval_EvalCode(PyCodeObject *co, PyObject *globals, PyObject *locals)

But how to get PyCodeObject from the bytecode file.

Revert from Python 2.7 to Python 2.6 in Mac OSX 10.6.8 doesn't work even though I've uninstalled Python 2.7
by socurious in Programming Languages

I have mac OSX 10.6.8. My system came with Python 2.6
I recently installed Python 2.7 but experienced many problems with it so decided to revert back to Python 2.6 by executing

$ sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7

I also removed Python 2.7 from my Applications folder.

Still, however, when I run


Emacs on Mac for Python - python-mode keeps using the default Python version
by Morbo in Programming Languages

how do I change the version of Python that emacs uses in the python-mode to the latest version that I just installed ?

I tried setting the PATH in my init.el file to the path where the latest version of python resides but its not working.

Problems with Python 2.7 + wxPython 2.8.11? Should I switch back to Python 2.6.5 + wx.Python
by Philippines in Programming Languages

I'm currently using Python 2.7 + wxPython 2.8.11 on my windows machine. While trying to build a small project (which also uses comtypes and lets say any activex such as flashwindow) I'm getting the following error:

>>>"c:Program FilesPython_2.7python.exe" setup.py py2exe
running py2exe
*** searching for required modules ***
*** parsing results ***

Boost::Python Forward Declaration of boost::python::object throwing python TypeError
by zuz in Programming Languages

I'm trying to refactor parts of my project, particularly the Python/C++ interface.
The standard boost::python python initialization was working before:

boost::python::object main_module = boost::python::import("__main__");
boost::python::object globals(main_module.attr("__dict__"));


However, after factoring that into a class of i

How to host python cgi script with `python -m SimpleHTTPServer 8000` or `python -m CGIHTTPServer 8000`?
by Jesse McDowell in Programming Languages

When I run python -m SimpleHTTPServer 8000 or python -m CGIHTTPServer 8000 in my shell I am hosting the content of my current directory to the internet.

I would like to make the following cgi_script.py work correctly using the above command in the command line when I browse to 192.xxx.x.xx:8000/cgi_script.py

#!/usr/bin/env python

Python - Calling a non python program from python?
by Jerome in Programming Languages

I am currently struggling to call a non python program from a python script.

I have a ~1000 files that when passed through this C++ program will generate ~1000 outputs. Each output file must have a distinct name.

The command I wish to run is of the form:

program_name -input -output -o1 -o2 -o3

To date I have tried:


How to let js make a request from python and preserve the loaded site in place when answered by python
by Excessi0n in Web Design

Opening a site economizing the data load I seem to run into a need to add more data from Python occasionally. I use Python with CherryPy and Mako for loading a site.

So, how can I make a JavaScript request from Python to pass me some more data, once the site was loaded already. I want to do that without moving away from the site. I know that JavaScript can do all sorts of thing

how to write installer (installing python, python modules and other dependencies) for windows boxes?
by Aaviel in Programming Languages

I know nothing on this subject, but I need suggestions about the best tools or method for creating a setup program that installs python, some custom python modules, some other python modules such as PIL, and some EXE dependencies, all living on a network repository, on windows machines. In the repository are installers for python (msi file), PIL (exe file), the custom python modules (pyc files)


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .