How does one retrieve ( or resolve, for that matter ) the absolute and relative ( FullPath and OriginalPath fields ) paths of FileSystemInfo/DirectoyInfo/FileInfo instances ? I'm trying to get the paths of the files/directories returned by a FileSystemInfos call on a DirectoryInfo class object.
...
When specifying my script file in setup.py, e.g. "script": 'pythonturtle.py', how can I specify its relative position in the file system? In my case, I need to go down two folders and then go into the "src" folder and it's in there. How do I write this in a cross-platform way?
...
What's the fastest way to find strings in text files ? Case scenario : Looking for a particular path in a text file with around 50000 file paths listed (each path has it's own line).
...
On a GNU system I would just use readlink -f $SOME_PATH, but Solaris doesn't have readlink.
I'd prefer something that works well in bash, but other programs are ok if needed.
Edit: The best I've come up with so far uses cd and pwd, but requires some more hackery to deal with files and not just directories.
cd -P "$*"
REAL_PATH=`pwd`
...
I develop my project at ~/Dropbox/db/. I need to move the folder continuously to /var/www to be able to see the result in Firefox because it is the only place where I have Apache.
My filetree is at ~/Dropbox/db/
.
|-- handlers
| |-- login.php
| |-- question.php
| |-- question_answer.php
| `-- register.php
|-- index.php
|-- form...
Just wondering how many people use a path module in Python such as Jason Orendorff's one, instead of using os.path for joining and splitting paths? Have you used:
Jason's path module (updated for PEP 355)
Mike Orr's Unipath, basically a more modern version of the above
Noam Raphael's alternative path module that subclasses tuple instea...
I want to split
$path = getenv('PATH');
into its components. How do I determine the separator char in an os-dependent fashion?
...
Hi,
Does somebody know the algorithm that is been used to fill or draw a Path2D (GraphicsPath in .NET) object with a Graphics2D-object (Graphics in .NET). The algorithm isn't public in the Java-sources and .NET isn't public at all. I want to use it for some fast image-operations.
Thnx
...
Lets say Python is installed in the location "C:\TOOLS\COMMON\python\python252" .
I want to print this location in the output of my program. Please let me know which is the function for doing this.
Thank you very much.
...
We are working with a code repository which is deployed both to windows and linux, sometimes on different directories.
How should one of the modules inside the project refer to one of the non-python resources in the project (CSV file, etc.)?
If we do something like
thefile=open('test.csv')
or
thefile=open('../somedirectory/test.csv')...
Is there a way to use a full server path instead of a url when submitting a form via ajax with jquery?
The exemple below doesn't work but it will give you an idea of what I'm trying to do. I know you can't do cross domain ajax requests but this is all on the same physical server.
I don't want to set up proxy or anything too fancy, if t...
I'm trying to install a Windows Service using a batch file, let's call it "installservice.bat". Inside the file I have the following commands:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -i ".\MyService.exe"
pause
When I excute the batch file (running as administrator on Vista) I get this:
Exception occurred whil...
I need to dynamically load a CSS stylesheet into a page that's on a different domain. How can I get the complete URL of the JS file to use in the href attribute of the stylesheet?
For instance, here is the structure:
http://bla.com/js/script.js
http://bla.com/css/style.css
I want to dynamically load the stylesheet into a page http:...
I'm writing a module that interfaces with Google Base. It needs to insert a link to the page that the item is on, however, this item has no path until pathauto runs. How can I either make sure pathauto runs its hooks before my module does, or get the path that will result from pathauto?.
The solution needs to be generic enough to wo...
I attempt to get the path of the document directory on the iPhone SDK with the following code:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
I'm in distribution and not debug configuration. In debug a valid path is returned. Also I'm using iPhone OS 3.0
Please help!
Joe
...
I'm trying to find a definitive answer (e.g. Apple developer documentation) for the maximum length of a complete path string on Mac OS X. I've seen various non-authoritative sites that state that it is unbounded, 4096 characters, or 1024 characters, but haven't been able to find an answer on Apple's web site.
...
I'm having a problem getting XCode to deal with a particular file structure that I am using or that I wish to use.
I have a set of files in the following form...
Library
Headers
Library
Package1
Header1.h
Header2.h
HeaderN.h
Package2
Header1.h
Hea...
Hello,
I try to use Eclipse as an IDE for C programming. Hence, I installed cygwin successfully thereby getting gcc,gdb, and make tools. I'm able to execute C programs on cygwin, however I can't do that on Command prompt. I know, there must be a problem related to Path. But I added C:\Cygwin\bin;C:\Cygwin\usr\bin to the path. I double-c...
I get a string that more or less looks like this:
"C:\\bláh\\bleh"
I make a FileInfo with it, but when I check for its existence it returns false:
var file = new FileInfo(path);
file.Exists;
If I manually rename the path to
"C:\\blah\\bleh"
at debug time and ensure that blah exists with a bleh inside it, then file.Exists starts...
I’m creating an executable JAR that will read in a set of properties at runtime from a file. The directory structure will be something like:
/some/dirs/executable.jar
/some/dirs/executable.properties
Is there a way of setting the property loader class in the executable.jar file to load the properties from the directory that the jar is...