On Jul 17, 8:47 am, Xah Lee wrote:
> 2011-07-16
>
> folks, this one will be interesting one.
>
> the problem is to write a script that can check a dir of text files
> (and all subdirs) and reports if a file has any mismatched matching
> brackets.
>
> • The files will be utf-8 encoded (unix style l
On 19 juil, 21:09, Terry Reedy wrote:
> On 7/19/2011 2:12 PM, Xah Lee wrote:
>
> >> Also, you may have answered this earlier but I'll ask again anyways: You
> >> ask for the first mismatched pair, Are you referring to the inner most
> >> mismatched, or the outermost? For example, suppose you have
On 18.07.2011 16:39, Xah Lee wrote:
On Jul 17, 12:47 am, Xah Lee wrote:
2011-07-16
folks, this one will be interesting one.
the problem is to write a script that can check a dir of text files
(and all subdirs) and reports if a file has any mismatched matching
brackets.
…
Ok, here's my solu
Terry Reedy, 19.07.2011 18:31:
Chapter 5 is mostly about the behavior of built-in class instances. For
some classes, like range, instances only come from class calls and the
behavior of instances is intimately tied to the constructor arguments.
Having the constructor described in C.5 might be use
> 1. In this dict, if there is a UNIQUE max value, then its *key* is the
> winner.
> 2. If there are any TIES for max value, then the *key* 'b' is the
> winner by default.
This will store the max value(s) in a list. In case of a tie, you can
take the first value in the list, but it may be differe
On Jul 19, 11:17 pm, CM wrote:
> I have three items in a dict, like this:
>
> the_dict = {'a':1, 'b':2, 'c':3}
>
> but the vals could be anything. I want to configure something else
> based on the "winner" of such a dict, with these rules:
>
> 1. In this dict, if there is a UNIQUE max value, that
On Tue, Jul 19, 2011 at 8:17 PM, CM wrote:
> I have three items in a dict, like this:
>
> the_dict = {'a':1, 'b':2, 'c':3}
>
> but the vals could be anything. I want to configure something else
> based on the "winner" of such a dict, with these rules:
>
> 1. In this dict, if there is a UNIQUE max
On Wed, 20 Jul 2011 12:12 pm sturlamolden wrote:
> What is wrong with them:
[...]
> 4. They might look bad (Tkinter, Swing with Jython).
Have you tried Tkinter version 8.0 or better, which offers a native look and
feel?
> 5. All projects to write a Python GUI toolkit die before they are
> finis
On Wed, 20 Jul 2011 01:17 pm CM wrote:
> I have three items in a dict, like this:
>
> the_dict = {'a':1, 'b':2, 'c':3}
>
> but the vals could be anything. I want to configure something else
> based on the "winner" of such a dict, with these rules:
>
> 1. In this dict, if there is a UNIQUE max
I have three items in a dict, like this:
the_dict = {'a':1, 'b':2, 'c':3}
but the vals could be anything. I want to configure something else
based on the "winner" of such a dict, with these rules:
1. In this dict, if there is a UNIQUE max value, that's the winner.
2. If there are any TIES for m
On Jul 19, 9:19 pm, Aaron Staley wrote:
> However, if interpreter 1 overfills the FIFO, we get an error (EAGAIN)>>>
> f.write('a'*7)
>
> IOError: [Errno 11] Resource temporarily unavailable
>
> However interpreter 2 still receives data>> len(f.read())
>
> 65536
>
> It looks like interpreter 1
OK, I'll bite...
On 7/19/11 10:12 PM, sturlamolden wrote:
1. Designed for other languages, particularly C++, tcl and Java.
So? Doing a GUI toolkit is a hard project.
2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python
has a standard library!)
Again, so? This isn't appl
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
There's PyGUI, which, at a glance, fits whit what you want. Looks like
it uses OpenGL and native GUI facilities.
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
It has quite a few external dependencies, though (different dependencies
for
On 7/19/2011 10:12 PM, sturlamolden wrote:
What is wrong with them:
1. Designed for other languages, particularly C++, tcl and Java.
2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python
has a standard library!)
3. Unpythonic memory management: Python references to deleted C++
On 7/19/2011 6:02 PM, EricC wrote:
Hi,
I am a newbie - I have been teaching myself Python 3 since a few
months ago. My “self assignments” include some purely for fun. Among
them was using the turtle module to have multiple turtles running
around on the screen.
Recently one such fun turtle “proj
In article
<40996f2a-4ed8-4388-ae1a-6f81f57a4...@f17g2000prf.googlegroups.com>,
Aaron Staley wrote:
> Scenario. I have a fifo named 'fifo' on my computer (ubuntu linux)
> operating in nonblocking mode for both read and write. Under normal
> operation all is good:
>
> Interpreter 1 (writer)
>
What is wrong with them:
1. Designed for other languages, particularly C++, tcl and Java.
2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python
has a standard library!)
3. Unpythonic memory management: Python references to deleted C++
objects (PyQt). Manual dialog destruction (w
Scenario. I have a fifo named 'fifo' on my computer (ubuntu linux)
operating in nonblocking mode for both read and write. Under normal
operation all is good:
Interpreter 1 (writer)
>>> import os
>>> fd = os.open('fifo', os.O_WRONLY | os.O_NONBLOCK)
>>> f = os.fdopen(fd,'wb')
>>> f.write('k')
>>>
"J.O. Aho" wrote:
> Read the EULA that comes with Microsoft Visual C++ Redistributable Package.
Chaz wrote:
> PLEASE RESPOND WITH AN ANSWER NEXT TIME
READ THE EULA THAT COMES WITH THE MICROSOFT VISUAL C++ REDISTRIBUTABLE PACKAGE.
I hope that helps.
Ross
On Jun 27, 1:29 pm, "J.O. Aho" wrote:
> miamia wrote:
> > hello,
>
> > I find out that my program needs
> > Microsoft.VC90.CRT.manifest,msvcm90.dll,msvcp90.dll,msvcr90.dll files
> > when I want to run it on win 64bit systems. I find these files in
> > some other software.
> > Can I simply take it
Hi,
I am a newbie - I have been teaching myself Python 3 since a few
months ago. My “self assignments” include some purely for fun. Among
them was using the turtle module to have multiple turtles running
around on the screen.
Recently one such fun turtle “project” showed strange behavior that I
c
On Jul 19, 8:55 pm, Terry Reedy wrote:
> On 7/19/2011 6:41 AM, Morten Klim wrote:
>
>
>
>
>
>
>
>
>
> > Hello everyone!
> > I've started developing a little application for one of my friends,
> > which he will use at work to measure his hours working + the time he
> > has breaks. I wanna do this i
Well that's exactly the problem. My attempt to make this work, made
the counter go crazy and didn't care if it was paused or not. So for
this for work properly, remove following:
def _updatepause(self):
self._elapsedpause = time.time() - self._pausestart
self._setTime(self._elapsedp
Ah, never mind. I found "cookielib.debug = True", which told me
exactly what I needed to know. I did indeed have a hostname problem.
--
http://mail.python.org/mailman/listinfo/python-list
On 7/19/2011 1:00 PM, Micah wrote:
That sounds artificially backwards; why not let getToken() reuse peekToken()?
def peek(self):
if self.tok is None:
try:
self.tok = self.gen.next()
If this is changed (as intended for the iteration protocol) to
self.tok
In article
Chris Angelico wrote:
>I agree that [C's ++ operators are] often confusing (i+j) ...
For what it is worth, this has to be written as:
i++ + ++j /* or i+++ ++j */
or similar (e.g., newline after the middle "+" operator) as the
lexer will group adjacent "++" characters into a
On 7/19/2011 2:12 PM, Xah Lee wrote:
Also, you may have answered this earlier but I'll ask again anyways: You
ask for the first mismatched pair, Are you referring to the inner most
mismatched, or the outermost? For example, suppose you have this file:
foo[(])bar
Would the "(" be the first mis
I've got a unit test suite which instantiates an HTTP client to test
our server. We depend on session cookies. To handle this, I've got:
def setUp(self):
self.cj = cookielib.CookieJar()
self.opener =
urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cj))
This works fine
Chess Club wrote:
Hello,
I used sys.path.append() to add to the path directory, but the changes
made are not saved when I exit the compiler. Is there a way to save
it?
Do you mean saved as in your PATH environment variable is now changed?
This would be bad. Not sure about *nix, but on M$ Win
On 7/19/2011 6:41 AM, Morten Klim wrote:
Hello everyone!
I've started developing a little application for one of my friends,
which he will use at work to measure his hours working + the time he
has breaks. I wanna do this in python cause, I just started with this
language and wanna get more fimil
On 2011-07-19, Matty Sarro wrote:
> Hey everyone. I am currently reading through an RFC, and it mentions
> that a client and server half of a transaction are embodied by finite
> state machines. I am reading through the wikipedia article for finite
> state machines, and sadly it's going a bit abov
On 07/19/2011 02:24 PM, Chess Club wrote:
Hello,
I used sys.path.append() to add to the path directory, but the changes
made are not saved when I exit the compiler. Is there a way to save
it?
Thank you.
Since python is running in a child process, it only affects its own
environment variables
Hello,
I used sys.path.append() to add to the path directory, but the changes
made are not saved when I exit the compiler. Is there a way to save
it?
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Oh, by the way:
On 19/07/11 19:49, Xah Lee wrote:
> I ran the program, all cpu went max
Mission accomplished.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 19, 10:33 am, Billy Mays
<81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> wrote:
> On 07/19/2011 01:14 PM,XahLee wrote:
>
> > I added other unicode brackets to your list of brackets, but it seems
> > your code still fail to catch a file that has mismatched curly quotes.
> > (e.
On 19/07/11 19:49, Xah Lee wrote:
> On Jul 17, 8:31 am, Thomas Jollans wrote:
>>
>> I thought I'd have some fun with multi-processing:
>>
>> https://gist.github.com/1087682
>
> hi Thomas. I ran the program, all cpu went max (i have a quad), but
> after i think 3 minutes nothing happens, so i kill
On Tue, Jul 19, 2011 at 10:54 AM, Xah Lee wrote:
> On Sunday, July 17, 2011 2:48:42 AM UTC-7, Raymond Hettinger wrote:
>> On Jul 17, 12:47 am, Xah Lee wrote:
>> > i hope you'll participate. Just post solution here. Thanks.
>>
>> http://pastebin.com/7hU20NNL
>
> just installed py3.
> there seems t
On 19/07/11 18:54, Xah Lee wrote:
> On Sunday, July 17, 2011 2:48:42 AM UTC-7, Raymond Hettinger wrote:
>> On Jul 17, 12:47 am, Xah Lee wrote:
>>> i hope you'll participate. Just post solution here. Thanks.
>>
>> http://pastebin.com/7hU20NNL
>
> just installed py3.
> there seems to be a bug.
> in
On 7/19/2011 2:15 AM, Thomas 'PointedEars' Lahn wrote:
Steven D'Aprano wrote:
Nulpum wrote:
I want to make sure that folder exists.
'2011-07-03' is really exists. but 'os.path.isdir' say false
Does anyone know why?
Yes.
print "logs/2011-07-03"
logs/2011-07-03
print "logs\2011-07-03"
l
On Jul 17, 8:31 am, Thomas Jollans wrote:
> On Jul 17, 9:47 am,XahLee wrote:
>
>
>
>
>
>
>
>
>
> > 2011-07-16
>
> > folks, this one will be interesting one.
>
> > the problem is to write a script that can check a dir of text files
> > (and all subdirs) and reports if a file has any mismatched mat
On 7/19/2011 9:32 AM, Matty Sarro wrote:
Hey everyone. I am currently reading through an RFC, and it mentions
that a client and server half of a transaction are embodied by finite
state machines. I am reading through the wikipedia article for finite
That was going to be my first suggestion, but
On 07/19/2011 01:14 PM, Xah Lee wrote:
I added other unicode brackets to your list of brackets, but it seems
your code still fail to catch a file that has mismatched curly quotes.
(e.g.http://xahlee.org/p/time_machine/tm-ch04.html )
LOL Billy.
Xah
I suspect its due to the file mode being o
On Jul 18, 2:59 pm, Thomas 'PointedEars' Lahn
wrote:
> Ian Kelly wrote:
> > Billy Mays wrote:
> >> I gave it a shot. It doesn't do any of the Unicode delims, because let's
> >> face it, Unicode is for goobers.
>
> > Uh, okay...
>
> > Your script also misses the requirement of outputting the inde
On Tue, Jul 19, 2011 at 7:20 AM, J wrote:
> Hi guys,
>
> Thank you for your suggestions. I have managed to get my whole script to
> execute in under 10 seconds by changing the 'for loop' I posted above to the
> following:-
>
> for opco in Cn:
> for service in Cn[opco]:
> a
On 07/19/2011 01:02 PM, Terry Reedy wrote:
You did not answer Ben's question about the allowed values of self.tok
and whether you really want to clobber all 'false' values. The proper
code depends on that answer.
NULL is an enumerated value I have defined above. The idea is for
peekToken to re
On Tue, Jul 19, 2011 at 10:58 AM, Thomas Jollans wrote:
> No, it's not an improvement. It's an illustration.
I get that. The difference I pointed out between your
"simplification" and the other Thomas's is the reason why yours would
be unpythonic whilst his is fine.
--
http://mail.python.org/ma
On Jul 18, 10:12 am, Billy Mays
<81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> wrote:
> On 07/17/2011 03:47 AM,XahLee wrote:
>
> > 2011-07-16
>
> I gave it a shot. It doesn't do any of the Unicode delims, because
> let's face it, Unicode is for goobers.
>
> import sys, os
>
> pair
On 07/19/2011 01:00 PM, Micah wrote:
That sounds artificially backwards; why not let getToken() reuse peekToken()?
def peek(self):
if self.tok is None:
try:
self.tok = self.gen.next()
except StopIteration:
self.tok = NULL
return self.tok
def
On Sunday, July 17, 2011 2:48:42 AM UTC-7, Raymond Hettinger wrote:
> On Jul 17, 12:47 am, Xah Lee wrote:
> > i hope you'll participate. Just post solution here. Thanks.
>
> http://pastebin.com/7hU20NNL
just installed py3.
there seems to be a bug.
in this file
http://xahlee.org/p/time_machine/tm
That sounds artificially backwards; why not let getToken() reuse peekToken()?
def peek(self):
if self.tok is None:
try:
self.tok = self.gen.next()
except StopIteration:
self.tok = NULL
return self.tok
def pop(self):
token = self.peek()
self.
On 7/19/2011 9:52 AM, Billy Mays wrote:
On 07/19/2011 09:43 AM, Ben Finney wrote:
Billy Mays
<81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> writes:
I have a method getToken() which checks to see if a value is set, and
if so, return it. However, it doesn't feel pythonic to me:
On 19/07/11 18:49, Ian Kelly wrote:
> On Tue, Jul 19, 2011 at 12:22 AM, Thomas Jollans wrote:
>>> Supplemental: The above can be simplified to
>>>
>>> def makeadder(y): return lambda x: x + y
>>>
>>
>> In turn:
>>
>> makeadder = lambda y: lambda x: x + y
>
> That's not an improvement. lambda is
On 7/19/2011 6:07 AM, Dave Angel wrote:
On 01/-10/-28163 02:59 PM, Thomas 'PointedEars' Lahn wrote:
Dave Angel wrote:
On 01/-10/-28163 02:59 PM, Terry Reedy wrote:
def makeadder(y)
def _add(x): return x+y
add2 = makeadder(2)
A couple of typos in that code:
def makeaddr(y):
def _add(x): ret
On Tue, Jul 19, 2011 at 12:22 AM, Thomas Jollans wrote:
>> Supplemental: The above can be simplified to
>>
>> def makeadder(y): return lambda x: x + y
>>
>
> In turn:
>
> makeadder = lambda y: lambda x: x + y
That's not an improvement. lambda is for making anonymous functions.
If you're going to
On 7/19/2011 5:47 AM, Peter Irbizon wrote:
Hello, please I have problem with "The following modules appear to be
missing" message during compiling my app exe file with py2exe. What
should I do with this? Many thanks in advance.
From the stuff below, you appear to be compiling for Windows.
The
On 7/19/2011 2:52 AM, Raymond Hettinger wrote:
On Jul 14, 6:21 pm, Inside wrote:
As telling in the subject,because "list" and "tuple" aren't
functions,they are types.Is that right?
They are not instances of a class whose definition name includes the
word 'Function'. They *are* things that ca
You might wanna have a look at theory of computation.
http://www.youtube.com/user/Coderisland#g/c/601FC994BDD963E4
in this lecture series you will have an explanation for FSM from the ground
up
-AB
On Tue, Jul 19, 2011 at 7:02 PM, Matty Sarro wrote:
> Hey everyone. I am currently reading throug
Hi guys,
Thank you for your suggestions. I have managed to get my whole script to
execute in under 10 seconds by changing the 'for loop' I posted above to the
following:-
for opco in Cn:
for service in Cn[opco]:
ack = set(Cn[opco][service]['RECV']) & set(Pr['13'])
On 2011-07-19, Nulpum wrote:
> I want to make sure that folder exists.
>
> '2011-07-03' is really exists. but 'os.path.isdir' say false
>
> Does anyone know why?
>
>
>
os.path.isdir("C:\Users\??\Desktop\logs")
> True
os.path.isdir("C:\Users\??\Desktop\logs\2011-07-03")
> False
Y
Steven D'Aprano wrote:
Thomas Jollans wrote:
The "correct" solution in many cases is to not assume any particular
path separator at all, and use os.path.join when dealing with paths.
This will work even on systems that do not accept forward slashes as
path separators. (does Python still support
markolopa wrote:
> I would like to find a good system to keep track of my household
> finance. Do Python programmers have suggestions on that? Do you use
> Python to help on this task?
libreOffice doesn't do it?
--
http://mail.python.org/mailman/listinfo/python-list
On 07/19/2011 09:43 AM, Ben Finney wrote:
Billy Mays
<81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> writes:
I have a method getToken() which checks to see if a value is set, and
if so, return it. However, it doesn't feel pythonic to me:
Clearly that's because the function nam
Billy Mays
<81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> writes:
> I have a method getToken() which checks to see if a value is set, and
> if so, return it. However, it doesn't feel pythonic to me:
Clearly that's because the function name is not Pythonic :-)
I'll assume the name
On Tue, Jul 19, 2011 at 11:32 PM, Matty Sarro wrote:
> Hey everyone. I am currently reading through an RFC, and it mentions
> that a client and server half of a transaction are embodied by finite
> state machines. I am reading through the wikipedia article for finite
> state machines, and sadly it
I don't know if this is better (or more "pythonic"), but it works for me on
python 2.7.
>>> class MyKlass(object):
... def __init__(self, tok):
... self.tok = tok
... def gettoken(self):
... t, self.tok = self.tok or None, None
... return t
On Tue, Jul 19, 2011 at
Hey everyone. I am currently reading through an RFC, and it mentions
that a client and server half of a transaction are embodied by finite
state machines. I am reading through the wikipedia article for finite
state machines, and sadly it's going a bit above my head. I don't
really have a background
I have a method getToken() which checks to see if a value is set, and if
so, return it. However, it doesn't feel pythonic to me:
def getToken(self):
if self.tok:
t = self.tok
self.tok = None
return t
# ...
Is there a way to trim the 'if' block to reset self.tok
On Jul 19, 1:13 pm, Noon Silk wrote:
> On Tue, Jul 19, 2011 at 7:47 PM, Peter Irbizon wrote:
> > Hello, please I have problem with "The following modules appear to be
> > missing" message during compiling my app exe file with py2exe. What should I
> > do with this? Many thanks in advance.
>
> > T
On 01/-10/-28163 02:59 PM, J wrote:
Hello,
I am looking to improve the performance of the following piece of Python code:-
for cc in StatusContainer:
for srv in StatusContainer[cc]:
for id in StatusContainer[cc][srv]['RECV']:
if id in StageContain
On 07/19/2011 04:36 AM, J wrote:
Someone in a different forum suggested that I use 'binary
search' to iterate through the dictionaries
I'm not sure what they were smoking...a binary search is useful
for finding a thing in a sorted list. It looks like your data is
not sorted (strike #1) and i
On Tue, Jul 19, 2011 at 7:47 PM, Peter Irbizon wrote:
> Hello, please I have problem with "The following modules appear to be
> missing" message during compiling my app exe file with py2exe. What should I
> do with this? Many thanks in advance.
>
> The following modules appear to be missing
>
> [.
J wrote:
> I am looking to improve the performance of the following piece of Python
> code:-
>
> for cc in StatusContainer:
> for srv in StatusContainer[cc]:
> for id in StatusContainer[cc][srv]['RECV']:
> if id in StageContainer['13']:
> StatusContainer[c
Hello everyone!
I've started developing a little application for one of my friends,
which he will use at work to measure his hours working + the time he
has breaks. I wanna do this in python cause, I just started with this
language and wanna get more fimiliar with it. Sometimes though, it's a
bit o
On 01/-10/-28163 02:59 PM, Thomas 'PointedEars' Lahn wrote:
Dave Angel wrote:
On 01/-10/-28163 02:59 PM, Terry Reedy wrote:
def makeadder(y)
def _add(x): return x+y
add2 = makeadder(2)
A couple of typos in that code:
def makeaddr(y):
def _add(x): return x+y
return _add
I a
Hello, please I have problem with "The following modules appear to be
missing" message during compiling my app exe file with py2exe. What
should I do with this? Many thanks in advance.
The following modules appear to be missing
['Carbon', 'Carbon.Files', '_scproxy', 'fixedpoint', 'gdk', 'mx',
'un
Hello, please I have problem with "The following modules appear to be
missing" message during compiling my app exe file with py2exe. What should I
do with this? Many thanks in advance.
The following modules appear to be missing
['Carbon', 'Carbon.Files', '_scproxy', 'fixedpoint', 'gdk', 'mx', 'un
Hello,
I am looking to improve the performance of the following piece of Python code:-
for cc in StatusContainer:
for srv in StatusContainer[cc]:
for id in StatusContainer[cc][srv]['RECV']:
if id in StageContainer['13']:
Thanks for the suggestions. Felt the thread could be of help on
consolidating the solution.
*Max Value from a csv column:*
import numpy
data1 = numpy.genfromtxt("data.csv",dtype='float',delimiter =
',',skiprows=1, skip_header=0, skip_footer=0,
usecols=11,usemask=True)
#pri
Hmm, might have been helpful to include docs for these new bits:
On 19/07/2011 09:36, Chris Withers wrote:
- Implement the ability to mock out dict and list
items using testfixtures.Replacer and
testfixtures.replace.
- Implement the ability to remove attributes and dict
items using testfixtures
On Jul 18, 7:07 pm, Billy Mays wrote:
> On 7/18/2011 7:56 PM, Steven D'Aprano wrote:
>
>
>
>
>
>
>
>
>
> > Billy Mays wrote:
>
> >> On 07/17/2011 03:47 AM, Xah Lee wrote:
> >>> 2011-07-16
>
> >> I gave it a shot. It doesn't do any of the Unicode delims, because
> >> let's face it, Unicode is for
FOR GOOD JOBS SITES TO YOU
http://goodjobssites.blogspot.com/
FOR HOT PHOTO&VIDEOS
KATRINA KAIF RARE PHOTOS
http://southactresstou.blogspot.com/2011/07/katrina-kaif-wallpapers.html
Hi All,
I'm happy to announce a new release of TestFixtures with the following
changes:
- Removed the dependency on zope.dottedname.
- Implement the ability to mock out dict and list
items using testfixtures.Replacer and
testfixtures.replace.
- Implement the ability to remove attributes
On 7월19일, 오후3시15분, Thomas 'PointedEars' Lahn
wrote:
> Steven D'Aprano wrote:
> > Nulpum wrote:
> >> I want to make sure that folder exists.
>
> >> '2011-07-03' is really exists. but 'os.path.isdir' say false
>
> >> Does anyone know why?
>
> > Yes.
>
> print "logs/2011-07-03"
> > logs/2011-07-
On Tue, Jul 19, 2011 at 11:52 AM, Thomas Jollans wrote:
> On 19/07/11 00:33, Thomas 'PointedEars' Lahn wrote:
> > Thomas 'PointedEars' Lahn wrote:
> >
> >> Dave Angel wrote:
> >>> On 01/-10/-28163 02:59 PM, Terry Reedy wrote:
> def makeadder(y)
> def _add(x): return x+y
> add2
Thomas Jollans wrote:
> On 19/07/11 06:42, Steven D'Aprano wrote:
>> (1) Escape every backslash with an extra backslash:
>>
> print "logs\\2011-07-03"
>> logs\2011-07-03
>
> There is a more elegant solution: use raw strings: r'c:\foo\bar'
Well, perhaps, but not all paths can be written as
On Jul 19, 1:42 pm, Steven D'Aprano wrote:
> Nulpum wrote:
> > I want to make sure that folder exists.
>
> > '2011-07-03' is really exists. but 'os.path.isdir' say false
>
> > Does anyone know why?
>
> Yes.
>
> >>> print "logs/2011-07-03"
> logs/2011-07-03
> >>> print "logs\2011-07-03"
>
> logs 1-
On Jul 14, 6:21 pm, Inside wrote:
> As telling in the subject,because "list" and "tuple" aren't functions,they
> are types.Is that right?
list() and tuple() are in the right place in the documentation because
they would be harder to find if listed elsewhere. Tools like str(),
int(), list(), tu
87 matches
Mail list logo