Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: exe created by pyinstaller only works in the dist directory
Post: RE: exe created by pyinstaller only works in the d...
Hi snippsat,
I did "pyinstaller --onefile guess_game.py". It works. **smile** Thank you.
Dee |
|
dee |
General Coding Help |
7 |
2,824 |
Feb-23-2023, 05:53 PM |
|
|
Thread: exe created by pyinstaller only works in the dist directory
Post: RE: exe created by pyinstaller only works in the d...
I think the exe works in the dist directory because dist has all the dependency files. I don't want to copy the whole directory to the share folder the user. How can I refer to the dependency files fr... |
|
dee |
General Coding Help |
7 |
2,824 |
Feb-22-2023, 09:41 PM |
|
|
Thread: exe created by pyinstaller only works in the dist directory
Post: RE: exe created by pyinstaller only works in the d...
Here is the code. When I clicked the Test.exe in the dist\ directory, the row was inserted to working.report_error table, "complete" was printed and it paused for 60 seconds. It didn't do any of these... |
|
dee |
General Coding Help |
7 |
2,824 |
Feb-16-2023, 06:53 PM |
|
|
Thread: exe created by pyinstaller only works in the dist directory
Post: RE: exe created by pyinstaller only works in the d...
Thank you snippsat for the respond.
In my code, I have time.sleep(60). The exe in the dist\ directory paused for 60 seconds, but not in another directory and did nothing else in the code. |
|
dee |
General Coding Help |
7 |
2,824 |
Feb-16-2023, 04:49 PM |
|
|
Thread: exe created by pyinstaller only works in the dist directory
Post: exe created by pyinstaller only works in the dist ...
I want to create an exe for a user to run the Python program. In Visual Studio Code Terminal I typed PS C:\Users\dee.dee> pyinstaller "C:\Users\dee.dee\desktop\Test.py".
It created the Test direc... |
|
dee |
General Coding Help |
7 |
2,824 |
Feb-15-2023, 10:21 PM |
|
|
Thread: Panda pivot_table questions
Post: RE: Panda pivot_table questions
I figured out my question #1. Remove index=False in pivot.to_excel(writer, sheet_name='Pivot', index=False).
For #2, the order is in the order I specified when I created another Python scripts. Not su... |
|
dee |
General Coding Help |
1 |
745 |
Jan-09-2023, 05:45 PM |
|
|
Thread: Panda pivot_table questions
Post: Panda pivot_table questions
I need help on Panda pivot_table. The following are the code and the output. I will need help on:
1. Why Product and the Term are not in the output?
2. The columns in Excel are automatically in alphab... |
|
dee |
General Coding Help |
1 |
745 |
Jan-06-2023, 11:16 PM |
|
|
Thread: Filter dataframe Not Working
Post: RE: Filter dataframe Not Working
Thank you very much snippsat. |
|
dee |
General Coding Help |
2 |
970 |
Jan-06-2023, 04:45 PM |
|
|
Thread: Filter dataframe Not Working
Post: Filter dataframe Not Working
The followings are my code and prints. Why the df_sample is empty? The ydate variable is '2022-12-31' and the original df As_of_date have '2022-12-31'. Thanks.
Code:
sql = """
select *
from working.T... |
|
dee |
General Coding Help |
2 |
970 |
Jan-05-2023, 10:35 PM |
|
|
Thread: Create Excel Line Chart Programmatically
Post: RE: Create Excel Line Chart Programmatically
(Dec-30-2022, 07:18 PM)carecavoador Wrote: Literally the first link that appears on search for me:
Example of creating an Excel line charts.
Thank you. It works with xlswriter. I found one works wit... |
|
dee |
General Coding Help |
3 |
1,207 |
Dec-30-2022, 08:44 PM |
|
|
Thread: Create Excel Line Chart Programmatically
Post: Create Excel Line Chart Programmatically
Hello,
Do you have a good link or code how to create Excel line chart from Python with dataframe or from Excel data? I google for a while but unfortunate I haven't found the code that works for me. Th... |
|
dee |
General Coding Help |
3 |
1,207 |
Dec-30-2022, 07:07 PM |
|
|
Thread: Error "list indices must be integers or slices, not str"
Post: RE: Error "list indices must be integers or slices...
Thank you deanhystad. It works. |
|
dee |
General Coding Help |
2 |
1,476 |
Dec-30-2022, 05:38 PM |
|
|
Thread: Error "list indices must be integers or slices, not str"
Post: Error "list indices must be integers or slices, no...
I want to format Excel column to percent. The following code gave me "list indices must be integers or slices, not str" error. The __class__ of Column D is 'str'. Is it because the header is string?
... |
|
dee |
General Coding Help |
2 |
1,476 |
Dec-29-2022, 09:55 PM |
|
|
Thread: How to import another Python in different directory?
Post: RE: How to import another Python in different dire...
Added the directory where the Python program is located to the sys.path, then import the Python program.
import sys
file_dir = "c:\\Users\\dee\\Documents\\_Python"
sys.path.append( file_dir )
import ... |
|
dee |
General Coding Help |
3 |
914 |
Sep-28-2022, 06:41 PM |
|
|
Thread: How to import another Python in different directory?
Post: RE: How to import another Python in different dire...
I figured it out. Thanks.
Sorry. I don't know how to delete the post. |
|
dee |
General Coding Help |
3 |
914 |
Sep-28-2022, 06:26 PM |
|
|
Thread: How to import another Python in different directory?
Post: How to import another Python in different director...
Hello,
I would like to get help on importing another Python program in different directory. I didn't seem finding that is straight forward from googling.
Thanks. |
|
dee |
General Coding Help |
3 |
914 |
Sep-28-2022, 05:03 PM |
|
|
Thread: Is there software/tool for coding Python?
Post: RE: Is there software/tool for coding Python?
Yes, I have been using VS Code. It works very well. Thanks. |
|
dee |
General Coding Help |
11 |
2,875 |
Jun-14-2022, 02:32 PM |
|
|
Thread: How to format Excel column with comma?
Post: How to format Excel column with comma?
I want to format the number columns with commas. I received an error "column.map = '{:,d}'.format AttributeError: 'str' object has no attribute 'map'". How can I format the columns? Thanks.
df.to_ex... |
|
dee |
General Coding Help |
0 |
1,378 |
Jun-13-2022, 10:11 PM |
|
|
Thread: IndentationError: unexpected indent
Post: RE: IndentationError: unexpected indent
(May-01-2022, 10:44 PM)deanhystad Wrote: Copy and paste likely fixed the error because I have no problems. It could be a mix of tabs and spaces. All indentation should be 4 spaces. My editor sees... |
|
dee |
General Coding Help |
3 |
2,335 |
May-02-2022, 02:15 AM |
|
|
Thread: IndentationError: unexpected indent
Post: IndentationError: unexpected indent
The following is the class that received the IndentationError: unexpected indent. I got the error when "from reader.reader import Reader". Which indent is not supposed to? Thanks.
class Reader:
... |
|
dee |
General Coding Help |
3 |
2,335 |
May-01-2022, 09:03 PM |