• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • py2exe
  • Patches
py2exe

py2exe should set __file__ on the main module

Brought to you by: jretz, mhammond, theller
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Tickets ▾
    • Feature Requests
    • Patches
    • Bugs
  • News
  • SVN
  • CVS
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#21 py2exe should set __file__ on the main module

open
nobody
None
5
2008-09-04
2008-09-04
Alexey Borzenkov
No

py2exe currently does not set __file__ attribute on its main module, which can break scripts that rely on __file__ in the main module pointing to the 'program name', i.e. to open files in the same directory, etc.

This patch add support for __file__ by setting it to the module name.

Additionally it has a patch for not redefining Py_ssize_t when it is already defined, otherwise it breaks compilation under mingw.

Discussion

  • Alexey Borzenkov

    Alexey Borzenkov - 2008-09-04
     
    py2exe-remaining-changes.patch
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    225 Broadway Suite 1600
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.