473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

terminate execfile

How to terminate execfile() in the middle of its execution. Any
pointers ???
Its very urgent please........
Thanks
Teja.P

Oct 14 '06 #1
2 1575

Teja wrote:
How to terminate execfile() in the middle of its execution. Any
pointers ???
Its very urgent please........
Thanks
Teja.P
Can I raise an interrupt using PyErr_SetInterrupt??? Is so , does any
one know how to do it?

Oct 14 '06 #2

Teja wrote:
Teja wrote:
How to terminate execfile() in the middle of its execution. Any
pointers ???
Its very urgent please........
Thanks
Teja.P

Can I raise an interrupt using PyErr_SetInterrupt??? Is so , does any
one know how to do it?
I presume there is only one thread of execution here, so the file being
execfiled would have to recognise an error condition and raise an
un-caught exception.

- Paddy.

Oct 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jonathan | last post by:
I'm puzzled by Python's behavior when binding local variables which are introduced within exec() or execfile() statements. First, consider this simple Python program: # main.py def f() : x = 1...
1
by: Bo Jacobsen | last post by:
I have a number of files compiled to bytecode using py_compile.compile(). The .pyc files can be invoked by python directly ($python file.pyc), but "loading" them by execfile just throws an...
3
by: v.vayer | last post by:
I need to execfile() from a function in order to set value for a global variable from inside the executed file. I know there are "globals" and "locals" optional arguments for execfile, but I just...
5
by: Helmut Jarausch | last post by:
Hi, I'm still looking for an elegant and clear means to terminate the main script in Python. Unfortunately, Python doesn't allow a 'return' instruction in the main script. Using...
2
by: Alex Popescu | last post by:
Hi all! not be present in Py3k. So, I am wondering what will be its replacement? Considering that most probably Py3k will keep eval and exec, this will still be possible (indeed requiring manual...
1
by: Fernando Perez | last post by:
Hi all, I'm finding the following behavior truly puzzling, but before I post a bug report on the site, I'd rather be corrected if I'm just missing somethin obvious. Consider the following...
5
by: George Sakkis | last post by:
I maintain a few configuration files in Python syntax (mainly nested dicts of ints and strings) and use execfile() to read them back to Python. This has been working great; it combines the...
1
by: moijes12 | last post by:
Hi i have 3 python files and i want to execute the files sequentially using the execfile command.Hence ,i have written the following program fileList = for fileName in fileList :...
4
by: TP | last post by:
Hello, I have a script that uses the "optparse" package to parse the command line. For example: $ script.py --help # displays help about script.py Is this possible to call such a script...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.