Skip to content
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

CPython __name__ is not "__main__" #691

Closed
htlcnn opened this issue Sep 14, 2019 · 3 comments
Closed

CPython __name__ is not "__main__" #691

htlcnn opened this issue Sep 14, 2019 · 3 comments

Comments

@htlcnn
Copy link
Contributor

htlcnn commented Sep 14, 2019

Describe the bug
__name__ in CPython script is not "__main__" as in IronPython. It's builtins

To Reproduce
Run this script:

#! python3
print(__name__)

Output is builtins

Expected behavior
__name__ should be "__main__"

@eirannejad
Copy link
Collaborator

Which pyRevit version?!

@htlcnn
Copy link
Contributor Author

htlcnn commented Sep 14, 2019

@eirannejad sorry for not attaching pyrevit env. Here it is:

C:\Users\HTL>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.7-beta2" | Path: "C:\Users\HTL\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "2020.1 Update" | Engine: 277 | Path: "C:\Users\HTL\AppData\Roaming\pyRevit-Master" | Manifest: "C:\Users\HTL\AppData\Roaming\Autodesk\Revit\Addins\2020\pyRevit.addin"
master | Product: "2018.3.1" | Engine: 277 | Path: "C:\Users\HTL\AppData\Roaming\pyRevit-Master" | Manifest: "C:\Users\HTL\AppData\Roaming\Autodesk\Revit\Addins\2018\pyRevit.addin"
==> Installed Extensions
htl | Type: Unknown | Repo: "git@gitlab.com:hoangthanhlong/pyrevitscripts.git" | Installed: "E:\Setup\UCE\Autodesk\Revit\pyRevit extensions\htl.extension"
==> Default Extension Search Path
C:\Users\HTL\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
E:\Setup\UCE\Autodesk\Revit\pyRevit extensions
D:\HTL\Desktop
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
2020.1 Update | Version: 20.1.0.81 | Build: 20190725_1135(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020"
2018.3.1 | Version: 18.3.1.2 | Build: 20180423_1000(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2018"
==> Running Revit Instances
PID: 15816 | 2020.1 Update | Version: 20.1.0.81 | Build: 20190725_1135(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2020"
==> User Environment
Microsoft Windows 10 [Version 10.0.17134]
Executing User: HTL\HTL
Active User: HTL\HTL
Adming Access: No
%APPDATA%: "C:\Users\HTL\AppData\Roaming"
Latest Installed .Net Framework: 4.8
Installed .Net Target Packs: v3.5 v4.0 v4.5 v4.5.1 v4.5.2 v4.6 v4.6.1 v4.6.2 v4.7 v4.7.1 v4.7.2 v4.8 v4.X
Installed .Net-Core Target Packs: v2.1.602
pyRevit CLI 0.14.0.0

@eirannejad
Copy link
Collaborator

eirannejad commented Sep 14, 2019

Resolved. __name__ now is set to __main__

Will be pushed iwth 4.7beta3

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