1
vote
2answers
32 views

Fast recursive folder deletion - calling the right rmdir

This question is not tied directly to python, but I need working implementation under python32 under windows. Starting from this answer I assume that using shutil.rmtree() is really slow (I need to ...
0
votes
1answer
21 views

How to open a file for browsing (as if one opened it manually)

I am trying to use Python to open a file for visual browsing, i.e. as if one double clicked a file to view it. I have tried numerous searches but because the words are very similar with doing file ...
0
votes
0answers
5 views

“ImportError: DLL load failed” SciPy and cx_freeze don't work together

It seems that SciPy and cx_freeze don't work together and is a known issue (https://bitbucket.org/anthony_tuininga/cx_freeze/issue/43/import-errors-when-using-cx_freeze-with). When I remove the import ...
0
votes
4answers
66 views

Create a task that takes up a specific amount of CPU and RAM

I'm testing my company software project and would like to see how it works under heavy load conditions. Is there anyway to create a task that takes up a big amount of CPU and only stops if I tell it ...
1
vote
0answers
13 views

python: handling stderr stream when using createprocessasuser api in windows

Need some help debugging this issue. I tried searching online and stackoverflow but could not find a solution for this. I am fairly new to the windows api so please pardon my ignorance. Basically, I ...
0
votes
0answers
17 views

How to make Anaconda python work in Emacs on Windows

So I installed Anaconda on my Windows 7 computer. Now how to get it up and running in Emacs? I tried calling M-x run-python. I get the wonderful error message: apply: Spawning child process: ...
-1
votes
0answers
7 views

Python print screen on windows 8 screen testing software

The testing software seems to be preventing the ImageGrabber's grab(), probably just general print screen. How can I bypass this prevention in python? I need this to happen while the program is ...
0
votes
0answers
22 views

Windows 7 Python installation: Works with full command, but “file.py --version” returns “Could not load Python dll”

This is a followup to this question: The *only* way to successfully execute Django python command is with "python ...PATH...django-admin.py [options]". Why can't it be reduced? I can ...
0
votes
0answers
27 views

The *only* way to successfully execute Django python command is with “python …PATH…django-admin.py [options]”. Why can't it be reduced?

This is a followup to this question. The first step in the Django tutorial says to call django-admin.py startproject mysite But here is the result: R:\jeffy\programming\sandbox>django-admin.py ...
0
votes
0answers
13 views

Python EXE Windows: Error 5?

I have compiled a small rename program using py2exe. Whenever I run the executable I receive the following error: "Line 17, in WindowsError: [Error 5] Access is denied". The program runs fine in the ...
1
vote
1answer
18 views

os.walk doesn't work correctly with unicode characters in path

I want to walk through directory where subdirectories can contain non-ascii characters in names. In this case os.walk considers the subdirectory as a file. The examples below: I have directory test ...
0
votes
0answers
8 views

Including Freetype in Python Portable

I'm building a Python tool on Windows using https://github.com/rougier/freetype-py as an API for freetype. Of course, it is dependent on the freetype fonts. The tool has to be portable, so I'd like ...
1
vote
1answer
25 views

Python33, Flask: Lot of Errors starting Hello World

I just have installed with pip flask and HTML5 on my window-sytem. When I start the Hello World!-program with IDLE I get the text correct in a new tab of Firefox. But also a lot of error-messages in ...
0
votes
0answers
18 views

Pyserial can't read 'large' data in multiple threads

I've been trying to port a script to Windows from Linux that records data from a mic array via the serial port. The Linux version uses the termios module which isn't supported on Windows so I'm using ...
0
votes
0answers
24 views

pip install UnicodeDecodeError

When I'm trying to install beautifulsoup4 on my new notebook (Win 7 64) using pip, I get this error: Cleaning up... Exception: Traceback (most recent call last): File ...
2
votes
1answer
42 views

Python not printing all the sys.argv

I'm getting a list out of range error from sys.argv[1] and I tried making a simple script with this code. import sys print sys.argv I get this on cmd: C:\...\...\...\py>back.py exampleargv ...
0
votes
1answer
22 views

Implementing a “screen” command for windows machine using python

So I am trying to do following: I have Cygwin enabled with screen and ssh daemon in Windows 7. I create a new screen using the command screen -dmS "my_screen" on my Windows machine. I ssh to the ...
0
votes
2answers
30 views

WxPython - How to hide the X and expand button on window

Im making a python program and in some functions it needs to hide the X and expand window buttons, how would i do it? Im using WxPython, how would I put this in?
0
votes
1answer
14 views

syncdb error with Django under Windows (OpenKey error?)

I'm trying to follow the Django Tutorial (https://docs.djangoproject.com/en/1.6/intro/tutorial01/) I tried to run: python manage.py syncdb Which resulted in the error: Traceback (most recent call ...
0
votes
3answers
51 views

Window closes immediately after running program

I am new to all programming and I just started to get interested in learning how to program. So to do so I started with what most people consider the easiest language: Python. The problem I am having ...
-1
votes
3answers
36 views

How to start reading from x line in a text file with python

I am dealing with a large text file on my windows machine, and I want a script that can print out lines from said text fill starting with a given line index. with open('big_file.txt', 'r') as f: ...
1
vote
0answers
25 views

What is causing this Windows runtime error (R6034)?

I have a Windows Python script which was compiled to an exe and it worked perfectly but when I embedded a manifest file (requesting admin privileges) into it and then ran it I got two errors and the ...
4
votes
2answers
66 views
+50

Subtime Text 2 - can't run windows command with spaces and quotes

I have a small Python script generating a Windows command: def quoted(s): return '"' + s + '"' import os path = 'C:\\Program Files\\SumatraPDF\\SumatraPDF.exe' params = ' -page 5 ' arg = ...
0
votes
2answers
18 views

Cython + Windows 8.1 + VS express 2013

So, that's another Windows + cython question... Cython does succeed in compiling some simple scripts (although not all), and gcc exits with an error code on most. I have configured Setup.py to use ...
0
votes
1answer
26 views

Pass variable into Batch file

I have a script that works that requires me to pass variable to batch file, test.bat script pst = subprocess.Popen( ["test.bat", userIP], stdout = subprocess.PIPE, stderr = ...
0
votes
0answers
12 views

Compile Cython extensions from the command line with gcc (mingw32) on windows

I'm trying to test a small cython module on win32, and I'm having trouble building it. The file is called linalg_cython.pyx and has these contents: from __future__ import absolute_import, ...
1
vote
1answer
20 views

Python OS-dependent libraries: Windows 7 SUA

When reading the Python docs, many libraries/functions indicate they work differently, or not at all, depending on the operating system. Most of the libraries depend on whether the OS is POSIX ...
0
votes
1answer
22 views

Using Python, how do you remove files given a filespec such as “*.obj” on Windows? [duplicate]

How do you remove files given a filespec such as "*.obj" on Windows? I'm using Windows 7 and 8.1 at the moment. Evidently os.remove does not take filespecs ("filespec" being a crude ...
0
votes
1answer
24 views

Python syntax error with subprocess.poll

I ran into this issue today, and managed to repeat it with this small stub of script, running with python 2.7.6 on a win7x64 machine, but the issue came up using portable python on various windows ...
0
votes
1answer
35 views

py2exe error: “Error in atexit._run_exitfuncs:Error in sys.exitfunc:”

I am trying to wrap my pyqt application into a windows executable using py2exe. I was able to generate the exe just fine but on running it, it gives an error which I have no clue about. Here's my ...
0
votes
1answer
22 views

PyInstaller-built Windows EXE fails with multiprocessing

In my project I'm using Python's multiprocessing library to create multiple processes in __main__. The project is being packaged into a single Windows EXE using PyInstaller 2.1.1. I create new ...
1
vote
1answer
38 views

Exception starting IPython notebook

When I start an ipython notebook as follows: C:\Python27\python.exe "C:\Python27\scripts\ipython-script.py" notebook I get the following errors: 2014-07-24 14:22:24.584 [NotebookApp] Using ...
1
vote
0answers
14 views

Retrieve printer URI in Windows with Python

I have a Python script to detect whether a USB printer is plugged in, which at first finds the URI of the printer (given its name). In OSX I've managed to get this working using pycups (using ...
-2
votes
0answers
14 views

Windows can't verify source of a program opened with python

I created a python program to open a .exe file for me. However when it tries to open it I get a security message saying "Windows cannot verify the creator of this file" and asks me if I would like to ...
1
vote
1answer
37 views

run python scripts in batch and wait for return from their executions

How do I write a batch script in windows that starts 2 python scripts and waits for both of them to return? and also terminates both of them if I terminate the batch script? Already asked this and ...
0
votes
1answer
14 views

How to emulate socket.socketpair on Windows

The standard Python function socket.socketpair is unfortunately not available on Windows (as of Python 3.4.1), how can I write a replacement that works on both Unix and Windows?
0
votes
0answers
32 views

Identify if power state change is caused by user or by power policy

I am writing a windows service in Python and this service needs to know, when a power state event occurs, what caused it. This could be the user or a power policy. Right now, I successfully detect the ...
0
votes
1answer
18 views

Use python to call a batch script that sets env variables and run another program that uses them

I need to call a batch script from Python that sets environment variables and then use those environment variables to complete the execution of other programs. I am in a windows environment running ...
0
votes
2answers
26 views

How can I get signaled by QSocketNotifier that a pipe is ready for reading?

Using Python 3.4, on Windows as well as Unix, I mean to use QSocketNotifier to discover that a pipe is ready to read from. It's a kind of contrived example, since the pipe is used within a single ...
0
votes
0answers
21 views

run python scripts in batch and wait for return from both executions in windows

How do I write a batch script in windows that starts 2 python scripts and waits for both of them to return? and also terminates both of them if I terminate the batch script?
0
votes
0answers
24 views

How to send a web page to the default printer from within a Python script?

I'm working with a proprietary Windows application with a broken print executable - it needs Internet Explorer 8 or below to behave correctly. Sticking with Internet Explorer 8 isn't an option as the ...
0
votes
0answers
13 views

How to get folder owner from a network drive using Python standard library on Windows?

I'm trying to use Python 2.7.5 to determine the owners of a few folders. I can't install any additional modules (like PyWin32) to make it easier on myself, so I have to parse command line output ...
0
votes
0answers
18 views

Make python virtualenv ignore “outside enviroment” packages

I have an unusual situation: I am developing on a machine that is also used for tests. As such, I cannot uninstall packages from the "main" (outside any virtualenvs) python installation. But the ...
0
votes
0answers
30 views

Windows STDERR redirection happening only on application exit

I have a c++ console application for which I am redirecting the output and the error streams to the file mentioned. myapp.exe > stdout.log 2> stderr.log The c++ application uses python module ...
0
votes
1answer
28 views

Why os.rename sometimes returns error access is denied python

I used os.rename() method to rename the directory in my python script. This script called automatically by the scheduler every day. Sometimes the os.rename() function returns the error, [Error 5] ...
4
votes
1answer
110 views

How to create a shortcut in startmenu using setuptools windows installer

I want to create a start menu or Desktop shortcut for my Python windows installer package. I am trying to follow https://docs.python.org/3.4/distutils/builtdist.html#the-postinstallation-script Here ...
0
votes
2answers
41 views

How can I run my python scripts on a windows machine without installing extra libraries?

I'm working on a python script but it uses a library called Selenium to perform most of its tasks. This script needs to be able to run in a windows environment and I can't go through the trouble of ...
0
votes
1answer
33 views

Is something like this possible in Python?

I have an executable file (hello.exe) that was given to me by a friend. This executable file creates another exe file (test.exe) and runs the executable through another command line window. I wanted ...
0
votes
2answers
28 views

Unable to kill process started by Python

After start.exe is executed by Python, the output of start.exe is displayed in the python stdout. However 5 seconds later, we do not see Quitting printed and the task is not killed. Is there an ...
0
votes
1answer
22 views

celery log shows “Permission Denied”

I'm running celery on Windows, and there's a task that writes a file on a network drive. Looks like it's having issue to write due to permission. Here's part of celery log that shows the error: File ...