Tagged Questions
0
votes
0answers
19 views
can you create a pydev project without using an interpreter?
I'd like to use Eclipse to do some programming at work for Python (hence PyDev). However, I will programming on my workstation and then compiling on a remote server. Since that's the environment I'm ...
0
votes
2answers
32 views
How do I call a C Function from a Python File?
I am creating a GUI using Jython. I want to program my logic in C. How could I can call a C Function from my Python Code. Sorry if this a newbie question, but I have never worked with linking files ...
0
votes
0answers
18 views
Web2py {compile} slowing down response times
I am trying to boost the performance of a web2py application I have running so I turned on the profiler and noticed an item that is consistently on the top:
54126 function calls (53838 primitive ...
0
votes
1answer
24 views
how to read windows file in linux environment
I'm trying to execute a python program on linux which i first created it on windows, but the following error is shown:
metadata = eval(metafile.read())
File "< string >", line 1
@
@
@
@
@
...
0
votes
1answer
24 views
javascript equivalent of python's compile and exec
In python, one can take a string containing python code, compile it and run the resulting code with exec.
Can something similar be done with javascript (any implementation is good). My objective is ...
2
votes
2answers
48 views
how to convert a string to the desired form?
Good day! I'm trying to implement a module for testing knowledge. The user is given the task, he wrote the decision that is being sent and executed on the server. The question in the following. There ...
0
votes
1answer
60 views
Issue compiling using py2exe on Windows 7 x64
I'm using py2exe to compile my script into an exe file to run on Windows, but I'm hitting errors based on my OS, which is Window 7 x64. I'm running the below script in cmd using execmaker.py py2exe:
...
0
votes
0answers
21 views
Lib nlopt python interface compiling
I downloaded windows version here
and run setup.py in cmd
python setup.py install
but it gives me following error:
D:\nlopt-2.3-dll>python setup.py in
stall
running install
running build
...
0
votes
2answers
42 views
Compiling a python script I've written as an .exe and .app
To preface, I have very little python knowledge, so the simplest solution will probably be the best one.
Essentially, I've written a program that takes user input and writes it to a text file. I've ...
-3
votes
1answer
94 views
Compiling python files [closed]
How do I compile a python file as an exe?
So that the user can run the file by double clicking and not going through the python shell
Does anyone know how?
Thanks
0
votes
0answers
27 views
Python libmagic duplicate symbols error during install - OSX
I'm trying to build the Python libmagic library and install it, although when I make or make install I get duplicate symbols errors and it fails. Installing via homegrown is not an option.
$ make ...
1
vote
1answer
90 views
is there a way to compile a c/c++ program from python?
Currently I'm coding a python script to compile a C/C++ Linux kernel in the following way:
subprocess.check_call(["make", "-j5"])
subprocess.check_call(["make", "-j5", "modules_install"])
...
0
votes
1answer
35 views
Building with Boost.Python and static libraries
I want to make a C++ application that can handle python plugins, so i'm getting into boost.python. I'm creating some test programs that I build with CMake.
In my test program, I have a simple ...
2
votes
1answer
75 views
How to correct a compile/build issue with quickfix (v1.13.3) with Python support (… “_quickfix” import exception)
It took the equivalent of a 1/2 day for me to figure this out, so I want to share the Quickfix Engine compile problem I encountered and the solution.
I didn't get a reply from the "Quickfix Engine" ...
0
votes
1answer
88 views
Compiling/Installing py-bcrypt on Win7x64
I've got the following setup:
Win7 x64
Python 3.3
Visual Studio 2012 Ultimate
I'm trying to install the py-bcrypt using pip. Initially the install failed because it couldn't find vcvars.bat
By ...
3
votes
1answer
128 views
Issues understanding how to use Jython
I've just started learning Jython, and I'm having some issues with implementation. I've looked through the Demo files that come with Jython 2.5, and I'm still unsure how to implement Jython to get ...
0
votes
0answers
10 views
build pytrilinos using trilinos version already installed
I have access to a cluster where trilinos is already statically built.
Is it possible to build just pytrilinos myself linking to those libraries? or the only way is to built all of trilinos from ...
0
votes
2answers
133 views
no math module python [closed]
I am working in SunOS2.10.I pretty need xlwt(xlrd) modules in python(default ver. 2.4.6).In one folder of admin user, I have found Python 2.7.1, so if I write the full path to it I can use it instead ...
0
votes
0answers
76 views
How to build Python 2.6.8 with zlib on Ubuntu Server 12.04?
Missing zlib is common problem for Python 2.6, as I know.
I have zlib1g-dev installed, and I also tried this solution - and still not succeed.
Also I've tried ./configure ...
0
votes
1answer
106 views
Python: use of eval in interactive terminal. how to get return value. what compile-mode
I have some code like:
try:
c = compile(s, COMPILE_STRING_FN, "single")
except Exception as e:
answer = (idx, "compile-exception", (e.__class__.__name__, str(e)))
else:
...
0
votes
1answer
84 views
JPype won't compile properly
So I am having trouble compiling a very simple python script using jpype.
My code goes like:
from jpype import *
startJVM(getDefaultJVMPath(), "-ea")
java.lang.System.out.println("hello world")
...
0
votes
0answers
67 views
Link Application Against Python 2.6 and 2.7 (or make it version independent)
I'm compiling a copy of FreeRADIUS, which allows you to extend the core functionality with Python modules. (This can apply to any application though, not just FreeRADIUS.)
It includes ...
1
vote
2answers
188 views
Adding include path to Waf configuration (C++)
How can I add a include path to wscript?
I know I can declare which files from which folders I want to include per any cpp file, like:
def build(bld):
bld(features='c cxx cxxprogram',
...
0
votes
1answer
70 views
How to avoid the black shell window after compiling my script with pyinstaller [duplicate]
I am using wxpython to develop a GUI and I compiled it with pyinstaller. Everything works fine but there is always a black shell window pop up before it actually lunch the program. (Just like you use ...
3
votes
3answers
82 views
Compiling Regular Expressions in Python
I'm working through Doug Hellman's "The Python Standard Library by Example" and came across this:
"1.3.2 Compiling Expressions
re includes module-level functions for working with regular expressions ...
3
votes
2answers
302 views
What makes C faster than Python? [closed]
I know this is probably a very obvious answer and that I'm exposing myself to less-than-helpful snarky comments, but I don't know the answer so here goes.
If Python compiles to bytecode at runtime, ...
1
vote
0answers
77 views
Compiling S-Transform python wrappers on Mac OS X 64 bit
I am trying to compile a the s-transform python wrappers from here on my Mac (Mountain Lion, gcc45 installed from Macports, Python installed via Enthought 64-bit).
I am a user in science rather than ...
0
votes
0answers
44 views
virtualenv + special Python interpreter
I would like to ship my piece of Python code with special version of Python interpreter, because when code is moved between servers there are often differences in Python versions and I'd like to skip ...
1
vote
0answers
95 views
Compiling Python to a static lib and using pythoncore.lib
I'm trying to build Python 2.7 as a static single .lib file.
I've already made the following changes to the Python source code:
Change to "Release" mode.
Change all DLL projects to Static library ...
0
votes
1answer
313 views
Install Numpy compiled for VS2010 for an embedded interpreter
Another of my queries about an embedded Python 2.7.3 interpreter on Windows. I need to install numpy and matplotlib as support packages for an embedded interpreter in a C++ program compiled in Visual ...
1
vote
3answers
212 views
Convert an exe and it's dependant file into one stand-alone exe
I'm using cx_Freeze to compile python programs into executables and it works just fine, but the problem is that is doesn't compile the .py scripts into one exe, it converts them into a .exe file AND a ...
0
votes
0answers
118 views
Error running Cython (“error Python headers needed to compile C extensions”)
Friends:
I am a novice programmer, and I recently installed Python 2.7.3 and Cython. I have no idea if my python is the "development" version or not, but it has an "include" folder that has all the ...
3
votes
4answers
149 views
Will users be able to open my program without downloading Python ?
Im making a program in python, but once i'm finished with the program, will the users of it have to download the environment in order to use my program, or will it work without the python environment ...
1
vote
1answer
243 views
Python youtube-dl recompile
The old youtube-dl use to be just one file so it was easy for me to edit. The new version has multiple files inside of it. To get it to work on my server I needed to extract the files and change the ...
0
votes
0answers
94 views
Building python from source getting hundreds of PyArg_ParseTuple unrecognized format function errors
Building python from source getting hundreds of PyArg_ParseTuple unrecognized format function errors.
Tried it on Ubuntu 10 and Ubuntu 12, Python 2.6 and 2.7.
For example:
Compile thumb : ...
0
votes
2answers
222 views
.pyc files generated in different folder
Friends,
I was trying to create a python distribution. I executed the commands:
python setup.py sdist followed by python setup.py install
but the distribution created showed up folders build and dist ...
2
votes
2answers
120 views
Compiler Python, why are some wrong things overlooked?
I wrote a Python routine with a mistake in it: false instead of False. However, it was not discovered at compilation. The program had to run until this line to notify the wrongdoing.
Why is it so? ...
1
vote
1answer
208 views
OpenCV - IPP, TBB and CUDA in Python bindings
I'm using the Python bindings for OpenCV, which is basically done just by compiling the OpenCV package and placing a .pyd file in my Python distribution.
My question is: If I compile the OpenCV ...
7
votes
4answers
7k views
How to compile python script to binary executable
I have to convert python script to windows executable.
I have installed python 2.6 in my system.
I can see a folder in c drive naming python26 which contain all the files.
I have created one ...
0
votes
1answer
124 views
cmake compile python code then placing it somewhere else
I have python file, for example, named blah.py, that I would like to have compiled then placed into another folder using cmake. Right now, I am capable of doing this with the following code in my ...
0
votes
1answer
256 views
Cmake compiling python into build folder
I think an example would be the best way to demonstrate my problem:
Lets say I have a source directory named src. This directory has two files, a CMakeLists.txt file and a python file named blah. In ...
2
votes
3answers
208 views
Using scripting language in C++
My question is a little bit stupid but I decided to ask advanced programmers like some of you. So I want to make a "dynamic" C++ program. My idea is to compile it and after compilation (maybe with ...
1
vote
0answers
226 views
Py2EXE Compile Error using Pygame
I'm just using Py2exe to compile a simple pygame program into an executable file, but I get the following error:
*** binary dependencies ***
Your executable(s) also depend on these dlls which are not ...
4
votes
4answers
181 views
Why does there seem to be tension between the simplicity of a language and execution time? [closed]
It seems to me that languages that are quite simple to use (i.e. Python) often have slower execution times than languages that are deemed more complex to learn (i.e. C++ or Java). Why? I understand ...
2
votes
0answers
21 views
__LP64__ check when compiling Python.framework on OSX?
I'm building Python from source on MacOSX against the 10.6 SDK. I'm using --with-universal-archs="intel" and --enable-framework which should create a framework compatible with both 32bit and 64bit ...
3
votes
2answers
1k views
How to run Python script with one icon click?
Sorry, for the vague question, don't know actually how to ask this nor the rightful terminologies for it.
How to run a python script/bytecode/.pyc (any compiled python code) without going through the ...
0
votes
0answers
154 views
Unable to compile python 2.7.2 with pythonbrew
I am using 64-bit distribution of Linux (openSUSE 12.1). I was trying to compile python 2.7.2 with pythonbrew but run into issues.
Here is my install command:
...
0
votes
0answers
97 views
Building the _tkinter module in Python 3.3.0b1 for Win32/Visual Studio 2010 from source
_tkinter is the only module giving me problems; the dependencies are set in the vcprops like so:
<tcltkDir>$(externalsDir)\tcltk</tcltkDir>
But the actual sources come in two seperate ...
0
votes
1answer
164 views
Try/except not catching errors in compiled Python
I've got a bit of code involving Try and Except clauses. When I just run it in console in IDLE, it works perfectly, and never crashes. However, when I compile it is fails to catch errors, so the ...
4
votes
1answer
434 views
How to compile and link multiple python modules (or packages) using cython?
I have several python modules (organized into packages), which depend on each other. e.g.
Module1
Module2: imports Module1
Module3
Module4: imports Module3, Module 2, Module 1
Let's assume the ...