Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Closing logger from other function problem
Post: Closing logger from other function problem

I have problem with loggers. One function of my program is initiazing logger in specified directory. Second function is closing this logger in order to change name of direcotry to "directory_old" and ...
Paqqno General Coding Help 1 1,123 Apr-24-2022, 09:19 PM
    Thread: Modify values in XML file by data from text file (without parsing)
Post: RE: Modify values in XML file by data from text fi...

(Apr-13-2022, 04:26 AM)ndc85430 Wrote: I'm not really buying your arguments for not wanting to parse the XML. Why do you think the whitespace and order of attributes matter? Because I have many file...
Paqqno General Coding Help 2 1,681 Apr-13-2022, 06:02 AM
    Thread: Modify values in XML file by data from text file (without parsing)
Post: Modify values in XML file by data from text file (...

Hi, I have 2 types of files - one is base XML file where are some attribute values = "FAIL" and i the other file - text file where are values I want to use instead of those "FAIL". Picture below expla...
Paqqno General Coding Help 2 1,681 Apr-12-2022, 03:06 PM
    Thread: Editing text between two string from different lines
Post: Editing text between two string from different lin...

I want to edit atributte values from xml file and replace every "\n" to "(newline)\n". This is necesary because I need to keep structure of xml file while after parsing, it is standaraized and whitesp...
Paqqno General Coding Help 1 1,320 Apr-06-2022, 07:10 PM
    Thread: Parsing xml file deletes whitespaces. How to avoid it?
Post: Parsing xml file deletes whitespaces. How to avoid...

Hello, I made a program that takes one main XML file and update there attribute values = "Fail" based on other XML file attribute values. It works fine but I have one issue: After parsing XML file it...
Paqqno General Coding Help 0 1,043 Apr-01-2022, 10:20 PM
    Thread: Overwrite values in XML file with values from another XML file
Post: RE: Overwrite values in XML file with values from ...

(Apr-01-2022, 08:27 AM)Larz60+ Wrote: There are two access methods shown below: process_using_defusedxml this uses an etree, but not xml.etree.ElementTree which is very unsafe, venerable to attacks ...
Paqqno General Coding Help 5 3,331 Apr-01-2022, 10:16 PM
    Thread: Overwrite values in XML file with values from another XML file
Post: RE: Overwrite values in XML file with values from ...

(Mar-31-2022, 02:40 AM)Larz60+ Wrote: I'm working on something that will help. it'll take a while, but should be done on my tomorrow (EDT) I'll be back Ok, thank you. I really appreciate any help
Paqqno General Coding Help 5 3,331 Mar-31-2022, 05:32 AM
    Thread: Overwrite values in XML file with values from another XML file
Post: Overwrite values in XML file with values from anot...

I have one main xml file (Mainfile_1.xml) where some items show value = 'FAIL'. I want to replace those Fail values with correct values from another XML file (Fixfile_1.xml). It should look like on th...
Paqqno General Coding Help 5 3,331 Mar-30-2022, 04:54 PM
    Thread: Loop through values in dictrionary and find the same as in previous row
Post: RE: Loop through values in dictrionary and find th...

import csv import shutil data = {} with open("data.csv", "r") as f: reader = csv.reader(f) for row in reader: a, b, c = row data[a] = data.get(a, {}) data[a][b] = dat...
Paqqno General Coding Help 5 1,914 Mar-27-2022, 01:13 PM
    Thread: Loop through values in dictrionary and find the same as in previous row
Post: RE: Loop through values in dictrionary and find th...

It looks very promising but I still struggle to implement your solution to my code because attempt to write it to a file ends up with writing only the last row from data file, even though It creates f...
Paqqno General Coding Help 5 1,914 Mar-27-2022, 10:22 AM
    Thread: Loop through values in dictrionary and find the same as in previous row
Post: Loop through values in dictrionary and find the sa...

I am new in Python and I am stuck with one problem for a few days now. I made a script that: -takes data from CSV file -sort it by same values in first column of data file -instert sorted data in s...
Paqqno General Coding Help 5 1,914 Mar-26-2022, 09:04 AM
    Thread: How to split file by same values from column from imported CSV file?
Post: RE: How to split file by same values from column f...

(Mar-24-2022, 11:11 AM)perfringo Wrote: You should articulate your plan in natural language and then translate into Python. In most general terms it's: 'read data from file to suitable data structur...
Paqqno General Coding Help 5 2,802 Mar-24-2022, 05:25 PM
    Thread: How to split file by same values from column from imported CSV file?
Post: How to split file by same values from column from ...

I am really new into Python and I struggle with this problem. I have data like this in CSV file: 111_0,3005,QWE 111_0,3006,SDE 111_0,3006,LFR 111_1,3005,QWE 111_1,5345,JTR 112_0,3103,JPP 112_0,3343,P...
Paqqno General Coding Help 5 2,802 Mar-23-2022, 05:33 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020