On Sun, Nov 23, 2014 at 6:43 PM, Ben Finney wrote:
> For a data stream format (like WAV and other mature formats), a module
> working well today is likely to work just as well for the same purpose
> in several years's time, long enough for today's Python to go through
> its full life cycle
Chris Angelico writes:
> Just out of curiosity, why does the stdlib need modules for
> manipulating .wav and other sound files, but we have to go to PyPI to
> get a PostgreSQL client? It's a queer world...
I would venture the follow two reasons, either of which is sufficient to
explain the diffe
On Sun, Nov 23, 2014 at 5:30 PM, Steven D'Aprano
wrote:
>> wave: Not in the stdlib, though I'd avoid the name anyway.
>
> Incorrect. The wave module is for manipulating .wav files.
>
> > sndheader: Not in the stdlib - probably on PyPI though
>
> Correct. It is actually spelled "sndhdr".
Just out
On Sun, Nov 23, 2014 at 5:30 PM, Steven D'Aprano
wrote:
> Chris Angelico wrote:
>
>> Okay, here's my guesses.
>>
>> os2emxpath: In the stdlib, but more often accessed as "os.path" while
>> running under OS/2
>
> Correct.
I'm in a special position here, as I actually have an OS/2 system, and
have
On Saturday, November 22, 2014 10:32:30 PM UTC-8, Chris Angelico wrote:
> On Sun, Nov 23, 2014 at 5:08 PM, llanitedave wrote:
> > The application was working "correctly" earlier (meaning that I could enter
> > and retrieve data with it; being a strictly user application it didn't
> > allow delete
On Sunday, November 23, 2014 12:00:15 PM UTC+5:30, Steven D'Aprano wrote:
> Rick should ask himself why virtually every single language, from compiled
> languages like Ada, C, Pascal and Java, to interpreted languages like bash,
> all use search paths instead of explicit paths.
>
> Hint: the answe
On Sun, Nov 23, 2014, at 00:59, Steven D'Aprano wrote:
> >> It works fine now (Python 3.3).
> >>
> >> py> L = []
> >> py> t = (L, None)
> >> py> L.append(L)
> >> py> L.append(t) # For good measure.
> >> py> print(t)
> >> ([[...], (...)], None)
> >
> > This is a tuple in a list in a tuple, not
On Sun, Nov 23, 2014 at 5:17 PM, Steven D'Aprano
wrote:
> If Python treated the character set as an implementation detail, the
> programmer would have no way of knowing whether
>
> s = u"ö"
>
> is legal or not, since you cannot know whether or not ö is a supported
> character in the running Python
Chris Angelico wrote:
> On Sat, Nov 22, 2014 at 11:25 PM, Steven D'Aprano
> wrote:
>> Ian Kelly wrote:
>>
>> - It's hard to keep track of what modules are in the standard library.
>> Which of the following is *not* in Python 3.3's std lib? No cheating by
>> looking them up.)
>>
>> os2emxpath,
On Sun, Nov 23, 2014 at 5:08 PM, llanitedave
wrote:
> The application was working "correctly" earlier (meaning that I could enter
> and retrieve data with it; being a strictly user application it didn't allow
> deletes from the GUI), and then I discovered (while cleaning up the user
> documenta
random...@fastmail.us wrote:
> On Fri, Nov 21, 2014, at 23:38, Steven D'Aprano wrote:
>> I really don't understand what bothers you about this. In Python, we have
>> Unicode strings and byte strings. In computing in general, strings can
>> consist of Unicode characters, ASCII characters, Tron char
On Saturday, November 22, 2014 9:41:55 PM UTC-8, Chris Angelico wrote:
> On Sun, Nov 23, 2014 at 3:58 PM, Michael Torrie wrote:
> > On 11/22/2014 08:54 PM, llanitedave wrote:
> > Well that DID make a difference! I used the %r marker, and the logger
> > line gave me back:
> >> "INFO:Related borehol
On Sun, Nov 23, 2014 at 3:15 PM, Seymore4Head
wrote:
> Traceback (most recent call last):
> File "C:\Documents and Settings\Administrator\Desktop\rps.py", line
> 7, in
> a=RPS()
> File "C:\Documents and Settings\Administrator\Desktop\rps.py", line
> 6, in __init__
> self.key=key[self.
Ethan Furman wrote:
> On 11/21/2014 08:43 PM, Steven D'Aprano wrote:
>> random...@fastmail.us wrote:
>>>
>>> I think I tried on at least one python version and printing the tuple
>>> crashed with a recursion depth error, since it had no special protection
>>> for this case the way list printing d
On Sun, Nov 23, 2014 at 3:58 PM, Michael Torrie wrote:
> On 11/22/2014 08:54 PM, llanitedave wrote:
> Well that DID make a difference! I used the %r marker, and the logger
> line gave me back:
>> "INFO:Related borehole_id is u'testbh3', of_borehole is 'testbh3'"
>>
>> So it looks like I need to c
On 11/22/2014 08:54 PM, llanitedave wrote:
Well that DID make a difference! I used the %r marker, and the logger
line gave me back:
> "INFO:Related borehole_id is u'testbh3', of_borehole is 'testbh3'"
>
> So it looks like I need to change my foreign key string to a unicode
> string. I'll be work
On Sat, 22 Nov 2014 19:55:08 -0800 (PST), Rustom Mody
wrote:
>On Sunday, November 23, 2014 9:06:03 AM UTC+5:30, Seymore4Head wrote:
>> Now I am trying to add a dictionary, but it is broke too.
>>
>> How do I fix:
>> class RPS:
>> key={0:"rock", 1:"paper",2:"scissors"};
>> def __init__(se
On Sat, 22 Nov 2014 22:52:33 -0500, Joel Goldstick
wrote:
>On Sat, Nov 22, 2014 at 10:35 PM, Seymore4Head
> wrote:
>> On Sat, 22 Nov 2014 22:14:21 -0500, Ned Batchelder
>> wrote:
>>
>>>On 11/22/14 9:47 PM, Seymore4Head wrote:
What do I need to do to make a and b have different values?
On Sunday, November 23, 2014 9:06:03 AM UTC+5:30, Seymore4Head wrote:
> Now I am trying to add a dictionary, but it is broke too.
>
> How do I fix:
> class RPS:
> key={0:"rock", 1:"paper",2:"scissors"};
> def __init__(self):
> self.throw=random.randrange(3)
> self.key=key[s
On Saturday, November 22, 2014 6:22:32 PM UTC-8, Chris Angelico wrote:
> On Sun, Nov 23, 2014 at 1:11 PM, llanitedave wrote:
> > logging.info("Related borehole_id is %s, of_borehole is %s", relatedbh,
> > runfields[1])
> >
> > In this case, the displayed data from both is identical -- the logging
On Sat, Nov 22, 2014 at 10:35 PM, Seymore4Head
wrote:
> On Sat, 22 Nov 2014 22:14:21 -0500, Ned Batchelder
> wrote:
>
>>On 11/22/14 9:47 PM, Seymore4Head wrote:
>>> What do I need to do to make a and b have different values?
>>> import random
>>> class RPS:
>>> throw=random.randrange(3)
>>>
On Sat, 22 Nov 2014 22:14:21 -0500, Ned Batchelder
wrote:
>On 11/22/14 9:47 PM, Seymore4Head wrote:
>> What do I need to do to make a and b have different values?
>> import random
>> class RPS:
>> throw=random.randrange(3)
>> a=RPS
>> b=RPS
>
>This simply makes a and b into other names for t
On Sat, 22 Nov 2014 19:09:27 -0800 (PST), Rustom Mody
wrote:
>On Sunday, November 23, 2014 8:17:24 AM UTC+5:30, Seymore4Head wrote:
>> What do I need to do to make a and b have different values?
>> import random
>> class RPS:
>> throw=random.randrange(3)
>> a=RPS
>> b=RPS
>>
>> print ("a ",a
On Sat, 22 Nov 2014 22:08:31 -0500, random...@fastmail.us wrote:
>
>
>On Sat, Nov 22, 2014, at 21:47, Seymore4Head wrote:
>> What do I need to do to make a and b have different values?
>> import random
>> class RPS:
>> throw=random.randrange(3)
>> a=RPS
>> b=RPS
>>
>> print ("a ",a.throw)
>>
On 11/22/14 9:47 PM, Seymore4Head wrote:
What do I need to do to make a and b have different values?
import random
class RPS:
throw=random.randrange(3)
a=RPS
b=RPS
This simply makes a and b into other names for the class RPS. To
instantiate a class to make an object, you have to call it:
On Sat, Nov 22, 2014, at 21:11, Chris Angelico wrote:
> Is that true? Does WriteConsoleW support every Unicode character? It's
> not obvious from the docs whether it uses UCS-2 or UTF-16 (or maybe
> something else).
I was defining "every unicode character" loosely. There are certainly
display prob
On Sunday, November 23, 2014 8:17:24 AM UTC+5:30, Seymore4Head wrote:
> What do I need to do to make a and b have different values?
> import random
> class RPS:
> throw=random.randrange(3)
> a=RPS
> b=RPS
>
> print ("a ",a.throw)
> print ("b ",b.throw)
> if a.throw == b.throw:
> print("Tie
On Sat, Nov 22, 2014, at 21:47, Seymore4Head wrote:
> What do I need to do to make a and b have different values?
> import random
> class RPS:
> throw=random.randrange(3)
> a=RPS
> b=RPS
>
> print ("a ",a.throw)
> print ("b ",b.throw)
> if a.throw == b.throw:
> print("Tie")
> elif (a.thr
What do I need to do to make a and b have different values?
import random
class RPS:
throw=random.randrange(3)
a=RPS
b=RPS
print ("a ",a.throw)
print ("b ",b.throw)
if a.throw == b.throw:
print("Tie")
elif (a.throw - b.throw)%3==1:
print("a Wins")
else:
print("b Wins")
-
On Sun, Nov 23, 2014 at 1:11 PM, llanitedave
wrote:
> logging.info("Related borehole_id is %s, of_borehole is %s", relatedbh,
> runfields[1])
>
> In this case, the displayed data from both is identical -- the logging line
> comes back as:
> INFO:Related borehole_id is testbh3, of_borehole is tes
On Friday, November 21, 2014 2:49:45 AM UTC+5:30, Juan Christian wrote:
> On Thu Nov 20 2014 at 7:07:10 PM Mark Lawrence wrote:
> You also need to study the difference between top posting, interspersed
>
> posting and bottom posting. The second and third are very much the
>
> prefered styles he
I've built a database in SQLite3 to be embedded into a python application using
wxPython 2.8.12 and Python 2.7.6. I'm using Sqliteman to manage the database
directly and make changes to the structure when necessary.
One item that's been bugging me is when I'm inserting records into one
particu
On Sun, Nov 23, 2014 at 12:52 PM, wrote:
> On Sat, Nov 22, 2014, at 18:38, Mark Lawrence wrote:
>> ...
>> That is a standard Windows build. He is again conflating problems with
>> using the Windows command line for a given code page with the FSR.
>
> The thing is, with a truetype font selected, a
On 2014-11-23 12:00, Steven D'Aprano wrote:
> >> > And after all that, it would still fail if you happened to
> >> > want to import both "calendar" modules into the same module.
> >>
> >> __path__ = []
> >> import calendar
> >> __path__ = ['my/python/modules']
> >> import calendar as mycalendar
On Sat, Nov 22, 2014, at 18:38, Mark Lawrence wrote:
> ...
> That is a standard Windows build. He is again conflating problems with
> using the Windows command line for a given code page with the FSR.
The thing is, with a truetype font selected, a correctly written win32
console problem should be
On Fri, Nov 21, 2014, at 23:38, Steven D'Aprano wrote:
> I really don't understand what bothers you about this. In Python, we have
> Unicode strings and byte strings. In computing in general, strings can
> consist of Unicode characters, ASCII characters, Tron characters, EBCDID
> characters, ISO-88
Tim Chase wrote:
> On 2014-11-22 23:25, Steven D'Aprano wrote:
>> > And after all that, it would still fail if you happened to want to
>> > import both "calendar" modules into the same module.
>>
>> __path__ = []
>> import calendar
>> __path__ = ['my/python/modules']
>> import calendar as mycale
On 22/11/2014 22:31, Chris Angelico wrote:
On Sun, Nov 23, 2014 at 9:04 AM, Mark Lawrence wrote:
My favourite "find thousand and one ways to make Python crashing or
failing." but I don't recall a single bug report in the last two years from
anybody regarding problems with the FSR, or have I mis
On Sun, Nov 23, 2014 at 9:04 AM, Mark Lawrence wrote:
> My favourite "find thousand and one ways to make Python crashing or
> failing." but I don't recall a single bug report in the last two years from
> anybody regarding problems with the FSR, or have I missed something?
What you've missed is th
On 22/11/2014 20:17, Chris Angelico wrote:
On Sun, Nov 23, 2014 at 5:17 AM, Mark Lawrence wrote:
Please don't feed him. Your average troll is bad enough but he really takes
the biscuit.
... someone was feeding him biscuits?
ChrisA
Surely it's better than feeding him unicode?
As I needed
On 11/21/2014 2:30 PM, Zachary Ware wrote:
On Fri, Nov 21, 2014 at 12:37 PM, Ian Kelly wrote:
Here's a nice crash. I thought this might similarly produce a
recursion depth error, but no, it's a seg fault!
$ cat test.py
import itertools
l = []
it = itertools.chain.from_iterable(l)
l.append(it)
On 2014-11-22 23:25, Steven D'Aprano wrote:
> Having said that, it's not fair to blame the user for shadowing
> standard library modules:
>
> - All users start off as beginners, who may not be aware that this
> is even a possibility;
While it's one thing to explicitly shadow a module (creating yo
On Sun, Nov 23, 2014 at 5:17 AM, Mark Lawrence wrote:
> Please don't feed him. Your average troll is bad enough but he really takes
> the biscuit.
... someone was feeding him biscuits?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 11/21/2014 08:43 PM, Steven D'Aprano wrote:
> random...@fastmail.us wrote:
>>
>> I think I tried on at least one python version and printing the tuple
>> crashed with a recursion depth error, since it had no special protection
>> for this case the way list printing does.
>
> It works fine now
Am 22.11.14 19:33, schrieb wxjmfa...@gmail.com:
As you are rewriting unicode, a small suggestion/request.
Assume that one processes a part of the Bible in polytonic
Greek, one has to create a ton of temporary (locale) letters,
<°)))o>< αὐτὸν τὸν ἰχθύα
ὁ Χριστιανὸς ἔγραψε τρόλλοι
--
h
On 22/11/2014 17:49, Marko Rauhamaa wrote:
wxjmfa...@gmail.com:
- By chance, I found on the web a German py dev who was commenting and
he had not an updated "DUDEN" (a German dictionnary).
That... leaves me utterly speachless!
Marko
Please don't feed him. Your average troll is bad enoug
wxjmfa...@gmail.com:
> - By chance, I found on the web a German py dev who was commenting and
> he had not an updated "DUDEN" (a German dictionnary).
That... leaves me utterly speachless!
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On 11/22/14, 3:59 AM, wxjmfa...@gmail.com wrote:
TeXLive (since 2014, if I'm not wrong) has a GUI installer
and package manager, I recognized a "tcl/tk/tkinter-like" - Perl
tool and contrary to Python it works.
That's Perl-Tk, which, as I said, is still around, but only runs on
Windows and X11
On Saturday, November 22, 2014 8:14:15 PM UTC+5:30, Roy Smith wrote:
> Marko Rauhamaa wrote:
>
> > Steven D'Aprano:
> >
> > > You haven't given any good reason for objecting to calling Unicode
> > > strings by what they are. Maybe you think that it is an implementation
> > > detail, and that som
Roy Smith :
> For that matter, we will eventually get to the point where when people
> say, "just plain text", they will mean Unicode, in the same way that
> "just plain text" today really means ASCII (and the text/plain MIME
> type will become a historical curiosity).
MIME has:
Content-Type:
In article <87y4r348uf@elektro.pacujo.net>,
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
> > You haven't given any good reason for objecting to calling Unicode
> > strings by what they are. Maybe you think that it is an implementation
> > detail, and that some version of Python might suddenl
Steven D'Aprano :
> You haven't given any good reason for objecting to calling Unicode
> strings by what they are. Maybe you think that it is an implementation
> detail, and that some version of Python might suddenly and without
> warning change to only supporting KOI8-R strings or GB2312 strings?
On Sun, Nov 23, 2014 at 12:50 AM, Steven D'Aprano
wrote:
> "Tire car" makes no sense. "Rectangular door" makes perfect sense, and in a
> world where there are dozens of legacy non-rectangular doors, it would be
> very sensible to specify the kind of door. Just as we specify sliding door,
> glass d
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> In Python, we have Unicode strings and byte strings.
>
> No, you don't. You have strings and bytes:
Python has strings of Unicode code points, a.k.a. "Unicode strings",
or "text strings", and strings of bytes, a.k.a. "byte strings". These are
the p
On Sat, Nov 22, 2014 at 11:25 PM, Steven D'Aprano
wrote:
> Ian Kelly wrote:
>
> - It's hard to keep track of what modules are in the standard library. Which
> of the following is *not* in Python 3.3's std lib? No cheating by looking
> them up.)
>
> os2emxpath, wave, sndheader, statslib, poplis
Ian Kelly wrote:
> On Thu, Nov 20, 2014 at 8:53 PM, Rick Johnson
> wrote:
>> FOR INSTANCE: Let's say i write a module that presents a
>> reusable GUI calendar widget, and then i name the module
>> "calender.py".
>>
>> Then Later, when i try to import *MY* GUI widget named
>> "calendar", i will no
On Fri, Nov 21, 2014 at 6:07 PM, Rick Johnson
wrote:
> On Friday, November 21, 2014 5:59:44 PM UTC-6, Chris Angelico wrote:
>> In other words, what you want is:
>>
>> # today's method, import based on search path
>> import sys
>> # new explicit path method
>> import '/usr/local/lib/python3.5/lib-d
57 matches
Mail list logo