Over 1 million tech questions and answers.

multiple files under Python

Q: multiple files under Python

What I am trying to do is have a button on a window that will hide the window, open a new window, then, when the opened window is closed, open the previous window again. The code is large enough that I want to do each window in a separate source file. The problem is with the wait_window command, as it requires access to both the root window and the window_file2 window. Currently, in the code below, Python complains that root does not exist. If I place the code in file1, (just below file2.init_window) it complains that window_file2 does not exist.

Edit: figured out the correct syntax. The code below is now the correct version, and will run without problems.

from Tkinter import *
import file2

root = Tk()

def open_file2():

exmple_button = Button(root, text="open file2", command=open_file2)


from Tkinter import *

def init_window():
window_file2 = Toplevel()

Read other answers
Preferred Solution: multiple files under Python

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)


Hello All - Using XP Home. I have a few files written in Python, they show this extension:- _package.py. I have the option to open the file with Notepad or WordPad. I am then able to edit what I want but the program will not run with the files in Notepad or WordPad format. So I need to be able to change the file back to a Python file. Does that make sense?

Regards SilverSurf

Read other answers

I'm trying to run a python script on a secure folder. The script is running. I don't think (although I don't know for sure) that the script is reading the files.

Running as Administrator
The folder permissions and all sub folders/files is:
Administrator (Full Control)
Owner Administrator

Running in Win7 sp1

Batch file:

cd "C:\Programs\CommuniGate Files\SystemLogs"
Call "C:\Batch\CGPLogSummary.py"
The python script is supposed to read files, Process the files, and send an email with the results.
The script does send the email but the results are not in the email.

Does anyone know what I can do to figure out what is wrong?



A:Python script not processing files

Could you post the Python script?

Read other 9 answers

Does anyone know if a batch file could be created to read python files? What I would like to do is have it read a group of python files in a folder and create a .txt with a piece of information from each one, that is found in the same place on each one. if this is posibble, it would be appreciated.

A:Solved: A .bat that reads python files?

Read other 16 answers

Porting Perl To Python.

Summary: Porting legacy Perl to Python can be a daunting task. In this article, learn some of the theory behind dealing with legacy code, including what not to do.Click to expand...

-- Tom

Read other answers

I have several folder trees each containing many sub-folders, say A, B, C, D and so on. The names of the sub-folders are mostly the same between the various folder trees, although there could be an X, Y, Z in one folder tree and not in others, or only 20 sub-folders in one folder tree and 40 in another.

Each sub-folder contains many files, most of which are the same as those in other sub-folders of the same name. For example, folder A in one tree may have 50 files, 40 of which are the same as sub-folder A located in another folder tree.

What I am trying to achieve is a single 'master' folder tree containing all of the sub-folders in each of the existing folder trees, each sub-folder containing all of the files in all of the sub-folders of that name, without any sub-folders or files in each sub-folder duplicated.

I can achieve exactly this by manually moving files to the corresponding sub-folder in the 'master' folder tree, clicking 'move and replace' and ticking 'do this for the next x conflicts', but it is tedious and very time consuming.

Thank you in anticipation that someone will know how to automate this otherwise laborious process.

Read other answers

I have several sets of folder trees, each with multiple sub-folders, each sub-folder containing multiple files. I would like to merge all of this into a single folder tree, retaining the same sub-folder structure and each sub-folder containing a single set of files, eliminating all of the inevitable duplicates that will arise from the merging.

Doing this manually with Windows Explorer is both tedious and time consuming. I have to select all of the files in one of the sub-folders, then drag the selection to the corresponding sub-folder in the main folder tree, choose 'move and replace' and tick 'do the same for the next x conflicts' and repeat this process for each of the many sub-folders.

Although I did an online search before posting this plea for help, I have only seen utilities that will merge all files in multiple folders into a single folder, I have not seen a utility that will do what I need.

I'm hoping that someone will know of a utility that will save me doing this manually for the next many years!

Thank you in anticipation.


A:[SOLVED] Merging multiple files in multiple sub-folders into a single folder tree

I would really look into Robocopy from microsoft. It's a pretty simple yet very powerful tool for copying files, mirroring directories, and many other file tasks. Here is a small tutorial outlining some of the cool things you can do. If you'd rather have a GUI, look at Robocopy GUI.

Read other 5 answers

Once again, my computer thinks it's been working correctly for too long

Here is the link to my previous thread: [SOLVED] Unknown BSOD from time to time

This time, it basically gives me a BSOD when the processor workload is higher than 20%, something runs out of memory or the computer has been idle for more than 15 mins. (Using YouTube, playing Games etc. etc.) Here are all the error reports:


PC specs:

Processor: AMD Athlon II x4 640
Installed Memory RAM: 4.00 GB (I don't know what manufacturer or model)
Motherboard: BIOSTAR GF8200E
Graphics Card: NVIDIA GeForce 8200
DiskDrive: Hitachi HDS721050CLA362

As before, I have attached the needed files to the post. I was kind of stupid of me to mark the previous thread as [SOLVED] instantly.

A:[SOLVED] BSOD teasing me; Multiple issues and multiple 'corrupted' files.

Have you tested your RAM? You can use memtest 86+ or the ultmate boot cd. Have you tried booting in safe mode and then letting the computer sit for 30 minutes? Does the blue screen happen in safe mode?

Read other 19 answers


I'm not new to Batch Files but i have a requirement that i can't seem to get my head around, I'm sure it must be simple'ish..

I have 2 .txt files (Locations.txt | Files.txt)
Locations is a list of directoriesFiles is a list of file names

I would like to write a Batch Script that would loop through each location in the Locations.txt for files names that match any in Files.txt

I think i may need to write a for loop to cycle through the locations but then i'm not sure how i would pass the file names through for it to check for.

Basically if it does find any of those file names in any of the location i would want it to echo a message.


Read other answers

I had a large music library in a folder called music.

I installed itunes, and it decided to re-organize all of my files... So now i have 1,111 (that's right one-thousand one-hundred and eleven) sub-folders in the music folder, each containing a number of sub folders, and each sub folder has only one of two music files in it....

I would be laughing hysterically if there was simply an undo button, but there isn't.

It could literally take six months to manually go to the bottom of each folder tree, pull the one song, past it in the root folder, and then delete the folder it came from, over 8,000 for each of the files in my library.

So the question is: is there some utility i can use to pull all of the files at once, and then delete all of the folders left behind?



Read other answers

OK, so I have a load of FLV files and a README.txt. I need each FLV in a RAR with the README.txt.

I can select all the FLVs in the folder > right click > Add To Archive... > Files tab > Select "Put each file to separate archive".

Now that will add all the FLVs to separate RARs... but how can I get them to have the README.txt file as well without having to drop the file into each individual RAR?

Any ideas?


A:WinRAR: Create Multiple RARs with Multiple Files

Read other 12 answers

hi,i want to create multiple rar from each file,all of these rar should contain a Readme.txt in it.
I have searched and have found an answer in here but the problem is this batch script doesn't work when the file name contains period or space..i.e "Test 1.1.png".
Any ideas to overcome this limitation..
@echo off
PUSHD F:\Firefox\Test
MKDIR archives
for %%F in (*.png) DO (
Echo %%F
"C:\Program Files\WinRAR\WinRAR.exe" a archives\%%~nF %%F
"C:\Program Files\WinRAR\WinRAR.exe" a archives\%%~nF Readme.txt
Echo Archive process complete


A:Solved: Multiple RARs with Multiple Files

Read other 10 answers

Dear Friends, hope all is well.
(See attachments)
I have 83 video files ready to be burned to Disc/DVD. They total about 17.4 GB. DVD's unless they are dual layer and everything else is compatible are about 4.7 GB per DVD,

I've tried to highlight various numbers of these video files and then in that same window I tick the "burn to disk" tab at the top of the window. And when I try to do this another window will open and say "This disc doesn't have enough free space for all the selected files."

What is the best way to burn these video files onto DVD's? What speeds are generally better 3x, 4x, 8x ?

Thank You in advance for your care, cooperation and attention.

Sincerely, Ralph

Tech Support Guy System Info Utility version
OS Version: Microsoft Windows 7 Home Premium, Service Pack 1, 64 bit
Processor: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, Intel64 Family 6 Model 23 Stepping 10
Processor Count: 2
RAM: 3983 Mb
Graphics Card: Mobile Intel(R) 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1), 1767 Mb
Hard Drives: C: Total - 238372 MB, Free - 184837 MB;
Motherboard: Dell Inc., 0U692R
Antivirus: Avira Antivirus, Updated and Enabled

A:Transferring Multiple Video Files To Multiple DVD's

Read other 16 answers

Hey guy's, This is my first time posting here, I have looked around the web and couldn't find a strait answer for this question, So any help would be much appreciated!

I'm looking for a program that can compress multiple files (400 files actually) all at once, But they all need to be compressed separate and not into one .zip or .rar file.

They also need to all have a password. (The same password is fine for each one)


------What i need-----


---What i dont need----


I would also like to add price doesn't matter, it can be open source free or private registration $_$ (Free is always preferred of course )

Thanks guys

A:Compressing multiple files to multiple directories

Most compression software offers some sort of command line interface. At least, 7-zip and winrar do. That being as is, you could make a script which tells them to compress each file in turn.

Read other 3 answers

I could use some help. I'm not the best at this type of thing but I was having some major problems with my laptop and even though I ran both Spybot S&D and Malwarebytes they came back clean. But my wireless wouldn't stay connected and I was highly suspicious. I wondered what processes were running and when I started the Task Manager it showed multiple files ending in .exe*32. 
I know this isn't correct and I Googled and found this forum. I have downloaded the Farbar and the other two and it's helped a lot but since I don't know what I'm looking at or for and there are still multiple files ending like that I'm not sure what to do next. 
Also, I checked my desktop and discovered the same thing. It runs slow but I haven't done anything to it. I use LogMeIn and I'm concerned that I might have infected the other computes I was connected to. Can anyone help me, please? Thank you in advance.

A:Multiple computers with multiple files ending in .exe*32

Processes that end with *32 are 32-bit applications running under WOW on a 64-bit OS. WOW64 allows 32-bit Windows-based applications to run on 64-bit Windows...see Running 32-bit ApplicationsMicrosoft created the folder named SysWOW64 for storing 32-bit .dll files. WOW64 equates to "Windows 32-bit on Windows 64-bit". This folder contains all the 32-bit .dll files required for compatibility which run on top of the 64-bit version of Windows. WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run on 64-bit Windows but x86 applications are re-directed to the x86 \syswow64 when seeking the x64 \system32. The C:\Windows\System32 folder still exists in the 64-bit version of Windows but it is used as a repository for 64-bit .dll files.Some examples...a2guard.exe *32firefox.exe *32EditPadLite.exe *32HPOSD.exe *32plugin-container.exe *32mbam.exe *32mbae.exe *32WinPatrol.exe *32For a more detailed explanation, please refer to:32-bit and 64-bit Windows: FAQsWhat is WoW, Windows on Windows, WoW64, WoWx86 emulator … in 64-bit computing platformHow does WoW64 work?Making the Move to x64: File System RedirectionWOW64 Implementation DetailsCERT: The WOW-Effect - The WOW-Effect white paper by Christian Wojner

Read other 4 answers

i want search more than 100 files at once, if i entered 100 files name in search box then xp allow only first 22 files search, how to allow more than 100 files search at once in xp? how many search options in xp,

A:how to search multiple files in xp? xp doesn't find more than 22 files at a time !

Read other 10 answers

I have a Dell Inspiron 3000 desktop using Office 365. I have had to rely on the Microsoft's free Tech Support a number of times; upgrading to Windows 10, elements of office not working, etc. Several times, rather then fixing the issue at hand the Techs have created new user profiles. This leads to my current problem. Under the "Users" file their are 10 users listed: Bob, bobhu, Default.migrated, Default AppPool, Public, Robert, Temp, Test, Test2, Test Profile with only 2 actual user accounts on the computer. This has led to multiple duplicate files in different locations on the computer. For some reason (it may be related to installation of Windows updates), the computer will ocassionally revert back to a previous user profile. If not caught immediately this can lead to updating of old files rather then the current version of a file. For example: When using Quicken it will revert back to data files that may be a year old. if not paying attention when adding new data this could lead to erroneous data.

Sorry if this is long winded but I wanted to try to fully explain the issue. My basic question is, "What would be the best way to resolve this problem permanently, keeping in mind that I do not want to lose any old data, documents, pictures, etc. I have 3 solutions in mind (listed in no particular order), (1) pay a local computer shop to fix the issue (2) Try to resolve the issue myself [some tech help/knowledge may be required] (3) Use Microsoft Support on-l... Read more

A:Windows 10-Multiple User files-Duplicate Files

Do it yourself.

Keep the two actual User accounts plus Public and Default.

Then, working on one of the others at a time, copy or move any files desired to Public or one of your actual accounts. Then remove that non-wanted account and its data. (In Windows 8.1 this would be in Control Panel - User Accounts; should be similar in Windows 10.) If the User account does not appear in the list of user accounts then you can just delete the folder from C:\Users.

Read other 2 answers

I have a file A in which a column needs to be updated daily with values from a column in file B080909. There's a new file B everyday and the name is in date format (080909).
I know i can do this with Excel/Access but im not sure how to. Can anyone guide me to the right way?
Thank you so much!!!

Read other answers

Problem:  Several users are having to delete files two or more times in order for the files to permanently disappear. It's causing the users confusion and panic.... The files are located in folders on a mapped
share drive. The problem is happening with several users but NOT all users. Operating system Window 7 Enterprise, files are all .PDF's

tried changing users experience in services to auto (Services > "Application Experience" > Startup Type > "Auto"checked users permissions, permissions mimic other users that are not having the same issuesverified that it is actually a problemgoogled google to death...lol
Thank you in advanced for your help!

Read other answers

hi, i was cleaning a friend machine while i found her msn generated a bunch of gateway.dll files, like 10 or 20 per 5 secs

this happens while msn is opened

i removed msn, cleaned the machine with adware, avg and spybot, and it looked clean

also cleaned some msn registry entries with hijack

but when instaled a new clean msn and opened it those temp files started reproducing over again

so... i did a very stupid thing, i opened my own msn account on her computer (thinkin it could be her account linked to some service what was doing that, like mobile phone or whatever) and it did happen again ... more dlls

and when i opened my account on my clean machine ... got dll files on my machine too now... so cant open msn on my pc now and im afraid to open my account (sure this will happen wherever i use my or her account)...


post her log here

Logfile of HijackThis v1.99.1
Scan saved at 12:48:59 p.m., on 22/09/2006
Platform: Windows 2000 SP4 (WinNT 5.00.2195)
MSIE: Internet Explorer v6.00 SP1 (6.00.2800.1106)

Running processes:
C:\Archivos de programa\VERITAS\B... Read more

A:multiple gateway.dll files in temporary internet files while using msn

Read other 12 answers

Well, I get this sort of error periodically when I select files from a directory....
with a single click or with the ctrl + click or shift + click.
It's kinda iritating cause I've have to close this message a dozen times each time it pops up.
Any solutions? Thanks in advance.

Read other answers

i am trying to learn python not sure if its loaded properly on my pc any one as any detail instruction for win7 installation

A:python and win 7

If you're using ActivePython, the installer should have everything configured for you. You will, of course, want to read the accompanying documentation for how to run your python scripts.

Read other 1 answers

Am writing a program which simulates the action of an atm machine and I need it to end when option "c" is chosen. How exactly cn I do this, the only ways i can think of are...rubbish...

A:Python atm

Hi eventide,

Perhaps this link will help which is the result of searching for case statement here.

I assume you can structure your input options in a case statement - one of which would be 'c' to switch to in the proper Python syntax, of course.

-- Tom

Read other 1 answers

What are the uses of Python in Software Development?

Read other answers
Q: Python?

Is anyone here versed in Python? My son is into programming and already is very knowledgeable in several programming languages but is just learning, on his own, Python. I'm sure he would like to become acquainted with anyone who is already fairly fluent in this new language. TIA.

Read other answers
Q: python

Does anyone know what python 2.2 combined win32 extensions is?
Do I need it on my pc?
I just noticed it about a week ago.


Hello dee1-2-3 and welcome to BC.What is Python?Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java.Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface.Unless you are doing some programming..............

Read other 1 answers

Does anybody know what that is? (Python 22)

It is a sizable prog. and is in the start up line.
when I do a search for it , I can not find anything ??
I tried google for info , no luck there.
accept one site that said "send me $$ and I will tell you"

Well I have a few words for them.
thanks to anybody who can help.

A:Python 22 ??

See if this helps: http://www.python.org/doc/faq/installed/

Read other 2 answers
Q: python

can any one please tell me how to compile a python source code into a standart .exe file



Read other 2 answers

How does PHP compare with Python and witch one is better to learn for future use?

A:PHP vs Python

Read other 6 answers

I am having trouble running pip. It is supposed to come installed with python, but my computer doesn't recognize it. I try installing it, but get an error message. Could it have something to do with running 32 bit python on a 64 bit computer? I have version 3.6 python.

Read other answers

Is this a necessary software for windows XP?...Trying to clean up my HD..Don't even know how it got on my system..

A:Python 2.2.3?

Python is a programming language and not absolutely necessary unless you have programs installed that need Python in order to run.

Read other 1 answers

And is it something I need or just another security and privacy risk HP put on my computer>

A:What is Python>

Read other 8 answers

I have just started learning Python and like it a lot, but all that seems to exist to use it is the interpreter. I'd like to be able to compile things written with it into stand-alone Windows executables... does anyone know of any way to do this?

A:Python Compiler (?)


Read other 3 answers

I'm developing some scripts on Win 10. But suddenly all the script failed due to it cannot invoke CMD on Win10.
Here is one example,
import os
os.system("cd .")
It is a very simple code that python to call CMD to execute "cd .".
But it always return "-1073740791".
And all my other projects such as Jenkins failed because of try to invoke CMD.
Could anyone help me on this?

Read other answers

Hello! I am learning Python, and I think I know enough of it to make a simple computer game. I do not want to do something too elaborate, but something along the lines of Pac Man, or any of those old 'retro' games with the 1981 arcade game graphics (The kind that remind you of 'River Raid', 'Pong', and 'Space Invaders'. Anyway, what kind of tools do I need to do this? Help is appreciated!


Read other answers

I feel a bit trapped, because there doesn't seem to be a good version of Python for windows. I know there are some, but they aren't open source, and I kind of need that for the project I'm doing (not a project in Python, but rather a project for school.) So, are there any other simple programming languages that are free and open-source? And when I say simple, I mean kindergarten simple.

A:Python For Windows

Read other 7 answers

After two years break I tried to restart a Python/Excel program that ran ok then. The first lines of my Python code reads

import win32com.client, sys, os
excel = win32com.client.Dispatch.client.Dispatch('Excel.Application')
excel.Visible = 1

When I try to run it I get the error

ImportError: No module named win32com.client

How can I find the modul again?
I am using Python 2.5.1.

// Willy


Hello and welcome to the forum.

I am very sorry for the delay, we have been very busy lately.

Please try this:

Python for Windows extensions | Download Python for Windows extensions software for free at SourceForge.net

Read other 1 answers

I am trying to use some Python functions from C, using Dev C++ compiler. However, everything I try does not work, as it gives me a compiler and linker error, every time I try to compile the C code. Any input or help would be much appreciated. Thanks -Fabez-

A:C \ Python Interface

Read other 7 answers

I have a file which is created using C++ code. I'm parsing that file with python and I need to know the size of a struct that is the header of the file. Is there any way I can import the C or C++ code into my python code and call the C function sizeof()? Or is there a better way to do this?

More specifically, line 336 of this file
is the structure that I need the size of, but I honestly can't even fathom a way to get it from python. I can just assume little_endian is true (I think most platforms that run netscape & firefox are little endian??), which is not ideal, but I still wouldn't know how big that structure is...what's the sizeof() a function anyway--the same as the data type of the function plus all the sizes of the variables in it?

If anyone could help me out with this, I would really appreciate it. Thanks!

A:Python getting sizeof from C

Read other 6 answers

I am not able to install python on my windows 8.1 64x bit. Check the image for the system error message shown please help fast.... Thanks in advance....

Read other answers

I can't install any version of Python onto my laptop; I am getting the error message: "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package." My laptop is 64-bit, but any version of Python would be fine - I.e. Python 3.3.4 or Python 2.7.6 - I just need it installed!!! Thank you!

A:I can't install Python

emmy11 said:

I can't install any version of Python onto my laptop; I am getting the error message: "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package." My laptop is 64-bit, but any version of Python would be fine - I.e. Python 3.3.4 or Python 2.7.6 - I just need it installed!!! Thank you! Click to expand...

64 bit but what OS?

Read other 2 answers

I ran a Secunia check to see if any of my applications needed updating, and it said that Python did. Since I'd never heard of it, I've been trying to research it. I know it was not deliberately installed, but don't know how it may have gotten installed (whether part of new HP system, or a particular application), and whether I should keep it. It doesn't show up in the list of Installed Programs.

Does anyone have more insight on this software?

A:How can I find out why I have Python?

Itunes, Realtek software, games?

Read other 3 answers


I was trying to update my Python version yesterday, from 2.3 to 2.7. However, when I had finished installing 2.7, I was unable to open IPython. When I right-click a folder and click "IPython here" a window opened and I was redirected to a command prompt window. I uninstalled all Python after that and tried reinstalling, but had no success in getting IPython working.

If you have any insight into what's going on and how I can remedy the issue, please let me know.

Read other answers

I'm having a problem installing python and blender. I install python for windows through the MSI file provided by Python.org (2.6.1 and 3.0). I then install Blender (2.48). When i fire up blender it gives me this mesege.


Checking for installed Python... No installed Python Found.
Only built-in modules are available. Some scripts may not run.
So i go and check my environment vars and ofcorse the PYTHONPATH var is missing. so i set it up


Still nothing

I tryed again with python 2.6
Uninstalled everything, re-installed everything, setup the environment vars again.


and now i get


Checking for installed Python... C:\Python26\lib\site.py:150: Warning: 'with' will become a reserved keyword in Python 2.6
No installed Python found.
Only built-in modules are available. Some scripts may not run.

A:Python and Blender


I think you did everything right. For me a practical solution was to install Python 2.5.2 besides the 2.6 installation. After you've done this, all you have to do is change the PATHs from PYTHON26 to PYTHON25 (also LIB etc.).
This worked for me in Vista 64x, but I think this is not a specific Windows 7 problem. I guess Blender2.48 just doesn't like newer versions of PYTHON. Let us see which version Blender 2.49 will use.

Greetings from Holland,

Read other 2 answers

i was wondering if any one can tell me what the difference is between c++ and python and wich one you would recogmend to a complete newbie to programming also how does one compile a python source code i tried to look at pythons site but cant make sense of the code i am utterly confused

A:nick the python

Read other 12 answers

Hi all,

I've got Python v.2.4 that supposedly has an editor and I'm unable to find it.
Can anyone tell me how I would open the editor.


A:Python editor

Read other 9 answers