Tagged Questions
0
votes
1answer
6 views
dir_util.copy_tree won't print the files that it copies
I'm using Python 2.6. I use the dir_util.copy_tree function to copy files, and I want to see which files are copied on the command line. However, it never prints them out, even when I specify ...
0
votes
0answers
34 views
pip not installing to site-packages directory from within virtualenv when I use a requirements.txt
I'm relatively new to running Python with virtualenv so this might be an easy fix, but I can't for the life of me figure out what's going on. I'm running Windows 7 professional x64 with Python 2.7.5 ...
0
votes
0answers
9 views
pygtk not working on windows even after installation
I have installed pygtk in windows from here . Still, when i run a code that has the statement import gtk in it, i get the error as:
Traceback (most recent call last):
File "E:\pycalc\calc2.py", ...
-1
votes
0answers
36 views
Python IndexError: list index out of range, only on Debian, work on windows
when i run my script on debian7 I've got an index error with the following traceback:
Traceback (most recent call last):
File "pyvisitor.py", line 174, in <module>
main()
File ...
2
votes
1answer
32 views
Copy files to new Folder but keep original creation date
I'm trying to copy files from one location to another using Python. Currently I have the following code. It works but changes the 'creation date' to the date the files were copied
over to the ...
0
votes
1answer
48 views
Deploying a Python Script to Windows and Linux
I have a python server that I need to run in both a Linux and Windows environment, and my question is about deployment. What is the best method for deploying the solution instead of just double ...
0
votes
1answer
51 views
Fill a HDD with charcter 0
I am writing a program to fill a HDD with junk and was wondering what might be the best approach at this that will use less computer resources and time.
I have a simple wx interface to chose the ...
0
votes
0answers
8 views
Error in installing Mlabwrap
I have been trying to install Mlabwrap on both mac and windows and I did not get to install it on any of them
Here is the error I get when I try installing it on mac
Traceback (most recent call ...
0
votes
1answer
28 views
Why does Python ctype c_char_p return different values on OSX vs. Windows?
I'm learning more about Pythons ctypes module, and have noticed an oddity that I am not sure how to explain.
On Windows (Python 2.7.4), the following is returned:
>>> from ctypes import *
...
0
votes
0answers
17 views
Python correctly finding and reading windows application event logs
so my ultimate goal is to use python to read a specific application's windows event log when triggered by a file update.
Here is my problem, python I believe does not have access to the event logs ...
1
vote
1answer
43 views
Replacing WMI calls with Winapi
I am currently looking to replace all my code that uses WMI with equivalent win32 api calls. I am doing this because i have noticed that WMI calls take much longer to perform than win32 api calls. ...
1
vote
1answer
37 views
Program/tools to develop a desktop gadget? [on hold]
this is more of an idea type question rather than a programming type question so please just let me know if this is the wrong place to post kindly.
I wanted to create a desktop gadget, such as a ...
1
vote
2answers
51 views
virtualenv on windows installs in system site packages
I initialize my project with virtualenv through these steps(in Windows 7 OS):
$ cd myproject
$ virtualenv venv
$ venv\scripts\activate
and then I try to install flask
$ pip install Flask
but I ...
0
votes
2answers
54 views
Check if PID exists on Windows with Python without requiring libraries
Is there a way to check if a PID exists on Windows with Python without requiring libraries? How to?
0
votes
1answer
52 views
python: why does os.makedirs cause WindowsError?
In python, I have made a function to make a directory if does not already exist.
def make_directory_if_not_exists(path):
try:
os.makedirs(path)
break
except OSError as ...
0
votes
2answers
49 views
How to execute batch file from Python so that it could alter environment of the calling process? [duplicate]
On Windows there's a 3rd party command line tool I would like to use in my python script. Let's say it's foobar.exe located under C:\Program Files (x86)\foobar. Foobar comes with an additional batch ...
0
votes
1answer
32 views
Python + Tkinter Windows 7 taskbar progress
I want to show the progress of my app in a taskbar button.
I used this answer as a reference.
Here's an example of what I do:
import tkinter
import comtypes.client as cc
...
0
votes
0answers
24 views
Google App Engine Launcher slow app response
When I try to access a local app from localhost:8080 using the GAE launcher, it takes about 42 seconds for a response every time very consistently. Even for the simplest apps like the hello world ...
0
votes
2answers
58 views
Computing folder size: Empty folders have a default size?
I'm trying to compute a folder's size in Python, but I have strange result.
This is a snippet of my code:
def bestsize(filepath):
""" Return a tuple with 3 values. The first is the file (or ...
-2
votes
2answers
59 views
How to write a window in python [closed]
I know python uses toolkits to write GUI's, but is it possible to write a simple, blank, custom window for MS Windows from scratch, without relying on a third party toolkit? If so, how would python ...
0
votes
0answers
13 views
HCI Socket with Python on Windows
In Linux i can easily get a raw HCI socket to a bluetooth adapter:
import socket
s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_RAW, socket.BTPROTO_HCI)
which does not work in windows. First of ...
-1
votes
1answer
24 views
COmmunication between windows host and centos guest through vbox [closed]
I am trying to access the db which is there on my windows 7 machine through centos mounted on oracle virtual box. I am using python as the language, using Django.
I have made the following changes ...
1
vote
1answer
17 views
Remove a network printer with Python's wmi module?
For starters, here's the WMI module I'm referring to.
I've tried many combinations of code, and understand how to remove network printers with wmic from the command line, as well as a basic ...
0
votes
1answer
33 views
Python keyboard event does not respect layout
I have a problem with win32api.keybd_event in python (see script below):
Under EN layout the script press "q" key then "1" key (seems ok).
Under FR layout the script press "q" key then "&" key ...
0
votes
1answer
27 views
Ignoring windows hidden files with python glob
I am moving some files with a python script. The script should work on both osx and windows.
I am using the the glob module to select the files. Filter out directories with isfile method from ...
0
votes
1answer
47 views
Tcl error : invalid command name tcl_findLibrary
This error appears when I type the following commands (using iPython)Tkinter.Tk(), %pylab, plot ..... or run pylab in general but import pylab doesn't fire any error.
Tcl error : invalid command name ...
1
vote
0answers
16 views
how to capture the devcon.exe's output log under the the normal users?
Now I want to capture the devcon.exe's output in the normal users permission,
How to capture commandline output
the guy resolve this problem just in the administator's permission,yes! I can capture ...
0
votes
1answer
29 views
How to use espeak with python
I want to use espeak(http://espeak.sourceforge.net) with python2.7.0-32 bit in windows7 can anyone of you help in doing that and one more thing that i want to save an audio file generated by ...
2
votes
4answers
65 views
Merge two lines with grep or sed
I have such a problem: I have two files with keys:
file1: aa, bb, cc, dd, ee, ff, gg;
file2: aa, bb, cc, zz, yy, ww, oo;
I need to write a script using grep/sed to produce two files:
res1.txt - ...
0
votes
0answers
13 views
Pinger fof web application
I have a web application written in turbogears and I want to build a pinger to check if the web application is still alive! d you have any idea on how to achieve that?
The problem we usually have is ...