0

I am trying to create a stand alone application for a windows computer I am trying to use the following modules:

  • os
  • system
  • threading
  • time

But it is not allowing me to import any of these modules it doesn't give me an error code or anything it just will not load the modules into the file! from distutils.core import setup import py2exe

setup(console=['Evil_unlocker_final.py']
      options={
                "os":{
                        "unbuffered": True,
                        "optimize": 2
                }
                "sys":{
                        "unbuffered": True,
                        "optimize": 2
                }
        }

)
Marcello B.
  • 4,177
  • 11
  • 45
  • 65
  • Please explain the exact behavior you want and the exact behavior you are seeing. What happens when you do `import os` in your actual code? Do you get an `ImportError`? An empty module object? Something else? – Kevin Dec 12 '14 at 17:17
  • I get absolutely nothing no messages it acts like it worked but it didn't. Well actually now I'm getting just a `SyntaxError` on options but that want happening before! – Marcello B. Dec 12 '14 at 17:19
  • "it didn't [work]": What didn't work? How do you know that it didn't work? What is it doing that isn't what you want? – Kevin Dec 12 '14 at 17:21
  • Oh! The libraries on a computer that didnt have python its like it was just running the script in the back round – Marcello B. Dec 12 '14 at 17:26

1 Answers1

1

You do not have to add the os library nor do you have to add the system library the error is in the setup.py file it is not formatted correctly all you need in your setup.py file

setup(console=['Evil_unlocker_final.py'])

That's it the only time that you would need to add in the options function is when you are importing a module that is not built into python for example if you wanted to add in the flask and jinja2 libraries your file would have to also have to add options and your file would look somewhat like this

setup(console=['Evil_unlocker_final.py']
     options={
               "pip":{
                       "unbuffered": True,
                       "optimize": 2
               }
               "jinja2":{
                       "unbuffered": True,
                       "optimize": 2
               }
       }
)
Marcello B.
  • 4,177
  • 11
  • 45
  • 65