Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Error running Python at command line

Hello !

I'm running a simple Python script at TCC command line prompt and, it issues this error :

TCC (Sys) DLL not found : python26.dll

Notice that I have python 3.4.4 installed on my PC.

Also, when I run the same script from Windows Explorer it is ok, that is, the ".py" extension is correctly associated with Python.

The problem is only at TCC command line.

Also, should I call the interpreter explicitly , by issuing "py myscript.py" at command prompt, it also runs fine.

The problem is some sort of implicit association of TCC with Python version 26.

Another problem is that I can't run from inside my BTMs the @python function as well.

Again, implicit association of TCC with Python version 26.

Any suggestions ?
 
There is no implicit association of TCC with Python 2.6 (or any other version of Python). TCC will look in your path for multiple versions of Python (from 3.6.x to 2.5) and use the most recent one it can find. In your case (provided you put Python in your PATH), TCC will look for python34.dll.

The error message you're seeing is being returned by Python, not by TCC. I suspect you have a (partial?) Python 2.6 directory in your PATH before your Python 3.4 directory.
 
There is no implicit association of TCC with Python 2.6 (or any other version of Python). TCC will look in your path for multiple versions of Python (from 3.6.x to 2.5) and use the most recent one it can find. In your case (provided you put Python in your PATH), TCC will look for python34.dll.

The error message you're seeing is being returned by Python, not by TCC. I suspect you have a (partial?) Python 2.6 directory in your PATH before your Python 3.4 directory.

I only have Python 3.4.4 installed and also , this is the only one mentioned at my PATH. I had 2.6 indeed but it was uninstalled.

But there are some issues somewhat complicated ( :-( ) :
  • I'm running on Windows XP .
  • I'm still using version 11 !
I know, I know I shouldn't but, there are other technical stuff that I can't migrate right now.

On the other hand, the Python I'm using is from Python.org . I didn't know that I needed Active State Python .... Do I ? If I do, it looks like Active State Python also does not support Windows XP...

I can upgrade TCC to version 16 (or a later one that supports XP as well) but again, Active State wont allow me to run on XP...
 
There is no implicit association of TCC with Python 2.6 (or any other version of Python). TCC will look in your path for multiple versions of Python (from 3.6.x to 2.5) and use the most recent one it can find. In your case (provided you put Python in your PATH), TCC will look for python34.dll.

The error message you're seeing is being returned by Python, not by TCC. I suspect you have a (partial?) Python 2.6 directory in your PATH before your Python 3.4 directory.

py and python run fine, @python can't find its dll

I can't even use python regex's, trying to check that box hangs tcmd, requiring a task manager end task.
 

Attachments

  • t.btm
    260 bytes · Views: 279
I think the operative word there may be 'almost'. - I put a path statement in the btm and included the >& output to hopefully show that tcmd thinks python37.dll is in the path.

I really don't so much need @python, but having grep as the regex model is not so good.

The regex analyzer does not work with python checked and as I mentioned tcmd hangs when I try to select python as the regex syntax. I have tested this now on another machine, also running python3.7, though still with tcmd22 with exactly the same results.

A bit more info in the attached file this time.
 

Attachments

  • t.btm
    1.5 KB · Views: 270
There's several things going wrong in your t.btm.

1) The Python developers broke python3.dll in version 3.7.x - it's failing to export one of the functions (PyRun_SimpleString). (This does work in version 3.6.) I've added a workaround for the next build of TCC.

2) Your "%@python["print(*'abcdefhl',sep=' ')"]" line is meaningless - it will evaluate to a string ("a b c d e f h l") which TCC will then attempt to execute as a command (and fail). Did you mean to prefix that with an ECHO?

3) Your "%@python" syntax is wrong - you should not be using double quotes around the @python arguments. It should be something like "%@python[print(*'abcdefhl',sep=' ')]
 

Similar threads

Back
Top