need help

2022-10-23 Thread Shuaib Akhtar
How to fix Traceback (most recent call last):   File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\socket.py", line 833, in create_connection     sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed

bug in python 3.10.4

2022-05-25 Thread Shuaib Akhtar
When double clicking a .py file when have python install. It run file but at a spot of the program it stop running. But using the built-in ide for python this problem does not happen also any other ide it work fine       -- https://mail.python.org/mailman/listinfo/python-list

Embedding python: Segmentation Fault

2006-08-19 Thread Shuaib
Hi! I am trying to embed python into a C programe of mine. When the execution reaches the following line pModule = PyImport_Import(pName); It causes a Segmentation Fault Error. pModule is of type PyObject *, so is pName. What could be the possible reasons for the error? Thanks for your time.

Re: Embedding python: GCC gives errors of "undefined reference" to Py_* functions.

2006-08-19 Thread Shuaib
OK, I am not ashamed to admit that I am ashamed as I didn't search the group for my problem before posting it yet again. The solution was right there. I have link in my libpython2.4.so while compiling. $gcc -I/usr/include/python2.4/ -lpython2.4 -o foo foo.c Shuaib wrote: > Hey!

Embedding python: GCC gives errors of "undefined reference" to Py_* functions.

2006-08-19 Thread Shuaib
Hey! I am trying to embedd python into a C programe of mine. But when I try to compile the C code, gcc gives errors like "undefined reference to `Py_Finalize'" and the same kind for all the other functions. I have incuded "Python.h". Any idea what might be wrong? Thanks. -- http://mail.python.

Re: How do I catch ExpatError exception?

2006-08-16 Thread Shuaib
Steve Holden wrote: > import xml.parsers.expat Thanks, that worked. > > def r(): >return 1/0 > > try: >print r() > except: >import sys >t, v, tb = sys.exc_info() > > print "exception on line", tb.tb_lineno How do I get the helpful text that is thrown with the exception? Like i

How do I catch ExpatError exception?

2006-08-16 Thread Shuaib
Hey! I am getting this exception. xml.parsers.expat.ExpatError But I am not able to catch it with "except xml.parsers.expat.ExpatError:" It says "NameError: global name 'xml' is not defined". I am also not able to catch it with "except ExpatError:" Gives "NameError: global name 'xml' is not def

Re: Calling a python script, and getting the returned result in C

2006-08-16 Thread Shuaib
John Machin wrote: > > Then you need to read the Python manuals (surprise, surprise); in > particular here's a section that gives you most if not all of what you > want : > > http://docs.python.org/ext/pure-embedding.html > > but I'd suggest that you start reading a few pages back from there. > >

Re: Calling a python script, and getting the returned result in C

2006-08-16 Thread Shuaib
John Machin wrote: > Shuaib wrote: > > Hi! > > > > I have a python script which returns an Integer value. How do I call > > this script from a C programe, and use the result returned? > > To avoid confusion and possible irrelevant responses, please say whic

Calling a python script, and getting the returned result in C

2006-08-16 Thread Shuaib
Hi! I have a python script which returns an Integer value. How do I call this script from a C programe, and use the result returned? Thanks for your time. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter module not found

2006-08-11 Thread Shuaib
Well, I finally solved my problem. I just had to reinstall python with the USE flags of tcl and tk. #USE="tcl tk" emerge python And now I can use Tkinter Thanks guys! -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter module not found

2006-08-08 Thread Shuaib
Hey again, I am using the latest python available on my system (2.4). So I don't think that's the problem. Any more ideas? Do I need to install Tkinter as a seperate module/package? As I said, I've already installed Tcl/Tk, though. Thanks for your time. Tim Chase wrote: > > The cause of this i

Tkinter module not found

2006-08-08 Thread Shuaib
Hey, Even though I freshly installed Tcl and Tk, python still seem to have problems accessing Tkinter module. Here is what says when I do "import Tkinter" == Traceback (most recent call last): File "", line 1, in ? ImportError: No module named Tkinter == Any ideas how to fix this problem? (Gen