On Dec 16, 8:30 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Sat, 16 Dec 2006 17:02:04 -0800, Sandra-24 wrote:
> > Comparing file system paths as strings is very brittle.Why do you say that?
> > Are you thinking of something like this?
>
> /home//user/somedirectory/../file
> /home/user/file
Tim Chase wrote:
> >>> Comparing file system paths as strings is very brittle. Is there a
> >>> better way to test if two paths point to the same file or directory
> >>> (and that will work across platforms?)
> >>os.path.samefile(filename1, filename2)
> >>os.path.sameopenfile(fileobject1,
Frank Niessink wrote:
> Ziga Seilnacht:
> > This method was changed in Python 2.5. Previously, two instancemethods
> > compared equal if their im_self attributes were *identical* and their
> > im_func attributes were equal. Now, they compare equal if their im_self
> > attributes are *equal* and the
On Sun, 17 Dec 2006 00:19:40 +0100, > wrote:
>
> Incorrect, I believe. The above is like saying Lisp's lack of
> optional manual storage allocation and machine pointers makes Lisp
> less powerful. It's in fact the absence of those features that lets
> garbage collection work reliably. Reliable
On Dec 16, 8:43 pm, Jive Dadson <[EMAIL PROTECTED]> wrote:
>I bought the ebook. Searching for "pixel", all I came up with was a
> method called GetPixel in a "device context." I know there must be a
> device context buried in there somewhere, so now I need to winkle it out.
You are right that yo
On 16 dic, 17:39, "The Night Blogger" <[EMAIL PROTECTED]>
wrote:
> Is there a way to pull & push data (Tasks, Notes, Calendar Items ...) into
> Microsoft Oulook from Python ?
You will need the pywin32 package.
Then you get the Outlook Application object using:
import win32com.client
Outlook = w
On 12/16/06, The Night Blogger <[EMAIL PROTECTED]> wrote:
> Can someone recommend me a good API for writing a sexy looking (Rich UI like
> WinForms) shrink wrap application
> My requirement is that the application needs to look as good on Windows as
> on the Apple Mac
wxPython or something layere
On 16 dic, 14:44, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote:
> I used to have the following code to collect all (old style) class
> names defined in the current module to a list called reg:
>
> def meta( reg ):
> def _meta( name, bases, dictionary ):
> reg.append( name )
> return
I want to read and write unicode on stdin and stdout. I can't seem to
find any way to force sys.stdin.encoding and sys.stdout.encoding to be
utf-8, so I've got the following workaround:
import codecs, sys
out = codecs.getwriter("utf-8")(sys.stdout)
def tricky(): return sys.stdin.readline().decod
Tim Chase wrote:
>>> Comparing file system paths as strings is very brittle.
>>
>> Why do you say that? Are you thinking of something like this?
>>
>> /home//user/somedirectory/../file
>> /home/user/file
>
> Or even
>
> ~/file
~ is interpreted as "my home directory" by the shell, but when it
Leif K-Brooks wrote:
> ~ is interpreted as "my home directory" by the shell, but when it's used
> in a path, it has no special meaning. open('~/foo.txt') tries to open a
> file called foo.txt in a subdirectory of the current directory called '~'.
That's what os.path.expanduser is for.
--
Erik
CakeProphet wrote:
> Hmmm... a quick fix might be to temporarily replace all tab characters
> with another, relatively unused control character.
>
> MyString = MyString.replace("\t", chr(1))
> MyString = textwrap.dedent(MyString)
> MyString = MyString.replace(chr(1), "\t")
>
> Of course... this
Hi,
(Off-topic)
I am looking to put an open-source bug/issue tracking system in place
for our current project (eventually expanded for all projects), and
would appreciate any experiences/comments/suggestions.
Note the project is encompasses embedded hardware (ASIC plus firmware)
plus application
Sandra-24 wrote:
> Comparing file system paths as strings is very brittle. Is there a
> better way to test if two paths point to the same file or directory
> (and that will work across platforms?)
No.
There are ways to do it for many operating systems, but there is no
system-independent
Nick Maclaren wrote:
> A collection is inhomogeneous if, for some attribute that is needed
> for at least one action on at least one element of the collection,
> the attribute is not shared by all elements of the collection.
If you mean "attribute" in the Python sense, then this
is wr
greg <[EMAIL PROTECTED]> writes:
> Ken Tilton wrote:
>
>> McCarthy: "Is code also data in Python?"
>> Norvig: "No."
>
> I don't think that was the right answer. He should have
> said "Yes", and then shown McCarthy eval() and exec.
>
> Code isn't quite as *convenient* to work with as data
> in Pyth
greg <[EMAIL PROTECTED]> writes:
> André Thieme wrote:
>> (aif (timeConsumingCalculation)
>> (use it))
>
> I think the answer is that you just wouldn't do
> that in Python at all. Having magic variables
> spring into existence in your local namespace
> as a side effect of calling something i
101 - 117 of 117 matches
Mail list logo