there is any way to launch program by its API using python and run it on a specified core? i need to launch a cpu-expensive application about 5 times and run it on different core in order to save time. i’m using windows Answer The process can set its own affinity, here is what I do (you can change the
Tag: windows
Installing Hiredis with pip on windows machine
I´ve been trying to install Hiredis in my virtual environment. I developing in windows 7. At first i got the vcvarsall.bat error (or something like that). I read a lot of blogs and suggestions to …
Missing files for `magic` library on Windows
I need to get mime type for some files on windows, so i’ve installed python-magic (on 32-bit python 2.7.3). It depends on unix magic library. Author instructs to get regex2.dll, zlib1.dll and magic1.dll from gnuwin32 project. So i saved the files to a folder and added the folder to my system PATH. Now when i execute magic methods, i get
Python: How can I make the ANSI escape codes to work also in Windows?
If I run this in python under linux it works: But if I run it in Windows it doesn’t work, how can I make the ANSI escape codes work also on Windows? Answer For windows, calling os.system(“”) makes the ANSI escape sequence get processed correctly:
How to build a SystemTray app for Windows?
I usually work on a Linux system, but I have a situation where I need to write a client app which would run on windows as a serivce. Can someone help me or direct to, on how to build a MenuBar app ( …
Celery + Django: Cannot start celerybeat on Windows 7
I’ve been developing a Django application and I am now trying to add Celery for background tasks. I need both normal tasks and periodic tasks to be queued. I can start up celeryd just fine, and execute tasks with it (I start it with the command python manage.py celeryd start –settings=settings –loglevel=INFO). On Windows you can’t do -beat/-b to enable
Python. IOError: [Errno 13] Permission denied: when i’m copying file
I have two folders: In, Out – it is not system folder on disk D: – Windows 7. Out contain “myfile.txt” I run the following command in python: What’s the problem? Answer Read the docs: shutil.copyfile(src, dst) Copy the contents (no metadata) of the file named src to a file named dst. dst must be the complete target file name;
Use the python interpreter packaged with py2exe
I have a python script I want to distribute to Windows, where people might not have python installed. So I use py2exe. The problem is in the script I run other python scripts by using subprocess, …
Parsing the results of askopenfilenames()?
I’m trying to get a list of filenames from tkinter.filedialog.askopenfilenames() in Python 3.2. files = askopenfilenames(initialdir=”C:\Users\BVCAP\Videos”, title=”Select files”) self….
Getting cursor position in Python
Is it possible to get the overall cursor position in Windows using the standard Python libraries?