In article <[EMAIL PROTECTED]>,
Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
>
>Have those old style classes any benefits?
Yes, if you want your code to run on Python 2.1 and earlier.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
"LL YR VWL R BLNG T S" -- www.nanc
Steve Holden wrote:
> Ilias Lazaridis wrote:
>> Steve Holden wrote:
...
>>> Though of course the easiest way to enforce your classes to new style is
>>> to begin each module with
>>>
>>> __metaclass__ = type
>>
>> I assume placing this in the central site import (e.g.
>> sitecustomize.py) would col
Ilias Lazaridis wrote:
> Steve Holden wrote:
>
>>Paul Boddie wrote:
>>
>>>Ilias Lazaridis wrote:
>>
>>[...]
>>
Have those old style classes any benefits?
>>>
>>>
>>>That you don't have to write the bizarre conceptual accident that is
>>>"(object)" when declaring a "top-level" class?
>>>
>>
>>T
Paul Boddie wrote:
> Ilias Lazaridis wrote:
... (helpful comments)
> > Have those old style classes any benefits?
>
> That you don't have to write the bizarre conceptual accident that is
> "(object)" when declaring a "top-level" class?
This was most possibly done for back-compatibility reasons.
Steve Holden wrote:
> Paul Boddie wrote:
> > Ilias Lazaridis wrote:
> [...]
> >>Have those old style classes any benefits?
> >
> >
> > That you don't have to write the bizarre conceptual accident that is
> > "(object)" when declaring a "top-level" class?
> >
> Though of course the easiest way to en
Steve Holden wrote:
> Michele Simionato wrote:
> > (I don't believe I am responding to a notorious troll ...)
> >
> Believe it. You are. Ain't life a bitch? :-)
>
> > One (bad) solution is to write in your sitecustomize.py the following:
> >
> > $ echo /usr/lib/python/sitecustomize.py
> > import __
Paul Boddie wrote:
> Ilias Lazaridis wrote:
[...]
>>Have those old style classes any benefits?
>
>
> That you don't have to write the bizarre conceptual accident that is
> "(object)" when declaring a "top-level" class?
>
Though of course the easiest way to enforce your classes to new style is
t
Ilias Lazaridis wrote:
> Fredrik Lundh wrote:
> > Ilias Lazaridis wrote:
> >
> >> note: I am aware about search engines.
> >
> > but you're incapable of using them, or ?
Well, "Python new-style old-style classes" in Google gives a range of
discussions, but an old version of the definitive guide [1
Ilias Lazaridis wrote:
> Fredrik Lundh wrote:
>
>>Ilias Lazaridis wrote:
>>
>>
>>>note: I am aware about search engines.
>>
>>but you're incapable of using them, or ?
>
>
> -
>
>
>>>I ask for documentation which other developers have found useful
>>
>>most recent Python books contains good dis
Fredrik Lundh wrote:
> Ilias Lazaridis wrote:
>
>> note: I am aware about search engines.
>
> but you're incapable of using them, or ?
-
>> I ask for documentation which other developers have found useful
>
> most recent Python books contains good discussions of the things you're
> asking for.
Ben Finney wrote:
> "Ilias Lazaridis" <[EMAIL PROTECTED]> writes:
>
>> Where can I find _compact_ documentation about
>
> Can you tell us what is lacking about the documentation at
> http://www.python.org/doc/> ? Specifically, what problems have
> you found in understanding these topics from the
"Ilias Lazaridis" <[EMAIL PROTECTED]> writes:
> Where can I find _compact_ documentation about
Can you tell us what is lacking about the documentation at
http://www.python.org/doc/> ? Specifically, what problems have
you found in understanding these topics from the documentation
available at that
Ilias Lazaridis wrote:
> note: I am aware about search engines.
but you're incapable of using them, or ?
> I ask for documentation which other developers have found useful
most recent Python books contains good discussions of the things you're
asking for. maybe you should buy a book ?
--
George Sakkis wrote:
> Ilias Lazaridis wrote:
>
> > I like to add a method "writeDebug(self, msg)" to all (or the most
> > possible) classes in the system.
> >
> > How do I do this?
> >
> > * with new style classes
> > * with old style classes
>
> Short answer: you can't do it for builtin or extens
Michele Simionato wrote:
> (I don't believe I am responding to a notorious troll ...)
>
Believe it. You are. Ain't life a bitch? :-)
> One (bad) solution is to write in your sitecustomize.py the following:
>
> $ echo /usr/lib/python/sitecustomize.py
> import __builtin__
>
> class Object(object)
(I don't believe I am responding to a notorious troll ...)
One (bad) solution is to write in your sitecustomize.py the following:
$ echo /usr/lib/python/sitecustomize.py
import __builtin__
class Object(object):
def debug(self):
print 'some debug info'
__builtin__.object = Object
th
MonkeeSage wrote:
> Ilias Lazaridis wrote:
>> no, I don't know it.
>
> OK...so how do you evaluate a language when you don't know its basic
> operations? Hmmm, sounds fishy.
The learning-process is an important part of the evaluation.
>> how do I define something into the top-level namespace? I
Ilias Lazaridis wrote:
> no, I don't know it.
OK...so how do you evaluate a language when you don't know its basic
operations? Hmmm, sounds fishy.
> how do I define something into the top-level namespace? I assume I
> could place it into the root-package of my project, into the __init__
> functio
MonkeeSage wrote:
> Ilias Lazaridis wrote:
> > where do I place this function...
>
> The place where you want it to be.
>
> > ...thus it becomes available within class "Foo" and all other Classes?
>
> Anything defined in the top-level (i.e., the sys.modules['__main__']
> namespace) is accessible in
Ilias Lazaridis wrote:
> I like to add a method "writeDebug(self, msg)" to all (or the most
> possible) classes in the system.
>
> How do I do this?
>
> * with new style classes
> * with old style classes
Short answer: you can't do it for builtin or extension types:
>>> list.writeDebug = lambda m
Ilias Lazaridis wrote:
> MonkeeSage wrote:
>
>>Ilias Lazaridis wrote:
>>
>>>How do I do this?
>>
>>It's easy:
>>
>>def writeDebug(msg):
>> print "I do not debug things, I _evaluate_ with professionals on the
>>industries! See ticket 547!\n" \
>>"Oh yeah, and %s" % msg
>
>
> where do I p
Ilias Lazaridis wrote:
> where do I place this function...
The place where you want it to be.
> ...thus it becomes available within class "Foo" and all other Classes?
Anything defined in the top-level (i.e., the sys.modules['__main__']
namespace) is accessible in every scope...but I assume you a
MonkeeSage wrote:
> Ilias Lazaridis wrote:
> > How do I do this?
>
> It's easy:
>
> def writeDebug(msg):
> print "I do not debug things, I _evaluate_ with professionals on the
> industries! See ticket 547!\n" \
> "Oh yeah, and %s" % msg
where do I place this function...
> ...
> class F
Diez B. Roggisch wrote:
> Ilias Lazaridis wrote:
> > Ilias Lazaridis wrote:
> >> I understand that I can use __metaclass__ to create a class which
> >> modifies the behaviour of another class.
> >>
> >> How can I add this metaclass to *all* classes in the system?
> >>
> >> (In ruby I would alter th
Ilias Lazaridis wrote:
> How do I do this?
It's easy:
def writeDebug(msg):
print "I do not debug things, I _evaluate_ with professionals on the
industries! See ticket 547!\n" \
"Oh yeah, and %s" % msg
...
class Foo:
writeDebug("how can I configure the interpreter for understand
Klingo
Ilias Lazaridis wrote:
> Ilias Lazaridis wrote:
>> I understand that I can use __metaclass__ to create a class which
>> modifies the behaviour of another class.
>>
>> How can I add this metaclass to *all* classes in the system?
>>
>> (In ruby I would alter the "Class" class)
>
> I got confused fr
Ilias Lazaridis wrote:
> I understand that I can use __metaclass__ to create a class which
> modifies the behaviour of another class.
>
> How can I add this metaclass to *all* classes in the system?
>
> (In ruby I would alter the "Class" class)
I got confused from the discussion about __metaclass_
Diez B. Roggisch wrote:
>>>
>>> I think '__metaclass__ = whatever' affects only the creation of
>>> classes that
>>> would otherwise be old-style classes?
>>
>> Wrong.
>>
>> If you set __metaclass__ = type, every class in that module will be
>> new-style.
>>
>> If you set __metaclass__ = MyCla
>>> __metaclass__ = whatever
>>>
>>> at the top of each module whose classes are to get the new behavior.
>>
>> I think '__metaclass__ = whatever' affects only the creation of classes
>> that would otherwise be old-style classes?
>
> Wrong.
>
> If you set __metaclass__ = type, every class in th
>>
>> I think '__metaclass__ = whatever' affects only the creation of
>> classes that
>> would otherwise be old-style classes?
>
> Wrong.
>
> If you set __metaclass__ = type, every class in that module will be
> new-style.
>
> If you set __metaclass__ = MyClass, and MyClass inherits from , eve
Damjan wrote:
>>> I understand that I can use __metaclass__ to create a class which
>>> modifies the behaviour of another class.
>>>
>>> How can I add this metaclass to *all* classes in the system?
>>>
>>> (In ruby I would alter the "Class" class)
>>
>> You'd have to set
>>
>> __metaclass__ = w
Calvin Spealman wrote:
> On 18 Sep 2006 20:23:03 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
> > Steve Holden wrote:
> > > Ilias Lazaridis wrote:
> > ...
> > > > http://www-128.ibm.com/developerworks/linux/library/l-pymeta.html
> > > >
> > > > I am not so much interested in old-style, as is s
On 18 Sep 2006 20:23:03 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
> > Ilias Lazaridis wrote:
> ...
> > > http://www-128.ibm.com/developerworks/linux/library/l-pymeta.html
> > >
> > > I am not so much interested in old-style, as is start production with
> > > python 2.4
Steve Holden wrote:
> Ilias Lazaridis wrote:
...
> > http://www-128.ibm.com/developerworks/linux/library/l-pymeta.html
> >
> > I am not so much interested in old-style, as is start production with
> > python 2.4 (possibly even with python 2.5).
> >
>
> The fact remains that you won't be able to aff
"Calvin Spealman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 17 Sep 2006 09:22:16 -0700, Ilias Lazaridis <[EMAIL PROTECTED]>
> wrote:
>> I understand that I can use __metaclass__ to create a class which
>> modifies the behaviour of another class.
>>
>> How can I add this met
Ilias Lazaridis wrote:
> Damjan wrote:
>
I understand that I can use __metaclass__ to create a class which
modifies the behaviour of another class.
How can I add this metaclass to *all* classes in the system?
(In ruby I would alter the "Class" class)
>>>
>>>You'd have to
Damjan wrote:
> >> I understand that I can use __metaclass__ to create a class which
> >> modifies the behaviour of another class.
> >>
> >> How can I add this metaclass to *all* classes in the system?
> >>
> >> (In ruby I would alter the "Class" class)
> >
> > You'd have to set
> >
> > __metaclass
>> I understand that I can use __metaclass__ to create a class which
>> modifies the behaviour of another class.
>>
>> How can I add this metaclass to *all* classes in the system?
>>
>> (In ruby I would alter the "Class" class)
>
> You'd have to set
>
> __metaclass__ = whatever
>
> at the top
Ilias Lazaridis wrote:
> I understand that I can use __metaclass__ to create a class which
> modifies the behaviour of another class.
>
> How can I add this metaclass to *all* classes in the system?
>
> (In ruby I would alter the "Class" class)
You'd have to set
__metaclass__ = whatever
at the
On 17 Sep 2006 09:22:16 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
> I understand that I can use __metaclass__ to create a class which
> modifies the behaviour of another class.
>
> How can I add this metaclass to *all* classes in the system?
>
> (In ruby I would alter the "Class" class)
Th
Steve Holden wrote:
> Simon Forman wrote:
> > Fredrik Lundh wrote:
> >>Simon Forman wrote:
> >>
> >>>I'm sorry, your post makes very little sense.
> >>
> >>you're somewhat new here, right ? ;-)
> >>
> >
> > Yah, I've been posting here about three months now. Why, did I miss
> > something? :-)
>
Steve Holden wrote:
>> I am not a (python) domain expert.
>>
>> Thus I am asking here for available standard-solutions, before I
>> implement an own solution.
>>
> There is no standard solution for the problem you mention.
Because it's not a problem for most people ;)
Georg
--
http://mail.pyt
Steve Holden wrote:
> lazaridis_com wrote:
> > Georg Brandl wrote:
> >>lazaridis_com wrote:
> >>>Georg Brandl wrote:
> lazaridis_com wrote:
>
> >I would like to fulfill the following task:
> >
> >The construct:
> >
> >if __name__ == '__main__':
> >
> >should be
Simon Forman wrote:
> Fredrik Lundh wrote:
>
>>Simon Forman wrote:
>>
>>
>>>I'm sorry, your post makes very little sense.
>>
>>you're somewhat new here, right ? ;-)
>>
>>
>
>
>
> Yah, I've been posting here about three months now. Why, did I miss
> something? :-)
>
Yes: the previous posts f
Fredrik Lundh wrote:
> Simon Forman wrote:
>
> > I'm sorry, your post makes very little sense.
>
> you're somewhat new here, right ? ;-)
>
>
Yah, I've been posting here about three months now. Why, did I miss
something? :-)
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-li
lazaridis_com wrote:
> Georg Brandl wrote:
>
>>lazaridis_com wrote:
>>
>>>Georg Brandl wrote:
>>>
lazaridis_com wrote:
>I would like to fulfill the following task:
>
>The construct:
>
>if __name__ == '__main__':
>
>should be changed to something like:
>
>>>
Georg Brandl wrote:
> lazaridis_com wrote:
> > Georg Brandl wrote:
> >> lazaridis_com wrote:
> >> > I would like to fulfill the following task:
> >> >
> >> > The construct:
> >> >
> >> > if __name__ == '__main__':
> >> >
> >> > should be changed to something like:
> >> >
> >> > if identifier.name =
lazaridis_com wrote:
> Georg Brandl wrote:
>> lazaridis_com wrote:
>> > I would like to fulfill the following task:
>> >
>> > The construct:
>> >
>> > if __name__ == '__main__':
>> >
>> > should be changed to something like:
>> >
>> > if identifier.name == '__main__':
>> >
>> > The term "identifier
Simon Forman wrote:
> lazaridis_com wrote:
> > I would like to fulfill the following task:
> >
> > The construct:
> >
> > if __name__ == '__main__':
> >
> > should be changed to something like:
> >
> > if identifier.name == '__main__':
...
> > Context:
> > http://case.lazaridis.com/wiki/Lang
> >
lazaridis_com wrote:
> lazaridis_com wrote:
> > I would like to change the construct:
> >
> > if __name__ == '__main__':
> ...
>
> Is there a standard way / naming to wrap "__name__" and other similar
> attributes to an encapsulating class?
...
see follow-up thread:
http://groups.google.com/group
Georg Brandl wrote:
> lazaridis_com wrote:
> > I would like to fulfill the following task:
> >
> > The construct:
> >
> > if __name__ == '__main__':
> >
> > should be changed to something like:
> >
> > if identifier.name == '__main__':
> >
> > The term "identifier" should be selected based on the m
Simon Forman wrote:
> I'm sorry, your post makes very little sense.
you're somewhat new here, right ? ;-)
--
http://mail.python.org/mailman/listinfo/python-list
lazaridis_com wrote:
> I would like to fulfill the following task:
>
> The construct:
>
> if __name__ == '__main__':
>
> should be changed to something like:
>
> if identifier.name == '__main__':
>
> The term "identifier" should be selected based on the meaning of the
> __double-underscore-enc
lazaridis_com wrote:
> I would like to fulfill the following task:
>
> The construct:
>
> if __name__ == '__main__':
>
> should be changed to something like:
>
> if identifier.name == '__main__':
>
> The term "identifier" should be selected based on the meaning of the
> __double-underscore-enclosur
Larry Bates wrote:
> 1) Don't call a class instance exec, it will mask the built-in
> exec statement.
"exec" is a reserved word, and cannot be masked:
>>> exec = 10
File "", line 1
exec = 10
^
SyntaxError: invalid syntax
--
http://mail.python.org/mailman/listinfo/python-li
lazaridis_com wrote:
> I would like to change the construct:
>
> if __name__ == '__main__':
...
Is there a standard way / naming to wrap "__name__" and other similar
attributes to an encapsulating class?
Something like e.g.:
if mod.name ...
or
if gbl.name ...
-
"gbl.newAttribute = value" wo
Larry Bates wrote:
> lazaridis_com wrote:
> > I would like to change the construct:
> >
> > if __name__ == '__main__':
> >
> > to something like:
> >
> > if exec.isMain():
> >
> > My (OO thought) is to place a class in an separate code module and to
> > instantiate an singleton instance which would
Duncan Booth wrote:
> lazaridis_com wrote:
>
> > Are ther alternative constructs/mechanism available, which could be
> > used to add this functionality possiby directly to a code-module?
>
> How about something along these lines:
>
> -- auto.py -
> import sys, atexit
>
> de
Fuzzyman wrote:
> lazaridis_com wrote:
> > I would like to change the construct:
> >
> > if __name__ == '__main__':
> >
> > to something like:
> >
> > if exec.isMain():
> >
> > My (OO thought) is to place a class in an separate code module and to
> > instantiate an singleton instance which would ke
Georg Brandl wrote:
> Larry Bates wrote:
>> lazaridis_com wrote:
>>> I would like to change the construct:
>>>
>>> if __name__ == '__main__':
>>>
>>> to something like:
>>>
>>> if exec.isMain():
>>>
>>> My (OO thought) is to place a class in an separate code module and to
>>> instantiate an singlet
Larry Bates wrote:
> lazaridis_com wrote:
>> I would like to change the construct:
>>
>> if __name__ == '__main__':
>>
>> to something like:
>>
>> if exec.isMain():
>>
>> My (OO thought) is to place a class in an separate code module and to
>> instantiate an singleton instance which would keep
lazaridis_com wrote:
> I would like to change the construct:
>
> if __name__ == '__main__':
>
> to something like:
>
> if exec.isMain():
>
> My (OO thought) is to place a class in an separate code module and to
> instantiate an singleton instance which would keep th something like
> this:
>
>
lazaridis_com wrote:
> Are ther alternative constructs/mechanism available, which could be
> used to add this functionality possiby directly to a code-module?
How about something along these lines:
-- auto.py -
import sys, atexit
def main_body(f):
if f.func_globals['
lazaridis_com wrote:
> I would like to change the construct:
>
> if __name__ == '__main__':
>
> to something like:
>
> if exec.isMain():
>
> My (OO thought) is to place a class in an separate code module and to
> instantiate an singleton instance which would keep th something like
> this:
>
> clas
Maric Michaud wrote:
> Le Vendredi 09 Juin 2006 20:06, Ilias Lazaridis a écrit :
>> the code below works, but has the limitation that I cannot import the
>> syncdb_hook within "django.core.management".
>
> In [4]: from b import CONS
>
> In [5]: import b
>
> In [6]: b.CONS = 3
>
> In [7]: CONS
>
Le Vendredi 09 Juin 2006 20:06, Ilias Lazaridis a écrit :
> the code below works, but has the limitation that I cannot import the
> syncdb_hook within "django.core.management".
In [4]: from b import CONS
In [5]: import b
In [6]: b.CONS = 3
In [7]: CONS
Out[7]: 5
In [8]: from b import CONS
In
Slawomir Nowaczyk wrote:
> On Thu, 08 Jun 2006 15:28:39 +0300
> Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
>
> #> *IMPORT*
> #>
> #> I would like to know, if this construct is valid, or if it can
> #> result in problems (that I do not see as a newcomer):
>
> The intricacies of import are far bey
Duncan Booth wrote:
> Ilias Lazaridis wrote:
>
>>> #patch_service.py
>>> from toto import service
>>>
>>> def my_impl(self, *args) :
>>> old_result = self._old_method(*args)
>>> # ...
>>> return new_result
>>>
>>> if not hasattr(service, '_old_method') :
>>> service._old_method
Ilias Lazaridis wrote:
>> #patch_service.py
>> from toto import service
>>
>> def my_impl(self, *args) :
>> old_result = self._old_method(*args)
>> # ...
>> return new_result
>>
>> if not hasattr(service, '_old_method') :
>> service._old_method = service.method
>> servic
Maric Michaud wrote:
> Le Jeudi 08 Juin 2006 14:28, Ilias Lazaridis a écrit :
>> Another possibility is to enlink (hook?) the functionality into an
>> existent function
>>
>> Is there any way (beside a patch) to alter the behaviour to an existing
>> function. Is ther a python construct similar to t
On Thu, 08 Jun 2006 15:28:39 +0300
Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
#> *IMPORT*
#>
#> I would like to know, if this construct is valid, or if it can
#> result in problems (that I do not see as a newcomer):
The intricacies of import are far beyond me, but FWIW I do not see
anything wron
On Thu, 08 Jun 2006 06:05:35 -0700
"Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote:
#> Since your question is so much about Django, you might want to ask
#> on Django groups.
Now *that*, and the rest of your post, was uncalled for.
This thread is perfectly on topic for this list and the questio
Duncan Booth wrote:
> Ilias Lazaridis wrote:
>
>> I would like to know, if this construct is valid, or if it can result in
>> problems (that I do not see as a newcomer):
>>
>> 1082try:
>> 1083from django.rework.evolve import evolvedb
>> 1084except ImportError:
>>
Maric Michaud wrote:
> Le Jeudi 08 Juin 2006 15:15, Duncan Booth a écrit :
>> but the more usual way is just to call the original method directly in the
>> base class.
>>
>> class SqliteAdapter(BaseClass):
>> def create_table(self, *args)
>> self.table_evolve(*args)
>> result =
Tim N. van der Leeuw wrote:
[...]
http://case.lazaridis.com/wiki/Please
.
--
http://lazaridis.com
--
http://mail.python.org/mailman/listinfo/python-list
Le Jeudi 08 Juin 2006 15:15, Duncan Booth a écrit :
> but the more usual way is just to call the original method directly in the
> base class.
>
> class SqliteAdapter(BaseClass):
> def create_table(self, *args)
> self.table_evolve(*args)
> result = BaseClass.create_table(self, *
Since your question is so much about Django, you might want to ask on
Django groups.
Oops, you're not welcome there anymore, almost forgot.
But if merely reading the subject of a posting I already know who's the
poster, it's perhaps a bad sign.
Further readers of this thread might be interested
Le Jeudi 08 Juin 2006 14:28, Ilias Lazaridis a écrit :
> Another possibility is to enlink (hook?) the functionality into an
> existent function
>
> Is there any way (beside a patch) to alter the behaviour to an existing
> function. Is ther a python construct similar to the "alias_method" of Ruby:
>
Ilias Lazaridis wrote:
> Is there any way (beside a patch) to alter the behaviour to an
> existing function. Is ther a python construct similar to the
> "alias_method" of Ruby:
This is a Python list. Would you care to explain what alias_method does?
>
> (example from an simple evolution suppor
Ilias Lazaridis wrote:
> I would like to know, if this construct is valid, or if it can result in
> problems (that I do not see as a newcomer):
>
> 1082try:
> 1083from django.rework.evolve import evolvedb
> 1084except ImportError:
> 1085def evolved
Peter Hansen wrote:
> Benji York wrote:
>
>> It's not join that's getting you, it's the non-raw string
>> representation in path_to_scan. Use either 'd:\test_images' or
>> 'd:\\test_images' instead.
>
> Benji, you're confusing things: you probably meant r'd:\test_images'
> in the above
Doh! I
"Thomas W" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I got a stupid problem; on my WinXP-box I want to scan the filesystem
> and enter a path to scan like this :
>
> path_to_scan = 'd:\test_images'
I believe you can always use / instead of \ for Win filenames from Python.
Av
Benji York wrote:
> It's not join that's getting you, it's the non-raw string representation
> in path_to_scan. Use either 'd:\test_images' or 'd:\\test_images' instead.
Benji, you're confusing things: you probably meant r'd:\test_images' in
the above, but in any case I think Robert Kern's on t
Thomas W wrote:
> I got a stupid problem; on my WinXP-box I want to scan the filesystem
> and enter a path to scan like this :
>
> path_to_scan = 'd:\test_images'
path_to_scan = r'd:\test_images'
> This is used in a larger context and joined like
>
> real_path_after_scanning = os.path.join(pat
Thomas W wrote:
> I got a stupid problem; on my WinXP-box I want to scan the filesystem
> and enter a path to scan like this :
>
> path_to_scan = 'd:\test_images'
Note the lack of an "r" prefix and the \t sequence above.
> The problem is that some of the parts being joined contains escape
> c
85 matches
Mail list logo