path

Fatal Error C1083 - Cannot open include file: “windows.h”: No such file or directory

寵の児 提交于 2019-12-29 07:00:06
问题 I'm trying to get IKVM to build (see this question) but now have encountered a problem not having to do with IKVM so I'm opening up a new question: When running nant on the IKVM directory with the Visual Studio 2008 Command Prompt (from the Start Menu), I get the following error: ikvm-native-win32: [cl] Compiling 2 files to C:\ikvm-0.36.0.11\native\Release'. [cl] jni.c [cl] os.c [cl] C:\ikvm-0.36.0.11\native\os.c(25) : fatal error C1083: Cannot open include file: 'windows.h': No such file or

Python can't find my module

拟墨画扇 提交于 2019-12-29 03:02:48
问题 I have a python project (which I run within a virtualenv) and that has the following structure: Project ├───.git ├───venv └───src ├───__init__.py ├───mymodules │ ├───__init__.py │ ├───module1.py │ └───module2.py └───scripts ├───__init__.py └───script.py script.py import src.mymodules.module1 ... I run the project with venv activated and from the Project directory using the following command: (venv)$ python src/scripts/script.py The script runs but gives out the following error before exiting:

Insecure world writable dir /Users/username in PATH, mode 040777 when running Ruby commands

邮差的信 提交于 2019-12-29 02:33:29
问题 When I run Ruby commands like gem -v I get this error: /Users/kristoffer/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /Users/kristoffer in PATH, mode 040777 1.6.2 First of all I don't understand what this means. /Users/kristoffer is not in my path according to echo $PATH . The result of echo $PATH is: /Users/kristoffer/.rvm/gems/ruby-1.9.2-p180/bin:/Users/kristoffer/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/kristoffer/.rvm/rubies/ruby-1.9.2-p180/bin:/Users

How to get long file system path from python on Windows

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-28 22:30:23
问题 This returns me a short path (DOS convention) (on Windows): import tempfile tempDir = tempfile.mkdtemp() print tempDir Output >>> c:\users\admini~1\appdata\local\temp\tmpf76unv Notice the admini~1 . How can I get/convert this to a full path? e.g. C:\users\administrator\appdata... 回答1: Please try the following code (updated): from ctypes import create_unicode_buffer, windll BUFFER_SIZE = 500 buffer = create_unicode_buffer(BUFFER_SIZE) get_long_path_name = windll.kernel32.GetLongPathNameW get

Changing the directory where .pyc files are created

痞子三分冷 提交于 2019-12-28 13:41:38
问题 Is there a way to change the directory where .pyc file are created by the Python interpreter? I saw two PEPs about that subject (0304 and 3147), but none seems to be implemented in the default interpreter (I'm working with Python 3). Did I miss something ? 回答1: There's no way to change where the .pyc files go. Python 3.2 implements the __pycache__ scheme whereby all the .pyc files go into a directory named __pycache__ . Python 3.2 alpha 1 is available now if you really need to keep your

Changing the directory where .pyc files are created

不问归期 提交于 2019-12-28 13:41:13
问题 Is there a way to change the directory where .pyc file are created by the Python interpreter? I saw two PEPs about that subject (0304 and 3147), but none seems to be implemented in the default interpreter (I'm working with Python 3). Did I miss something ? 回答1: There's no way to change where the .pyc files go. Python 3.2 implements the __pycache__ scheme whereby all the .pyc files go into a directory named __pycache__ . Python 3.2 alpha 1 is available now if you really need to keep your

Listing all files matching a full-path pattern in R

Deadly 提交于 2019-12-28 11:51:11
问题 I am trying to obtain the list of files matching a full-path pattern. So far, I have used list.files() but it did not work. Let's assume that we have the following directory organization: results |- A | |- data-1.csv | |- data-2.csv | |- B |- data-1.csv |- data-2.csv Then the following command: list.files(pattern='data-.*\\.csv', recursive=TRUE) will return all the files matching the pattern. This works, but the problem appears when using a full-path pattern. For instance, if I want to obtain

where is $PATH set in xcode?

丶灬走出姿态 提交于 2019-12-28 05:49:10
问题 It looks like xcode's $PATH environment setting is different from my user shell environment. Where does xcode get the $PATH setting from and what's the best way to append to the search path? 回答1: if you're writing a Run Shell Script build phase, you can just do: PATH=${PATH}:/opt/local/bin or whatever inside the script content. 回答2: XCode gets its environment variables the same way as other OS X processes, from ~/.MacOSX/environment.plist. Check developer.apple.com/qa/qa2001/qa1067.html for

Specify more than one directory in Web.Config's Location Path element

一曲冷凌霜 提交于 2019-12-28 04:22:11
问题 In my ASP.NET's Web Config file I have the following location elements defined: <location path=""> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> <location path="dir1"> <system.web> <authorization> <allow users="?"/> </authorization> </system.web> </location> <location path="dir2"> <system.web> <authorization> <allow users="?"/> </authorization> </system.web> </location> The example above is specifying that all directories will be locked down to

Set a path variable with spaces in the path in a Windows .cmd file or batch file

与世无争的帅哥 提交于 2019-12-28 03:20:14
问题 I'm new to script writing and can't get this one to work. I could if I moved the files to a path without a space in it, but I'd like it to work with the space if it could. I want to extract a bunch of Office updates to a folder with a .cmd file. To make the batch file usable on any computer, I set a path variable which I only have to change in one place to run it on another machine. The problem is that the path has a space in it. If I put quotes around the path in the definition, cmd.exe puts