Skip to content
Advertisement

Tag: python

Run console command with python

This code works fine directly in CLI: Now, I need to execute the same command but in Python environment. This is what I am trying: This is the error, and I am running the file and command from the same location: Answer you can just use os.system() if you have nothing else to do with spawned process. but, if you

Run Galde Gtk3+ Python under Windows

i’ve created a student-managing-software for linux which use different packages (tkmessageboxes, glade-builder, gtk3+). Now, there are a lot of people how asked how it can be used under windows but i’ve no idea. So, does someone know how to use these packages under windows or is it impossible? THX Answer Well I would say it is up to the developer

issue on import psutil inside python script

i’m not able to import psutil inside my scripts. But the library is installed on my machine. my library is inside this directory, on which there is also simplejson library: But if i create a script for example this: i get this errors: UPDATE launching pip install psutil i got this: Any ideas on how to resolve this error? Answer

python subprocess.stdout.readline doesn’t

I have a piece of python code that calls a binary via the subprocess module. This binary reads data from stdin and outputs other data to stdout, which should then be collected by the python code. Here’s how I use this binary in a shell: with a return after each line (including the last), from which I get the output

Merge XML files and delete duplicate rows

I’m using the following script to merge XML files. There are 5 different XML file types, ItemAvailability.xml, ItemUpsert.xml, ItemCatDesc.xml, ItemPrice.xml and ItemDelete.xml. How can I have the same script remove duplicate rows from the combined XML files? I really only need the duplicates removed from the ItemAvailability.xml files, the script is run on a 15-minute interval cron job. Any ideas

Comparing tow large files line by line

I was wondering if there is any efficient way to compare 2 large files line by line. File 1 File 2 I am just taking the first character of each file and comparing against them. Currently i am using a very naive method of iterating through them in a double for loop. Like Reading both files into memory is not

Advertisement