Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pyuic4.bat don't run when folder name contains space.. #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thierryBottaro opened this issue Mar 22, 2016 · 5 comments
Closed

pyuic4.bat don't run when folder name contains space.. #299

thierryBottaro opened this issue Mar 22, 2016 · 5 comments

Comments

@thierryBottaro
Copy link
Contributor

Current code (in Winpython 2016-01 Python 3,5,1,2 _64bit) for pyuic4.bat is :

@echo off
if "%WINPYDIR%"=="" call %~dp0..\..\scripts\env.bat
python "%WINPYDIR%\Lib\site-packages\PyQt4\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9

it gives me :

'C:\Program' is not recognized as an internal or external command, operable program or batch file.
'python' is not recognized as an internal or external command, operable program or batch file.

I get it to run with these modifications : (notice the quotes...)

@echo off
if "%WINPYDIR%"=="" call "%~dp0..\..\scripts\env.bat"
"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\site-packages\PyQt4\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
@stonebig
Copy link
Contributor

Thanks for the solution to this test I never want to do.
May I include directly the associated code change or do you want to do a PR ?

@stonebig
Copy link
Contributor

and why "%WINPYDIR%\python.exe" instead of "python" ?

https://github.com/winpython/winpython/blob/master/winpython/wppm.py#l543..l550

procedure: go there with github interface, click "edit" file , change the 4 lines, review change, put a comment, pull request.

(or I do it, as you like it)

thierryBottaro added a commit to thierryBottaro/winpython that referenced this issue Mar 22, 2016
this pyuic4 works withing normal command prompt (and not only from from "WinPython Command Prompt")
I also modified the script pyuic5.bat (even if I could not test)
@thierryBottaro
Copy link
Contributor Author

je crois qu'on peut parler français :)
merci pour la procédure, j'avais jamais proposé une modification dans
GitHub :)
j'ai donc fait la modif, j'ai même réussi à faire la "pull request",
j'imagine que tu dois la "merger"...

Pour ta 2ième question, je viens de re-tester chez moi juste "python", et
il me dit :

The syntax for the file name, directory name, or volume label syntax is
incorrect.
The "python" command is either misspelled or could not be found.

Ce qui n'est pas surprenant : WinPython est par défaut installer comme une
appli "portable". Donc la commande "python" n'est pas une commande reconnue.
La logique même d'une application portable implique l'utilisation de
"%WINPYDIR%...
" , non ?
je remarque que dans le "env.bat", il n'y a même pas de définition pour
"python".

J'ai peut-être oublié de préciser que j'exécute ce pyuic4.bat dans la
console DOS "normale", pas dans la "WinPython Command Prompt"
maintenant que j'en parle, je viens d'essayer : dans le "WinPython Command
Prompt", la commande
'pyuic4 monFichierUI.ui > sortieUI.py'
fonctionne.

Merci pour ta réponse si rapide,
Thierry

2016-03-22 19:47 GMT+01:00 stonebig [email protected]:

and why "%WINPYDIR%\python.exe" instead of "python" ?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#299 (comment)

@stonebig
Copy link
Contributor

oui, c'est exactement ça. A+

stonebig added a commit that referenced this issue Mar 23, 2016
modification of pyuic4.bat (see #299)
@stonebig
Copy link
Contributor

#301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants