Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 3rd, 2004, 07:21 PM
BaXi BaXi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Iceland
Posts: 35 BaXi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 13 sec
Reputation Power: 8
python interpreter as dll

I was wondering if there was a way to compile the python interpreter as a dll. What i'm thinking about is that I really want to use python in my C++ apps for handling all sorts of minor task in them such as macros, game logic etc, but I don't want to have a "You must download the python interpreter to use this app" dependencie. I just want to have the python interpreter as a dll in my apps' dir. Can this be done? If so, how?

Regards,

Andri Mar Jónsson

Reply With Quote
  #2  
Old October 4th, 2004, 12:52 AM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
Read this, it explains how to embed Python in stuff:

http://docs.python.org/ext/ext.html
__________________
Debian - because life's too short for worrying.
Best. (Python.) IRC bot. ever.

Last edited by Strike : October 4th, 2004 at 10:57 AM. Reason: linkification

Reply With Quote
  #3  
Old October 4th, 2004, 03:48 AM
DevCoach DevCoach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2004
Location: London, England
Posts: 1,254 DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 8 h 9 m
Reputation Power: 265
The python interpreter is already in a dll - search for python23.dll in your Windows/system32 directory. (Assuming you have Python 2.3 installed).

The python.exe program is a thin wrapper round the dll to make it executable. The link that Strike posted will show you how to embed python in other programs.

Dave - The Developers' Coach.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > python interpreter as dll


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT