John Machin wrote:
> Reinhold Birkenfeld wrote:
>> Berthold Höllmann wrote:
>>
>>>Francois De Serres <[EMAIL PROTECTED]> writes:
>>>
>>>
hiho,
what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D)
to the string 'spam'?
>>>
>>>.>>> t = (0x73, 0x70, 0x61, 0x6D)
>>>.>>
"Ximo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can I do a function which don't return anything?
No, if you mean like subroutines.
> The question is that, if I do a function that have a return or without
> return, it returns always "None", but i want that it doesnt return
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> HI guys,
> I am trying to automate some project work which the accounting dept
> of the company uses. They have to go through multiple steps to achieve
> the final goal. Is there some way that I can use python to automate
> these manu
Yup rebuilt the rpms and it worked
Thanks a lot guys
Sybren Stuvel wrote:
> Christophe Lambin enlightened us with:
> > However, since your wxPython package wasn't built for FC4, you may
> > run into other problems.
>
> That should be solved by recompiling the wxPython RPMs.
>
> Sybren
> --
> Th
Christopher Subich wrote:
> none wrote:
>
>> Probably a stupid question, but...
>>
>> I was attempting to install the Tkinter 3000 WCK. It blew up trying
>> to build _tk3draw. The first error is a 'No such file or directory'
>> for tk.h. I can import and use Tkinter just fine, so I'm not sure
George Sakkis wrote:
> Bringing up how C models files (or anything else other than primitive types
> for that matter) is not a particularly strong argument in a discussion on
> OO design ;-)
While I have worked with C libraries which had a well-developed
OO-like interface, I take your point.
Stil
none wrote:
> Probably a stupid question, but...
>
> I was attempting to install the Tkinter 3000 WCK. It blew up trying to
> build _tk3draw. The first error is a 'No such file or directory' for
> tk.h. I can import and use Tkinter just fine, so I'm not sure what is
> what here.
You can imp
On Thu, Jul 21, 2005 at 10:27:24AM -0400, Bill Mill wrote:
> On 7/21/05, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> > On Wed, 20 Jul 2005 16:30:10 -0400, Bill Mill wrote:
> >
> > > On 7/20/05, Simon Brunning <[EMAIL PROTECTED]> wrote:
> > >> On 7/20/05, Mage <[EMAIL PROTECTED]> wrote:
> > >> > O
Kane Bonnette wrote:
> Does anyone know how the clear the text from a Tkinter Text Widget? The
> delete(0, END) trick that works for Entry widgets doesn't work for Text
>
> I get "0 is an invalid index" when i try to do so
>
> Thanks in advance
In case anyone's wondering, you must use 0.0 inste
ncf wrote:
> Well, suffice to say, having the class not inherit from object solved
> my problem, as I suspect it may solve yours. ;)
Actually, I did a bit of experimenting. If the __str__ reassignment
worked as intended, it would just cause an infinite recursion.
To paste the class definition a
Probably a stupid question, but...
I was attempting to install the Tkinter 3000 WCK. It blew up trying to
build _tk3draw. The first error is a 'No such file or directory' for
tk.h. I can import and use Tkinter just fine, so I'm not sure what is
what here.
First few lines of install attempt
Does anyone know how the clear the text from a Tkinter Text Widget? The
delete(0, END) trick that works for Entry widgets doesn't work for Text
I get "0 is an invalid index" when i try to do so
Thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
QH> On 7/22/05, Francois De Serres <[EMAIL PROTECTED]> wrote:
>> what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D) to
>> the string 'spam'?
QH> Use ''.join and chr() as others have pointed out. Here are
QH> just-for-fun versions ;)
.> t = (0x73, 0x70, 0x61, 0x6D)
QH> (use st
> "PN" == Pekka Niiranen <[EMAIL PROTECTED]> writes:
PN> Hi there,
PN> I have two scripts. The first "main.py" sets some variables
PN> and then imports another called "gen.py". The idea is to
PN> provide "main.py" that defines some paths, variables etc.
PN> without using Windows environment va
There is a module in the library called fileinput, should do what
you're looking for.
--
http://mail.python.org/mailman/listinfo/python-list
In trying to develop a protocol for a current app I'm working on, I was
using classes which inherited from object for my core packet, and using
str(Message) to convert it to an encoded packet. However, I found that
this did not work, and it drove me insane, so in a test file, I wrote
the following
One thing I don't like with GTK+ on Windows is that it uses GTK+
file dialogs rather than system file dialogs. wxWidgets uses file
dialogs that appear very similar to the system dialogs. Depends on your
customers but I don't think this is reasonable for most applications.
http://www.scintill
On Jul 22, 2005, at 7:46 PM, Michael Hoffman wrote:
> I'm too tired and/or lazy to check, but I believe str() is calling
> MyClass.__str__(testObject) as it is supposed to rather than
> testObject.__str__() as you say it is supposed to. ;-)
>
> Someone else or Google can probably enlighten you on
Scott David Daniels:
> Isn't it even worse than this?
> On Win2K & XP, don't the file systems have something to do with the
> encoding? So D: (a FAT drive) might naturally be str, while C:
> (an NTFS drive) might naturally be unicode.
This is generally safe as Windows is using unicode inte
Dr. Who wrote:
> Well, I finally managed to solve it myself by looking at some code.
> The solution in Python is a little non-intuitive but this is how to get
> it:
>
> while 1:
> line = stdout.readline()
> if not line:
> break
> print 'LINE:', line,
>
> If anyone can do it th
Peter Hansen wrote:
> Practically everything that path does, with a few useful exceptions, is
> a thin wrapper around the existing calls.
If the implementation is easy to explain, it may be a good idea.
OT: I just realized you can now type in "python -m this" at the command
line, which is conv
Jeffrey E. Forcier wrote:
> In other words, str() is _NOT_ apparently calling .__str__ as
> it's supposed to! However, calling __str__ directly (which, yes, you're
> not supposed to do) does work as expected:
I'm too tired and/or lazy to check, but I believe str() is calling
MyClass.__str__(
"Dr. Who" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Well, I finally managed to solve it myself by looking at some code.
> The solution in Python is a little non-intuitive but this is how to get
> it:
>
> while 1:
> line = stdout.readline()
> if not line:
> break
"Andrew Dalke" <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > You're right, conceptually a path
> > HAS_A string description, not IS_A string, so from a pure OO point of
> > view, it should not inherit string.
>
> How did you decide it's "has-a" vs. "is-a"?
>
> All C calls use a "char *" fo
In article <[EMAIL PROTECTED]>,
Girish <[EMAIL PROTECTED]> wrote:
>Hi,
>
>I wanna do some automation using "pexpect".
>I have an application which must be invoked from the command line in
>linux environment,it consists of buttons,textboxes etc can i access
>those widgets using "pexpect",say i wanna
In article <[EMAIL PROTECTED]>,
gene tani <[EMAIL PROTECTED]> wrote:
>Hi Sandeep,
>
>i didn't see where you said if these hosts you want to ping are on your
>internal network, or beyond your gateway. Probably the only truly
>reliable way to maintain an active hosts list is to install a
>ping-sendi
Reinhold Birkenfeld wrote:
> Berthold Höllmann wrote:
>
>>Francois De Serres <[EMAIL PROTECTED]> writes:
>>
>>
>>>hiho,
>>>
>>>what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D)
>>>to the string 'spam'?
>>
>>.>>> t = (0x73, 0x70, 0x61, 0x6D)
>>.>>> ''.join('%c' % c for c in t)
>>
Mark Jackson wrote:
> "Chirayu Krishnappa" <[EMAIL PROTECTED]> writes:
> > Hi,
> >
> > I need to scan documents with pages having printed matter on both
> > sides. It is easiest to stack them in the autosheet feeder and let it
> > scan. I end up with one file (say A.pdf) containing the odd pages in
I am attempting to write a class whose string representation changes
in response to external stimuli. While that effect is obviously
possible via other means, I attempted this method first and was
surprised when it didn't work, so I now want to know why :)
Given the following class definitio
Elby wrote:
> I'm looking for a the most simple and generic way to modify a file, with the
> possibility of making backups. In fact, I would like to emulate Perl's -i
> option.
>
> here is a bit of code, to explain it further :
>
> < code >
>
> from os import rename
>
> class Modif_File
Richard Kessler wrote:
> Just build python 2.3.4 (needed for Zope and Plone). Trying to learn more
> about use the data in sys.path from importing. When I run Python at the
> command prompt, import sys and print sys.path I get stuff that makes no
> sense. For example, /usr/local/lib/python23.zip.
Just build python 2.3.4 (needed for Zope and Plone). Trying to learn more
about use the data in sys.path from importing. When I run Python at the
command prompt, import sys and print sys.path I get stuff that makes no
sense. For example, /usr/local/lib/python23.zip.
Such a file does not even live
ch424 wrote:
[snip]
> However, when I open up the python command line, and type "from gpib
> import *" or "import gpib" I get "ImportError: /usr/.../gpibmodule.so:
> undefined symbol: ibdev" -- but I know it's defined in the ni488.h
> file, especially as I can use this code from actual C programs
Benjamin Niemann wrote:
> Pranav Bagora wrote:
>>" os.chmod(outfile,0700)
>>TypeError: coercing to Unicode: need string or buffer,
>>file found"
>
> Looks as if your are using a file object (that you got from an open() call)
> as the first parameter. What you need is a string with the path to the
Berthold Höllmann wrote:
> Francois De Serres <[EMAIL PROTECTED]> writes:
>
>> hiho,
>>
>> what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D)
>> to the string 'spam'?
>
> .>>> t = (0x73, 0x70, 0x61, 0x6D)
> .>>> ''.join('%c' % c for c in t)
> 'spam'
Or:
t = (0x73, 0x70, 0x61,
Michael Hoffman wrote:
> Peter Hansen wrote:
>
>> When files are opened through a "path" object -- e.g.
>> path('name').open() -- then file.name returns the path object that was
>> used to open it.
>
> Also works if you use file(path('name')) or open(path('name')).
Since that's exactly what th
On 2005-07-22, Girish <[EMAIL PROTECTED]> wrote:
> Hi ,
>
> I wanna do some automation work using "pexpect".
> I have an application which must be invoked from the command line in
> linux environment,it consists of buttons,textboxes etc can i access
> those widgets using "pexpect",say i wanna enter
ch424 wrote:
> However, when I open up the python command line, and type "from gpib
> import *" or "import gpib" I get "ImportError: /usr/.../gpibmodule.so:
> undefined symbol: ibdev" -- but I know it's defined in the ni488.h
> file, especially as I can use this code from actual C programs without
Michael Hoffman wrote:
> John Roth wrote:
>
>> However, a path as a sequence of characters has even less
>> meaning - I can't think of a use, while I have an application
>> where traversing a path as a sequence of path elements makes
>> perfect sense: I need to descend the directory structure, dir
In article <[EMAIL PROTECTED]>,
"Dr. Who" <[EMAIL PROTECTED]> wrote:
> So here it is: handle unbuffered output from a child process.
Your Perl program works the same for me, on MacOS X,
as your Python program. That's what we would expect,
of course, because the problem is with the (Python)
progr
Well, I finally managed to solve it myself by looking at some code.
The solution in Python is a little non-intuitive but this is how to get
it:
while 1:
line = stdout.readline()
if not line:
break
print 'LINE:', line,
If anyone can do it the more Pythonic way with some sort of
Daniel Dittmar wrote:
> Duncan Booth wrote:
>
>> I would have expected a path object to be a sequence of path elements
>> rather than a sequence of characters.
>
>
> Maybe it's nitpicking, but I don't think that a path object should be a
> 'sequence of path elements' in an iterator context.
Thanks, that helps.
Thierry
--
http://mail.python.org/mailman/listinfo/python-list
So here it is: handle unbuffered output from a child process.
Here is the child process script (bufcallee.py):
import time
print 'START'
time.sleep(10)
print 'STOP'
In Perl, I do:
open(FILE, "python bufcallee.py |");
while ($line = )
{
In main.py, execfile("gen.py")
or
In gen.py, have something like
from __main__ import env_params
or
In main.py, have something like
import __builtins__; __builtins__.env_params = env_params
or
call a function in the gen.py with env_params as a parameter
import gen
gen.do(env_p
Peter Hansen wrote:
>> Most prominent change is that it doesn't inherit from str/unicode
>> anymore.
>> I found this distinction important, because as a str subclass the Path
>> object
>> has many methods that don't make sense for it.
>
> On this topic, has anyone ask the original author (Jason
TPJ napisał(a):
> In the nearest future I will have to decide what to use: PyGTK or
> wxPython. I like those both APIs. wxPython has more widgets, but PyGTK
> seems to be faster. I can use them both for free (it's very important).
> My only concern is that although I'm doing development on Linux,
I'm very new to Python, but
I think it's really ':' and ':' side-by-side with no values, not a single
"::".
In V2.3 and higher, slicing supports an optional third index which works as
a step, e.g.,
X[2:9:2]
fetches every other item in indexes 2-8. The useage you cite is really
defaultin
Reinhold Birkenfeld wrote:
> Andrew Dalke wrote:
>
>>I disagree. I've tried using a class which wasn't derived from
>>a basestring and kept running into places where it didn't work well.
>>For example, "open" and "mkdir" take strings as input. There is no
>>automatic coercion.
>
> Well, as a Pa
Thanks,
I will analyse these 4 options and select the most suitable
since there are other issues involved too, like
"the "main.py" reads contents of a file to a list that gets
passed to the "gen.py" with dictionary "env_params"".
I try to avoid parsing the contents of the file both
in "main.py" an
Hi !
I am a Tablet-PC's user. I am a Python programmer. I am happy, with this
combo.
For use Tablet's extensions, I use Internet-Explorer, drived by Python (via
.HTA). Your problem is not Python, but, perhaps, Mozilla ?
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinf
If you are using Unix, and all you have is the file object, you can use
os.fchmod(outfile.fileno(), 0700)
Jeff
pgp8U05e26RUt.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Pranav Bagora wrote:
> Hello ,
> i am trying to change mode of files using the
> os.chmod()function. But i am getting an error
>
> " os.chmod(outfile,0700)
> TypeError: coercing to Unicode: need string or buffer,
> file found"
Looks as if your are using a file object (that you got from an open()
Hello ,
i am trying to change mode of files using the
os.chmod()function. But i am getting an error
" os.chmod(outfile,0700)
TypeError: coercing to Unicode: need string or buffer,
file found"
Please Help,
Pranav
__
Do You Yahoo!?
Tired of spam?
Andrew Dalke wrote:
> Duncan Booth wrote:
>> Personally I think the concept of a specific path type is a good one, but
>> subclassing string just cries out to me as the wrong thing to do.
>
> I disagree. I've tried using a class which wasn't derived from
> a basestring and kept running into plac
in fact, see this thread, it may have something useful for you:
http://mail.python.org/pipermail/python-win32/2003-April/000959.html
Jeff
pgprYPOH3yOyI.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
> When files are opened through a "path" object -- e.g.
> path('name').open() -- then file.name returns the path object that was
> used to open it.
Also works if you use file(path('name')) or open(path('name')).
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo
Francois De Serres <[EMAIL PROTECTED]> writes:
> hiho,
>
> what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D)
> to the string 'spam'?
.>>> t = (0x73, 0x70, 0x61, 0x6D)
.>>> ''.join('%c' % c for c in t)
'spam'
--
"Es gelten die Regeln der christlichen Seefahrt: Rot und Grün mar
import os
os.system(r"net use z: \\computer\folder")
Something in the win32net module of win32all may be relevant if you
don't want to do it through os.system:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/win32net__NetUseAdd_meth.html
Jeff
pgp7mEoPdAfNP.pgp
Description: P
Scott David Daniels wrote:
> Duncan Booth wrote:
>
>> BTW, does it matter at all in practical use that the base class of
>> path varies between str and unicode depending on the platform?
>
> Isn't it even worse than this?
> On Win2K & XP, don't the file systems have something to do with the
> en
Hi there,
I have two scripts. The first "main.py" sets some variables
and then imports another called "gen.py". The idea is to
provide "main.py" that defines some paths, variables etc.
without using Windows environment variables. Various other "hackers"
will make additional Python scripts (subrout
In DOS, if I want to map a network path to a drive, I do the following:
net use z: \\computer\folder
How do we do something similar in python?
Thanks
Thierry
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 22 Jul 2005 10:56:22 -0500,
David Durkee <[EMAIL PROTECTED]> wrote:
> I didn't get much from the discussion of Command Substitution. Any tips
> on how to do that?
I don't use tcsh, so there may be some subtleties I don't get, but it's
going to look something like this:
c
"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> on 22.07.2005 00:21 Michael Hoffman said the following:
>>> Any Java hackers here want to tell us of the wonders of the Java Path
>>> class?
> Ah, here it is:
>
> http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.
Rob Cowie wrote:
> So to be clear, if a .py module is in the same directory as my python
> cgi script, I can import it thus 'import XXX.py'?
Not quite. If you had a XXX.py, XXX.pyc, and/or XXX.pyo in the same
directory as your Python cgi script, you'd import it by issuing:
import XXX
--
Paul
Hi,
2005/7/22, Michael Hoffman <[EMAIL PROTECTED]>:
> What is this Java Path class? I have been STFWing and have found nothing
> on it in the. Indeed if you search for "Java Path class" (with quotes)
> almost half of the pages are this message from Guido. ;)
>
> Any Java hackers here want to tell
Reinhold Birkenfeld wrote:
> FYI: I modified the path module a bit so that it fits many of the suggestions
> from python-dev, and put the result in the Python CVS tree under
> nondist/sandbox/path.
By the way, thanks for doing this Reinhold!
> Most prominent change is that it doesn't inherit from
Duncan Booth wrote:
> As I said elsewhere I haven't
> used path for anything real, so I'm still finding surprises such as why
> this doesn't do what I expect:
>
p = path('a/b')
q = path('c/d')
p+q
>
> path(u'a/bc/d')
Just a note, though you probably know, that this is intended to b
Stefan Rank wrote:
> (It would be nice to get `path`(s) easily from a `file`, at the moment
> there is only file.name if I'm not mistaken).
When files are opened through a "path" object -- e.g.
path('name').open() -- then file.name returns the path object that was
used to open it.
-Peter
--
Duncan Booth wrote:
> BTW, does it matter at all in practical use that the base class of path
> varies between str and unicode depending on the platform?
I haven't seen any problem. I confess I can't even imagine exactly what
the problem might be, since they're both subclasses of basestring,
a
On Fri, Jul 22, 2005 at 07:40:00PM +0200, Ximo wrote:
> Can I do a function which don't return anything?
>
> The question is that, if I do a function that have a return or without
> return, it returns always "None", but i want that it doesnt return me
> nothing
Define nothing :)
None is the repr
On 2005-07-22, Roy Smith <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>, Ximo <[EMAIL PROTECTED]> wrote:
>>Can I do a function which don't return anything?
>>
>>The question is that, if I do a function that have a return or without
>>return, it returns always "None", but i want that i
André wrote:
> I'm considering buying a Tablet PC and read somewhere (sorry, can't
> point to a link) that someone had tried running a "standard" Python
> program (wxMozilla demo I *think*, but can't be sure) that simply
> crashed.
>
> Any happy Tablet PC user/Python programmer combo? If so, any
linuxfreak <[EMAIL PROTECTED]> wrote:
>
> Sybren Stuvel wrote:
>> linuxfreak enlightened us with:
>> > Turns out that libstdc++.so.5 is needed but I checked and i see
>> > that libstdc++.so.6 is installed on my system.
>>
>> On my system (Ubuntu, based on Debian), I can have multiple versions
>> o
"Daniel Dittmar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Duncan Booth wrote:
>> I would have expected a
>> path object to be a sequence of path elements rather than a sequence of
>> characters.
Glad I'm not the only oddball.
> Maybe it's nitpicking, but I don't think tha
In article <[EMAIL PROTECTED]>, Ximo <[EMAIL PROTECTED]> wrote:
>Can I do a function which don't return anything?
>
>The question is that, if I do a function that have a return or without
>return, it returns always "None", but i want that it doesnt return me
>nothing
What do you mean by "don't r
"Chirayu Krishnappa" <[EMAIL PROTECTED]> writes:
> Hi,
>
> I need to scan documents with pages having printed matter on both
> sides. It is easiest to stack them in the autosheet feeder and let it
> scan. I end up with one file (say A.pdf) containing the odd pages in
> sequence. Similarly, I can e
Andrew Dalke said unto the world upon 2005-07-22 13:30:
> François Pinard wrote:
>
>>There is no strong reason to use one and avoid the other. Yet, while
>>representing strings, Python itself has a _preference_ for single
>>quotes.
>
>
> I use "double quoted strings" in almost all cases becaus
Ximo wrote:
> Can I do a function which don't return anything?
>
> The question is that, if I do a function that have a return or without
> return, it returns always "None", but i want that it doesnt return me
> nothing
Nothing is None, or isnt?
You probably print the function, what you neednt
[Disclaimer: I'm a python newbie.]
I'm using rcslib.py to massage an RCS repo. The code uses a
"name_rev" object which acts two ways:
1. if it's a string, represents the head version of the file
2. if a tuple (name, rev) represents a name and a revision
Works fine if I use it like:
checkout(
Thanks,
I have run through the tutorial - very good. One day, I'd like to try
and organise a similar tutorial involving CGI programming. There are
several very basic examples, but they leave plenty of unanswered
questions such as how to best structure a cgi app, apache permissions,
etc
So to be c
HI guys,
I am trying to automate some project work which the accounting dept
of the company uses. They have to go through multiple steps to achieve
the final goal. Is there some way that I can use python to automate
these manual steps. I can give you an example.
1. run the crystal report using s
Ximo wrote:
> Can I do a function which don't return anything?
>
> The question is that, if I do a function that have a return or without
> return, it returns always "None", but i want that it doesnt return me
> nothing
When you execute the statement
a = myfunction()
What do you want to be in
Joshua Ginsberg wrote:
> >>> dir(ifs)
> ['__doc__', '__init__', '__iter__', '__module__', '__repr__', 'close',
> 'fileno', 'fp', 'geturl', 'headers', 'info', 'next', 'read',
> 'readline', 'readlines', 'url']
>
> Yep. But what about in my code? I modify my code to print dir(ifs)
> before cr
Can I do a function which don't return anything?
The question is that, if I do a function that have a return or without
return, it returns always "None", but i want that it doesnt return me
nothing
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
François Pinard wrote:
> There is no strong reason to use one and avoid the other. Yet, while
> representing strings, Python itself has a _preference_ for single
> quotes.
I use "double quoted strings" in almost all cases because I
think it's easier to see than 'single quoted quotes'.
[EMAIL PROTECTED]
> I am seeing negative latencies of up to 1 second. I am using ntp to
> synchronize both machines at an interval of 2 seconds, so the clocks
> should be very much in sync (and are from what I have observed). I
> agree that it is probably OS, perhaps I should hop over to a Micro
John Roth wrote:
> However, a path as a sequence of characters has even less
> meaning - I can't think of a use, while I have an application
> where traversing a path as a sequence of path elements makes
> perfect sense: I need to descend the directory structure, directory
> by directory, looking
Duncan Booth wrote:
> BTW, does it matter at all in practical use that the base class of path
> varies between str and unicode depending on the platform?
Isn't it even worse than this?
On Win2K & XP, don't the file systems have something to do with the
encoding? So D: (a FAT drive) might natural
George Sakkis wrote:
> You're right, conceptually a path
> HAS_A string description, not IS_A string, so from a pure OO point of
> view, it should not inherit string.
How did you decide it's "has-a" vs. "is-a"?
All C calls use a "char *" for filenames and paths,
meaning the C model file for the f
http://docs.python.org/lib/module-htmlentitydefs.html
--
http://mail.python.org/mailman/listinfo/python-list
Hi Sandeep,
i didn't see where you said if these hosts you want to ping are on your
internal network, or beyond your gateway. Probably the only truly
reliable way to maintain an active hosts list is to install a
ping-sending client on them, like
http://aspn.activestate.com/ASPN/Cookbook/Python/R
"Alberto Vera" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I have two versions of Python. They were intalled in two different
>folders. (python22 and python23)
>I have an old py that works in an older version.
I presume you mean older than 2.2
> How can I change my old py to
Duncan Booth wrote:
> Personally I think the concept of a specific path type is a good one, but
> subclassing string just cries out to me as the wrong thing to do.
I disagree. I've tried using a class which wasn't derived from
a basestring and kept running into places where it didn't work well.
Michael Hoffman wrote:
> Here's some code I just wrote seconds ago to construct a path for a
> scp upload:
>
> """
> DST_DIRPATH = path("host:~/destination")
> RSS_EXT = "rss"
>
> dst_filenamebase = os.extsep.join([postcode.lower(), RSS_EXT])
> dst_filepath = DST_DIRPATH.joinpath(dst_filenamebas
Hi,
I need to scan documents with pages having printed matter on both
sides. It is easiest to stack them in the autosheet feeder and let it
scan. I end up with one file (say A.pdf) containing the odd pages in
sequence. Similarly, I can end up with B.pdf containing the even pages.
I want to combine
"Daniel Dittmar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Duncan Booth wrote:
>> I would have expected a path object to be a sequence of path elements
>> rather than a sequence of characters.
>
> Maybe it's nitpicking, but I don't think that a path object should be a
> 'seq
I'm considering buying a Tablet PC and read somewhere (sorry, can't
point to a link) that someone had tried running a "standard" Python
program (wxMozilla demo I *think*, but can't be sure) that simply
crashed.
Any happy Tablet PC user/Python programmer combo? If so, any word of
advice, suggestio
Francois De Serres wrote:
> hiho,
>
> what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D) to
> the string 'spam'?
Use ''.join and chr() as others have pointed out. Here are just-for-fun
versions ;)
.>>> t = (0x73, 0x70, 0x61, 0x6D)
(use string formatter):
.>>> '%c%c%c%c' % t
"Duncan Booth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> John Roth wrote:
>> You have to start somewhere. One of the lessons that's beginning
>> to seep into people's minds is that getting something that works
>> out there is almost always preferable to (over) design by commi
1 - 100 of 255 matches
Mail list logo