0
votes
2answers
25 views

Python os.write(filehandler, data) : TypeError An Integer Required

I get Attribute Error: 'int' object has no attribute 'write'. Here is a part of my script data = urllib.urlopen(swfurl) save = raw_input("Kaydedilecek dosya adı yazın veya aynı isimle ...
3
votes
0answers
101 views

When does Python write a file to disk?

I have a library that interacts with a configuration file. When the library is imported, the initialization code reads the configuration file, possibly updates it, and then writes the updated contents ...
1
vote
2answers
27 views

Differences between use of os.path.join and os.sep concatenation

I am trying to figure out if it is better to use: os.path.join(str1, str2) or: str1 + os.sep + str2 Profiling with timeit I found that, as expected, concatenation is faster: %timeit ...
0
votes
1answer
47 views

Inform OS of installation

Just a question that interested me, I noticed that modern installers (for various types of programs) alert you to wait until another installation is finished before running themselves. How can I ...
0
votes
1answer
52 views

Trouble with Python: Opening an app/saving a file

I am a bit new to coding, I am trying to improve my skills. My preferred programming language is python. But I do need help with this bit of code. I am making an app called User Helper for my own use. ...
0
votes
1answer
46 views

handling multiple login systems

I would like to make an authentication system where users or an administrator can choose which login system they prefer. The problem is that different systems have different Login-Systems and ...
1
vote
1answer
44 views

How to tell if process is responding in Python on Windows

I am writing a python script to keep a buggy program open and I need to figure out if the program is not respoding and close it on windows. I can't quite figure out how to do this.
1
vote
1answer
39 views

reduction in the lifetime of a hard drive from using os.walk

Is there any problem with running the following script on a timer over a whole external disk drive? EXTERNAL_DRIVE_DIRECTORY = "E:\Files" # get all of the files in a top level directory of a hard ...
0
votes
3answers
48 views

Opening Files From Any Directory (Python)

Im writing this basic code that runs files on my computer but right now it can only open files from the directory it is in. is there a way to open files from anywhere on my computer or would i have to ...
0
votes
0answers
78 views

calling python from C++

I have a C++ application that generates some files and I want to call a series of scripts on those files. Specifically, within the C++ application I run generate file_1 and file_2 then I run ...
0
votes
1answer
45 views

What is a thread-specific os.chdir and mkdir in python?

I have several threads each of which is changing working directories and occasionally creating new ones in specific working directories, copying/moving files etc in these directories. Think e.g.: def ...
0
votes
2answers
57 views

Python: Dynamically add relative path, based on OS

I wrote my first program in Python for my dad to convert about 1000 old AppleWorks files that he has (the AppleWorks format, .cwk, is no longer supported) to .docx. To clarify, the program does not ...
0
votes
2answers
39 views

Generate N amount of outputs depending on input. Python

import os,random def randomizer(input,sample_size,output='NM_controls.xls'): #Input file with query query=open(input,'r').read().split('\n') dir,file=os.path.split(input) temp = ...
0
votes
1answer
43 views

Operating-system specific requirements with pip

Is it possible to have OS specific requirements in pip's requirements.txt file? For example: I have a dependency on readline, therefore, if installing on windows (or OSX), then pyreadline is a ...
0
votes
1answer
38 views

Checking if path ends in separation

I'm setting up a small script to merge PDFs in a folder that has a cover letter, resume, and references. I'm wondering if there's a Python method that can look at the path string and detect if it ends ...

1 2 3 4 5 13
15 30 50 per page