All Questions

Tagged with
Filter by
Sorted by
Tagged with
30 votes
4 answers
29k views

Adding packages to Python "embedded" installation for Windows

From the documentation: The embedded distribution is a ZIP file containing a minimal Python environment. Sounds great! The 64-bit Windows embedded v3.6.5 of Python is only 13MB. As an ...
feetwet's user avatar
  • 3,360
27 votes
4 answers
40k views

Embedding a Pygame window into a Tkinter or WxPython frame

A friend and I are making a game in pygame. We would like to have a pygame window embedded into a tkinter or WxPython frame, so that we can include text input, buttons, and dropdown menus that are ...
user avatar
27 votes
5 answers
21k views

How to embed a Python interpreter in a PyQT widget

I want to be able to bring up an interactive python terminal from my python application. Some, but not all, variables in my program needs to be exposed to the interpreter. Currently I use a sub-...
Mathias's user avatar
  • 1,456
24 votes
7 answers
170k views

How can I send an embed via my Discord bot, w/python?

I've been working on a Discord bot, and I'd like to make things more custom. I've been trying to make the bot send embeds, instead of normal messages. embed = discord.Embed(title="Tile", ...
Norberto A.'s user avatar
23 votes
4 answers
12k views

C++ with Python embedding: crash if Python not installed

I'm developing on Windows, and I've searched everywhere without finding anyone talking about this kind of thing. I made a C++ app on my desktop that embedded Python 3.1 using MSVC. I linked python31....
apostrophest's user avatar
22 votes
1 answer
1k views

Debug a problem in tk85.dll in an application that embeds the Python interpreter

