Question: Hello, am a newbie in python and I have a little project that I did on my own after watching some videos but I ran

Hello, am a newbie in python and I have a little project that I did on my own after watching some videos but I ran into issues and might think some experts on here might know the answer.

About the project: I have the folder called Waveform and inside that folder, there are 4 files, and each file containing 4 features such as voltage, currents, speed, max output. I wanted to create a button that will load the folder and then create a button that can scroll through each file and pick a specific feature to export out to a text file. At this moment I am stuck at the very first step which is to load the folder, I will attach the screenshots of my code to see if any experts can notice any errors. Thank you in advance

Hello, am a newbie in python and I have a little projectthat I did on my own after watching some videos but I

namespace and etc.. import wpf clr.AddReference('IronPython.Wpf') #Add a reference for the System.Windows.Forms clr.AddReference('System.IO') clr.AddReference('System.Drawing') clr.AddReference('System.Reflection') clr.AddReference('System.Threading') clr.AddReference('System.Windows.Forms') class MyWindow(Window): def __init_self): wpf.LoadComponent(self, 'WpfApplication1.xaml') def Button_Click(self, sender, e): #Folder path of variables FOLDER_PATH = 'C:\\Users\\Desktop\\waveforml' #Back slash will be treate # Define a funhction to print out the file name # Input parameter will be dir def listDir(dir): fileNames = os.listdir(dir) for fileName in fileNames: print('File Name: ' +fileName) print("Folder Path: + os. path.abspath(os.path.join(dir, fileName))) . #if name _main_': #listDir(FOLDER_PATH) pass I I if == name _main__': Application().Run(MyWindow()) The program '[15552] ipyw32.exe' has exited with code 1 (0x1). Error List Output namespace and etc.. import wpf clr.AddReference('IronPython.Wpf') #Add a reference for the System.Windows.Forms clr.AddReference('System.IO') clr.AddReference('System.Drawing') clr.AddReference('System.Reflection') clr.AddReference('System.Threading') clr.AddReference('System.Windows.Forms') class MyWindow(Window): def __init_self): wpf.LoadComponent(self, 'WpfApplication1.xaml') def Button_Click(self, sender, e): #Folder path of variables FOLDER_PATH = 'C:\\Users\\Desktop\\waveforml' #Back slash will be treate # Define a funhction to print out the file name # Input parameter will be dir def listDir(dir): fileNames = os.listdir(dir) for fileName in fileNames: print('File Name: ' +fileName) print("Folder Path: + os. path.abspath(os.path.join(dir, fileName))) . #if name _main_': #listDir(FOLDER_PATH) pass I I if == name _main__': Application().Run(MyWindow()) The program '[15552] ipyw32.exe' has exited with code 1 (0x1). Error List Output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!