Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

How to set-up stealth + python?

Ask for help
Post Reply
thax
Posts: 2
Joined: 26.09.2017 21:51

How to set-up stealth + python?

Post by thax »

Hello guys, I would like to ask you for help.

I wanted to start using Stealth (8.4.5) + Python (2.7.14 and also different versions). I installed x86 version as I found on the forum.

The problem is I cannot make my scripts running. Furthest Ive got was "Found Python version: 2.7" but nothing happened.
Can you please advice me how to set it up?

thanks a lot!
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: How to set-up stealth + python?

Post by Vizit0r »

in common no need any additional settings - just load PY script and run it, thats all

if solutuin not found yet, write me in skype.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Hurley
Posts: 8
Joined: 20.05.2017 16:28

Re: How to set-up stealth + python?

Post by Hurley »

I experienced a similar problem with the recent versions of Stealth. I've found that version 7.9.0 is able to run Python exactly as Vizit0r described, just load the script and click play. However when trying to run the same scripts in version 8 nothing happens. There is no error message and no action taken by the client. Therefore I'm still using version 7.9.0.

If there is any other information I can provide I'd be happy to help.
GeeZeR
Apprentice
Apprentice
Posts: 226
Joined: 28.01.2012 19:48

Re: How to set-up stealth + python?

Post by GeeZeR »

Vizit0r, да выпили ты этот питон, вишь человек мучаецо, пусть паскаль зубрит. Зачем лишний гемор питоны и проч.
Stealth 8.10.2 | Клиент: 7.0.13.4
thax
Posts: 2
Joined: 26.09.2017 21:51

Re: How to set-up stealth + python?

Post by thax »

I was trying version 8.4.5, 7.11.0, and 6.7

Only the 6.7 I was able to run it very easily as described above, the newer version I tried "everything" and nothing worked :(
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: How to set-up stealth + python?

Post by Vizit0r »

in 8.5.1 will work.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Hurley
Posts: 8
Joined: 20.05.2017 16:28

Re: How to set-up stealth + python?

Post by Hurley »

I can confirm that the issue is resolved in 8.5.1. I did some preliminary testing with some basic scripts and all worked well. Thanks for your help Vizit0r!
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: How to set-up stealth + python?

Post by Vizit0r »

resolved, but only partially :)
Today will be one more release, including py fixes.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Hurley
Posts: 8
Joined: 20.05.2017 16:28

Re: How to set-up stealth + python?

Post by Hurley »

Great! Thanks for your continued support of Python. I know it's not the most commonly used language with Stealth, but I find it very useful.
Hurley
Posts: 8
Joined: 20.05.2017 16:28

Re: How to set-up stealth + python?

Post by Hurley »

This problem has appeared again in the current version of Stealth 8.8.3.

I am able to load the python script in stealth, but nothing happens when the run button is clicked. I'd be happy to provide more detail if needed.
nah nah
Developer
Developer
Posts: 414
Joined: 13.07.2011 11:23
Contact:

Re: How to set-up stealth + python?

Post by nah nah »

what is your python version?
Nope! Can you contact me with the Skype? my id is ZeroDX2
Hurley
Posts: 8
Joined: 20.05.2017 16:28

Re: How to set-up stealth + python?

Post by Hurley »

I was able to get this resolved by starting with a fresh install of Stealth.

I wasn't able to diagnose the full problem, but it appeared to be related to significant changes to the Python wrapper. I still had old versions of the wrapper in my working directory. The old wrapper still worked when I ran external scripts or used the built-in convert.pyw script. However, it was no longer compatible with running scripts directly from the Stealth application.

I'm happy to see the active Python development for Stealth and the creation of the new wrapper. Thank you nah nah for all of your work! I have a lot of work ahead of me to get familiar with the new wrapper.

So I can learn, is there any output from Stealth that could have led me to fix the problem sooner? When I was trying to run the scripts I didn't get any error message. Is there a log file that could have pointed me towards the source of the error?
nah nah
Developer
Developer
Posts: 414
Joined: 13.07.2011 11:23
Contact:

Re: How to set-up stealth + python?

Post by nah nah »

The most occurrence problem is the names conflict of the new package with the Boydon's wrapper. There is no need to convert.py anymore. In a changelog to some version of Stealth was a recommendation to all python users to redownload and reinstall the program. However i will add a warning, if the package will find the old wrapper.

The second problem is in scripts wich named like modules from standart library. The new package just imports scripts, not eval/exec uses.

It is true that the old wrapper is no more compatible with Stealth, but the new one is compatible with all stuff. You can launch your scripts as external or from Stealh (more recommended if you have more than one copies of Stealth). If you launch scripts from Stealth, there is no need to do anything, all names are already imported, output is redirected to a Stealth system journal. If you launch an external script, you just need to import names of the package to your script from py_stealth import *. Sometimes i will add this information to wiki.

The Boydons wrapper was not bad, but for some reason python 64-bit 3.5+ does not works with it. If you want to use it, i can try to find the working Stealth version on my hard drive, but it does not work with EA servers.
Last edited by nah nah on 07.09.2018 12:25, edited 1 time in total.
Hurley
Posts: 8
Joined: 20.05.2017 16:28

Re: How to set-up stealth + python?

Post by Hurley »

Your new wrapper is working well so far. The majority of my scripts work seamlessly and I've only need to make small modifications to the ones that didn't. I agree that launching external scripts with the new wrapper is definitely easier. I prefer to launch them via stealth, but given how easy they are to launch externally, I may consider utilizing that feature more in the future.
nah nah
Developer
Developer
Posts: 414
Joined: 13.07.2011 11:23
Contact:

Re: How to set-up stealth + python?

Post by nah nah »

Hurley wrote:The majority of my scripts work seamlessly and I've only need to make small modifications to the ones that didn't.
what modifications?? The new wrapper was developed as fully compatable with the old one. If there is a mistake, i need to fix that.
I prefer to launch them via stealth
You can launch it as you like. There is no any pythonic-modules in Stelth instead the new wrapper :lol:
Post Reply