LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-10-2005, 01:20 PM   #1
redarrow
Member
 
Registered: Jul 2005
Location: South Africa
Distribution: Fedora Core
Posts: 32

Rep: Reputation: 15
Question Embedding Python in C - adding a exit routine to a module?


Hi all,

I'm trying to embed Python in my C program...

So far I have a very basic set of modules /methods & types

My problem is I need a exit routine of some sort that the Python scripts can call to terminate..
calling sys.exit() from a python script terminates my app completely, I need a solution for just stopping execution of the script.


For example my app exports a method : "confirm" in module "gui" which pops up
a confirmation dialog:

if gui.confirm("Continue Yes/No") == gui.CONFIRM_NO:
sys.exit()

Here's where I need an alterantive, I should have a call like "gui.exit()" to stop script execution.


Anyone, any ideas / clues how to implement it??

Thanks a lot!
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no python module base.g? hcgernhardt Linux - Software 2 04-24-2018 09:03 AM
using distutils to install a python module shanenin Programming 2 11-29-2005 09:44 PM
Installing python module on webserver... = p Eleaf Linux - General 11 10-23-2005 07:07 PM
Help me (python and MySQLdb module) Dark Carnival Programming 2 04-22-2004 07:31 AM
python email module extracting headers artur Programming 3 02-06-2004 01:59 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration