Python Forum

Full Version: Turn py into exe
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't have access to a compiler, could someone, please, turn this python 3 code into an exe file and also test it?
import openpyxl as xl

f=xl.Workbook()
f.title='1 lpp'
sheet = wb.get_sheet_by_name('1 lpp')
text=open('text.txt').read().split()
for i in range(len(text)):
    if i%2==0:
        sheet.cell(row=1, column=i+1)=text[i]
    else:
        sheet.cell(row=2, column=i+1)=text[i]
wb.save('test.xlsx')
The program should create a test.xlsx file with first (and only) page titled "1 lpp" which contains text from text.txt in a format like this:
This  an
    is  example
Is this homework?
Something prevents me from posting messages in https://python-forum.io/Thread-Turn-py-into-exe
I get php error or empty reply error.

What I wanted to post was:
(Jul-14-2019, 11:07 AM)metulburr Wrote: [ -> ]Is this homework?
Not quite, but i thought it was the appropriate place to ask this question.

So... no one?
Well, is it possible to do this online then?
Quote:could someone, please, turn this python 3 code into an exe file and also test it?
We dont usually do requests like this. Explained here we state our goal for this forum
Quote:This forum is focused on education. It exists to help people learn Python. We don’t exist to solve others’ problems, although that tends to be a happy byproduct of education.
However we do have a section for jobs if you want to pay someone to do it. I would do it for free, but im on linux.

Converting a py to exe is not always easy, and can get more complicated if 3rd party libraries are involved. For anyone wanting to do this i would suggest pyinstaller. But to be honest you can go to your local library and do this if you dont have a windows desktop to do it at home.
Are you getting an error when trying to run it through pyinstaller? You don't need a compiler to run it.