Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9147125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:54:44+00:00 2026-06-17T10:54:44+00:00

I am aware how to convert a Python script to an Windows Executable file(.exe)

  • 0

I am aware how to convert a Python script to an Windows Executable file(.exe) using Py2Exe, PyInstaller and etc.

But is there a way to convert a Python script to an .exe that will work on all the following versions of Windows: Windows XP to Windows 8?

Keep in mind my Python script is very simple and does NOT use any libraries like pyGTK or wxPython. Its just a simple console script that lists all files in a directory and writes it to a file.

So if I were to compile the following script using Py2Exe on my Windows 7 64bit computer, would that .exe work on ALL the following versions of Windows: Windows XP to Windows 8? I am hoping I wont need to create a 32bit version then a 64bit version.

import os

def main():
  #TODO: get command line arguments
  files = listdir("\")
  out   = open('outfile.txt', 'w')
  out.write(files)
  out.close()

main()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:54:45+00:00Added an answer on June 17, 2026 at 10:54 am

    I roll up my wxPython-based app using PyInstaller on Windows Vista/32. After building the executable, I roll that into an installer using InnoSetup. I have customers running everything from XP to 8 in both 32 and 64-bit modes from the same setup executable made in this fashion.

    I’m considering building 64-bit versions but so far nobody’s asked for it and it hasn’t seemed necessary.

    I’ve tried py2exe, cxFreeze, and PyInstaller on Windows, and so far PyInstaller is my favorite. I ran into issues with py2exe on some platforms; cxFreeze at the time couldn’t handle putting in version resources (it can now) and PyInstaller seemed to “just work” the quickest right out of the box.

    So to cut to the chase, no you don’t need to build both 32-bit and 64-bit versions of your app, if you don’t care that on 64-bit Windows it’ll run in 32-bit mode through the WOW virtual machine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to convert a byte array to string other than using
I'm aware of using custom configuration values for my custom services, but what if
I have to convert a timezone-aware string like 2012-11-01T04:16:13-04:00 to a Python datetime object.
Is there a way in T-SQL to Convert GMT To Central Time that compensates
Is anyone aware of a simple way to convert mysql datetime values to coldfusion
I'm trying to convert a simple C program into Python but as I don't
Is there a simpler way to convert numbers to their keyboard Shift+[n] equivalent in
Is there a way to convert a unicode character to a Mac virtual keycode?
I aware that this will be a less programming question, but still... How can
I'm aware it's a quite simple question but I'm a newbie to C#, ASP.NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.