My C++ application embeds the Python interpreter, but seems to be having some trouble when it shuts down. Right after the main window closes, I get a segmentation fault (this is Windows, but we'll ...
Nathan Osman's user avatar
  • 72.3k
19 votes
3 answers
13k views

Create and call python function from string via C API

Is it possible to load a python function from a string and then call that function with arguments and get the return value? I'm using the python C API to run python code from inside my C++ ...
alanc10n's user avatar
  • 4,977
17 votes
4 answers
13k views

Embedding icon in .exe with py2exe, visible in Vista?

I've been trying to embed an icon (.ico) into my "compyled" .exe with py2exe. Py2Exe does have a way to embed an icon: windows=[{ 'script':'MyScript.py', 'icon_resources':[(1,'MyIcon.ico')] }...
Etienne Perot's user avatar
12 votes
7 answers
11k views

Embed Python into Fortran

I was looking at the option of embedding Python into Fortran to add Python functionality to my existing Fortran 90 code. I know that it can be done the other way around by extending Python with ...
Ravi's user avatar
  • 165
12 votes
2 answers
8k views

How can I embed a python interpreter frame in python using tkinter?

I want to add a control terminal widget to my pure python+tkinter application similar to the python interpreter provided in Blender. It should be running within the same context (process) so the user ...
Ralph Ritoch's user avatar
  • 3,342
11 votes
2 answers
4k views

Python - C embedded Segmentation fault

I am facing a problem similar to the Py_initialize / Py_Finalize not working twice with numpy .. The basic coding in C: Py_Initialize(); import_array(); //Call a python function which imports numpy ...
vijayvammi's user avatar
11 votes
3 answers
4k views

How to reinitialise an embedded Python interpreter?

I'm working on embedding Python in our test suite application. The purpose is to use Python to run several tests scripts to collect data and make a report of tests. Multiple test scripts for one test ...
nab's user avatar
  • 301
10 votes
1 answer
4k views

Make bokeh charts with interactive controls in django

I have a django application which eventually uses embedded bokeh visualizations. Right now I get by using the bokeh.embed.components function and a template like: <body> {{the_div|safe}} ...
NublicPablo's user avatar
9 votes
2 answers
4k views

Virtual environments and embedding Python

I'm quite fond of Python's virtualenv, which facilitates maintenance of separate Python configurations. I'm considering embedding Python into a C++ application and was wondering how the embedded ...
André Caron's user avatar
  • 44.9k
8 votes
1 answer
1k views

Embed Pandas df html table in email using python 3

I am trying to embed and send html table created with pandas .to_html. I'm happy to either send the df directly to the email or from a file. So far I can embed images with the following: fp = open(...
bassmann's user avatar
  • 260
8 votes
0 answers
819 views

Complicated Cython embedded executable with f2py compiled module

I am trying to cythonize a python project found at https://pypi.python.org/packages/source/p/phaseshifts/phaseshifts-0.1.2-dev.zip with the end goal of creating a standalone executable for the phsh.py ...
Liam Deacon's user avatar
7 votes
2 answers
12k views

Embedded interactive shell in IPython

Before switching to IPython v0.11 (using Python 2.6.1), it was possible to embed an interactive IPython shell using for example this, e.g. from IPython.Shell import IPShellEmbed ipshell = ...
Alain's user avatar
  • 5,675
7 votes
3 answers
4k views

Django template: Embed css from file

I'm working on an email template, therefor I would like to embed a css file <head> <style>{{ embed 'css/TEST.css' content here }}</style> </head> instead of linking it &...
T. Christiansen's user avatar
7 votes
3 answers
5k views

How should I embed Python in a C++ Builder / Delphi 2010 application?

I'm interested in experimenting with embedding Python in my application, to let the user run Python scripts within the application environment, accessing internal (C++-implemented) objects, etc. I'm ...
David's user avatar
  • 13.5k
7 votes
1 answer
6k views

Want to use Python Libraries in Android

I am building an application for Android. It will interface with some C++ libraries using Android NDK through JNI. There are also some libraries that are written in Python that I want to call from my ...
Sid Kshatriya's user avatar
7 votes
0 answers
8k views

Embed image in body of the email in python

I have an image in a .png file. I am trying to embed this image in the body of an email using Python. I tried various options available on the internet, but they provided solutions for attaching the ...
dhd's user avatar
  • 71
6 votes
1 answer
2k views

Embeded pdf File is not displaying in Django

I was trying to display photos and pdf files in a django project using <embed> but pdf file is not displaying Here is what i was doing This is view function @login_required def view_documents(...
Shiv Solanki's user avatar
6 votes
1 answer
6k views

undefined reference in basic boost:pyton program

I wanted to start using boost:python to embed python in my C++ program, but I am already having problems with this simple code: #include <boost/python.hpp> //boost libraries #include <Python....
leoncvlt's user avatar
  • 385
6 votes
2 answers
3k views

Numpy import fails when embedding python in c

I'm trying to embed a python program to c++ code. the problem I have is to use python script that contain an numpy import. for example, if i use the following c++ code #include <Python.h> int ...
user1847003's user avatar
6 votes
0 answers
735 views

Embeding python in Vala

I want to embed the Python interpreter into a program written in Vala to allow for some runtime scripting. I can run parts of my vala code from Python using Introspection, and I've found a ...
ajg144's user avatar
  • 61
5 votes
4 answers
4k views

Embed pickle (or arbitrary) data in python script

In Perl, the interpreter kind of stops when it encounters a line with __END__ in it. This is often used to embed arbitrary data at the end of a perl script. In this way the perl script can fetch and ...
Boldewyn's user avatar
  • 82.1k
5 votes
1 answer
7k views

Is it possible to embed and run Python code on HTML?

I'm trying to run a Python script with HTML code embedded and it's not working. I'm want to execute a Python script and at the same time render the HTML which will be printed by the script. app.py: #...
ivanleoncz's user avatar
  • 9,556
5 votes
1 answer
2k views

Python for .NET: System.BadImageFormatException when embedding

I'm trying to embed Python in my .NET application. I'm using Python 3.6.1 64-bit on Windows 10 and I have installed pythonnet 2.3.0 from PyPi using pip. I've referenced Python.Runtime.dll from C:\...
DfM's user avatar
  • 539
5 votes
3 answers
3k views

Python embedding

I would like to have a single big binary which embeds Python interpreter and a small script - I'm totally new to this whole static linking, configure & make and GCC et al. Please, could someone ...
Ecir Hana's user avatar
  • 11.1k
5 votes
1 answer
10k views

Python: Embed pandas plot in Tkinter GUI

I'm writing an application using pandas DataFrames in Python 2.7. I need to plot columns of my DataFrames to a Tkinter window. I know that I can plot pandas DataFrames columns using the built-in plot ...
Alarik's user avatar
  • 523
5 votes
1 answer
872 views

how to load a custom python module in c

I am , as of now, simply trying to get this example given in the python docs for embedding a python module in C to work. My problem is I can't figure out where to put the python script. My ultimate ...
ewok's user avatar
  • 20.7k
5 votes
1 answer
1k views

Python threads in embedded Python: How?

While experimenting with Python's (python.org) C API, I found myself wondering how to properly spawn threads via Python's threading package when Python itself is embedded in a C program. Functions ...
Ty.'s user avatar
  • 121
4 votes
4 answers
2k views

Stop embedded python

I'm embedding python in a C++ plug-in. The plug-in calls a python algorithm dozens of times during each session, each time sending the algorithm different data. So far so good But now I have a ...
João Pereira's user avatar
4 votes
1 answer
5k views

Embedding an Image in a Tkinter Canvas widget using PIL

I'm trying to embed an image in a Tkinter canvas using PIL, and for some reason it's not displaying. Any Ideas? There are no errors or warnings. Just a blank Tk window. My code: import Tkinter ...
rectangletangle's user avatar
4 votes
1 answer
4k views

Use local file as set_thumbnail on embed in Discord.py

I want to post an embed with a thumbnail on it, with a local file on my PC. Whenever I try to run this code, the image is sent outside the embed. embedVar = discord.Embed(title="title", ...
Loboh67's user avatar
  • 53
4 votes
3 answers
9k views

Can a PyQt Embedded MatPlotLib Graph Be Interactive?

I have a stacked bar plot of analytics data embedded in my GUI which I would like to be more interactive. When the user hovers or clicks on a bar the plotted value should appear. Can this be done? I ...
Sadie LaBounty's user avatar
4 votes
1 answer
2k views

How does py2exe actually -and simply explained- work? :)

I have a c++ app that calls another python one (bundled into an exe with py2exe) So I have 2 apps. So I was wondering: What if my c++ did what py2exe does? i.e. embed the python app in the c++ one....
sandra's user avatar
  • 450
4 votes
1 answer
10k views

Embed python / numpy in C++

I am trying to use python 3 (with numpy) in my C++ application. This entails sending a C++ array to python, performing calculations and then retrieving the result in C++. To do this I based myself on ...
user3456032's user avatar
4 votes
2 answers
3k views

Modify HTML file to embed all external Scripts and CSS into <script> and <style> tags

I am searching for a way to automatically put all my scripts into the script tag in my HTML file. So I want this: <script src="..."></script> <script src="..."></script> ... ...
Josh's user avatar
  • 51
3 votes
4 answers
3k views

Python: import _io

I'm trying to determine which files in the Python library are strictly necessary for my script to run. Right now I'm trying to determine where _io.py is located. In io.py (no underscore), the _io.py ...
Paul's user avatar
  • 259
3 votes
2 answers
2k views

Trying to display a list of youtube videos into django template with django-embed-video

I am trying to embed a list of youtube videos, in which more videos will be added over time, into my django app using django-embed-video. Going after their documentation I did the following: models....
JRose's user avatar
  • 91
3 votes
1 answer
2k views

How to Embed Cartopy in a Python Tkinter GUI?

I'd like to embed a Cartopy module map in a Python (2.7) Tkinter GUI app (on a Windows 7 PC), but I need help figuring out how. As far as I understand, the Cartopy module simply enables matplotlib ...
Karim Bahgat's user avatar
  • 2,911
3 votes
1 answer
494 views

Can Python code be included into the body of NetLogo code?

As the title suggests, I am looking for a way to embed Python code into NetLogo. So far I have found the NetLogo Python extension but from my understanding this extension only runs in the NetLogo ...
tasidonya's user avatar
3 votes
1 answer
4k views

I'm embedding a pygame window into Tkinter, how do I manipulate the pygame window? [duplicate]

So I'm making a game in pygame, and I want to use tkinter as well. I embedded a pygame window into a tkinter window, but I can't seem to do anything with it. For context, here is the full code: ...
Elan SK's user avatar
  • 117
3 votes
1 answer
2k views

How to embed an image to use with wx.iconfrombitmap(wx.bitmap(path)) python

I have a python app, that I got from here and modified to my needs, but I would like to put the images I use for icons within the script, I am aware there might be performance issues but it's not a ...
Celso Caldeira's user avatar
3 votes
1 answer
12k views

Python Tkinter: Embed a matplotlib plot in a widget

I have already search for this, for example Python Tkinter Embed Matplotlib in GUI but still can't figure it out. Basically i am trying to plot a fancy graph for a player abilities for a basketball ...
Costantino's user avatar
3 votes
2 answers
3k views

Easily exporting python to someone without the interpreter

Suppose I have a group of people to whom I want to show my python program. I don't want to have to tell them each "Ok, go to the python website, install the interpreter, open IDLE, open my program, ...
user1048917's user avatar
3 votes
2 answers
901 views

How to display Plotly Dash on Python to a website?

I have created many interactive graphs on Plotly Dash (using Python) that are working perfectly on the local port. But I would like to integrate this into other products on a website. Is this possible?...
VINICIUS S's user avatar
3 votes
1 answer
11k views

How do I embed a python plot chart (or image) in ppt and refresh it

I can open a ppt. file with win32com, just unsure how to select the slide and insert an image in it, here is what I have: def createppt(): width=10 height=10 x=10 y=10 Image = ABFLgraph() ppt = ...
Canuk688's user avatar
  • 111
3 votes
1 answer
2k views

How to create and assign a Python variable in C?

I've initialized the Python environment by Py_Initialize(); I have no external Python module imported into the environment and everything works well. But when I need to pass a C string into this ...
alwinlin's user avatar
  • 703

1
2 3 4 5
7