Closed tuqubao closed 3 years ago
I will try to take a look at this. Seems like we need to update the command template as well since we can't just change the xtype
variable:
https://github.com/justinfx/MayaSublime/blob/7526198e0662ec768a1f0ebefe4770331e03c560/MayaSublime.py#L116 https://github.com/justinfx/MayaSublime/blob/7526198e0662ec768a1f0ebefe4770331e03c560/MayaSublime.py#L290
Probably need something like this, to replace execfile
:
with open(path) as f:
code = compile(f.read(), path, 'exec')
exec(code, namespace, namespace)
I've never used the runpy
module before so it would require some testing. I see the docs say that it will modify the sys.path
and I don't know if we want that or not.
thank your for quickly feedback. for py2.7 execfile , i can get the file location by file, but exec will losing file location.
I will try to take a look at this. Seems like we need to update the command template as well since we can't just change the xtype variable:
https://github.com/justinfx/MayaSublime/blob/7526198e0662ec768a1f0ebefe4770331e03c560/MayaSublime.py#L116 https://github.com/justinfx/MayaSublime/blob/7526198e0662ec768a1f0ebefe4770331e03c560/MayaSublime.py#L290
Probably need something like this, to replace execfile: with open(path) as f: code = compile(f.read(), path, 'exec') exec(code, namespace, namespace)
I've never used the runpy module before so it would require some testing. I see the docs say that it will modify the sys.path and I don't know if we want that or not.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
when you renew the code for testing? I can test code for you.
@tuqubao sorry I have just been a bit busy. I will try to work on a fix soon.
@tuqubao can you please give #37 a test?
ok, i will make a test for a while, and telling you the answer.
@tuqubao can you please give #37 a test?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
is it the same way to install plugin in sublime text do to reinstall you code?
@tuqubao can you please give #37 a test?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
In order to test this development branch, you need to clone the branch into your SublimeText Packages location, instead of using the Package Manager. It needs to be the 36_py39_support branch. If you aren't able to figure that out to test it, then the only thing I can do is release it. I have tested it in maya 2022 python3 so far.
ok, you realease the version, i am not beside my pc so can not test now. when i am beside pc will do test at once.
In order to test this development branch, you need to clone the branch into your SublimeText Packages location, instead of using the Package Manager. It needs to be the 36_py39_support branch. If you aren't able to figure that out to test it, then the only thing I can do is release it. I have tested it in maya 2022 python3 so far.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
send file to maya for english version test is ok.
send file to maya for my chinese version test is problem.
send selected text for chinese version test is ok.
------------------ Original ------------------ From: "Justin @.>; Date: Fri, Sep 24, 2021 04:57 AM To: @.>; Cc: @.>; @.>; Subject: Re: [justinfx/MayaSublime] maya2022 python updata to 3.7 problem. (#36)
In order to test this development branch, you need to clone the branch into your SublimeText Packages location, instead of using the Package Manager. It needs to be the 36_py39_support branch. If you aren't able to figure that out to test it, then the only thing I can do is release it. I have tested it in maya 2022 python3 so far.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
have you check my email for testing report?
@tuqubao yes your email turns into a comment on this issue thread, so I see it both ways. I've just been busy and not had a chance to reply to you. It looks like some more python 3 work is needed to handle edge cases with unicode support.
@tuqubao can you please open a new issue with a sample of the code that is causing you a problem? I have tried to reproduce this with some chinese python source code and it seems to work fine for me. I'm also testing this on linux.
ok, i will do it at once
@tuqubao can you please open a new issue with a sample of the code that is causing you a problem? I have tried to reproduce this with some chinese python source code and it seems to work fine for me. I'm also testing this on linux.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
this is a test code. if you can't open the code in sublime in the right way , you can install plugin convertToUTF8 and will ok check. and you can send me a chinese version code.
------------------ Original ------------------ From: "Justin @.>; Date: Sat, Sep 25, 2021 06:45 AM To: @.>; Cc: @.>; @.>; Subject: Re: [justinfx/MayaSublime] maya2022 python updata to 3.7 problem. (#36)
@tuqubao can you please open a new issue with a sample of the code that is causing you a problem? I have tried to reproduce this with some chinese python source code and it seems to work fine for me. I'm also testing this on linux.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Hi, I using sublime write python send to maya executed.
Traceback (most recent call last):
File "", line 17, in
NameError: name 'execfile' is not defined