Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: Python how to extract archive

@11I want to try this, I mean download the updater from server, run the updater, download all necessary files, then close the app, extract data and run updated app again. But i have a problem with extraction, as mentioned in first post.

URL: https://forum.audiogames.net/post/581715/#p581715




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: Python how to extract archive

@5Part of the problem may be how your packing the zip file. If you select a folder and compress it into a zip, it will extract all the files into that same folder. You could try entering the folder, and selecting all the files and subdirectories to compress it into whatever zipfile name you like and it should provide better results.Alternatively, you could check out [pyupdater].

URL: https://forum.audiogames.net/post/581644/#p581644




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: Python how to extract archive

@10You should use one of the ones that already exists. I believe there's a couple open source ones by people here, but I don't remember details.I thought you had to use a second executable, but this stack overflow is giving you a procedure that's simpler, if it works: https://stackoverflow.com/questions/719 … in-windowsBut just use someone else's if at all possible.

URL: https://forum.audiogames.net/post/581610/#p581610




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: Python how to extract archive

@camlorn yep, I'm trying to build an autoupdater. So probably i should use os.walk over all subdirectories located in archive, ofcourse, after extracting it, then move all subdirectories with it's files inside to the directory, where replacer is located? Nobody never want to add some extra function to ZIpFile library, which can extract all files and directories located in archive without any combinations?

URL: https://forum.audiogames.net/post/581606/#p581606




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: Python how to extract archive

I think the issue is that they're trying to copy the executable over itself. Are you trying to build an autoupdater?If shutil isn't working you can use glob instead and manually move the files yourself. But you cannot copy a running executable on top of itself on Windows.

URL: https://forum.audiogames.net/post/581585/#p581585




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector


  


Re: Python how to extract archive

also this kind of question might be better for stack overflow

URL: https://forum.audiogames.net/post/581577/#p581577




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: Python how to extract archive

Yep, googled. I can't find anything, maybe because english is not my native language.

URL: https://forum.audiogames.net/post/581535/#p581535




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Re: Python how to extract archive

@1Have you googled?

URL: https://forum.audiogames.net/post/581531/#p581531




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: Python how to extract archive

I told you, that when i'm using extractall method, and namelist() method, Archive extracts into the subdirectory called archivename.

URL: https://forum.audiogames.net/post/581528/#p581528




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: Python how to extract archive

Using zipfile, it will extract to the current working directory. If you want to preserve the internal directory structure, you should also include the name list. Example:import zipfile
box = zipfile.ZipFile('archive.zip')
box.extractall(members=box.namelist())

URL: https://forum.audiogames.net/post/581520/#p581520




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: Python how to extract archive

But it extracts all content inside parent directory. e.g. Archive called "cat.zip" and zip.extractall extract alll it's content to the cat\ Directory. I need to extract all content with keeping directory structure inside a folder where extract.exe is located.

URL: https://forum.audiogames.net/post/581517/#p581517




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python how to extract archive

2020-10-19 Thread AudioGames . net Forum — Developers room : zakc93 via Audiogames-reflector


  


Re: Python how to extract archive

I'm not sure if I understand your question, but python has a zip library to work with zip files. It has an extractall function that extracts the contents of the zip file.

URL: https://forum.audiogames.net/post/581455/#p581455




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Python how to extract archive

2020-10-19 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Python how to extract archive

Hello. I have to extract e.g. some .zip archive without keeping root_dir while extracting, but with keeping the rest of directory structure. How to do it? shutil.move to move all subdirectories to the dir, where extractor.exe is located not works, it crashes in half of moving process.

URL: https://forum.audiogames.net/post/581453/#p581453




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector