Re: Python Scalability TCP Server + Background Game

2014-01-17 Thread phiwer
> Quick smoke test. How big are your requests/responses? You mention > > REST, which implies they're going to be based on HTTP. I would expect > > you would have some idea of the rough size. Multiply that by 50,000, > > and see whether your connection can handle it. For instance, if you > > hav

Re: numpy.where() and multiple comparisons

2014-01-17 Thread John Ladasky
On Friday, January 17, 2014 6:16:28 PM UTC-8, duncan smith wrote: > >>> a = np.arange(10) > >>> c = np.where((2 < a) & (a < 7)) > >>> c > (array([3, 4, 5, 6]),) Nice! Thanks! Now, why does the multiple comparison fail, if you happen to know? -- https://mail.python.org/mailman/listinfo/pyth

Re: How to write this as a list comprehension?

2014-01-17 Thread Rustom Mody
On Saturday, January 18, 2014 4:49:55 AM UTC+5:30, Piet van Oostrum wrote: > Hi, > I am looking for an elegant way to write the following code as a list > comprehension: > labels = [] > for then, name in mylist: > _, mn, dy, _, _, _, wd, _, _ = localtime(then) > labels.append(somefunc(mn,

Re: Python 3.x adoption

2014-01-17 Thread Roy Smith
In article , Grant Edwards wrote: > On 2014-01-17, Tim Chase wrote: > > On 2014-01-17 15:27, Grant Edwards wrote: > >> > What's wrong?... > >> > >> Python 2.7 still does everything 99% of us need to do, and we're too > >> lazy to switch. > > > > And in most distros, typing "python" invokes 2

Re: numpy.where() and multiple comparisons

2014-01-17 Thread duncan smith
On 18/01/14 01:51, John Ladasky wrote: Hi folks, I am awaiting my approval to join the numpy-discussion mailing list, at scipy.org. I realize that would be the best place to ask my question. However, numpy is so widely used, I figure that someone here would be able to help. I like to use n

numpy.where() and multiple comparisons

2014-01-17 Thread John Ladasky
Hi folks, I am awaiting my approval to join the numpy-discussion mailing list, at scipy.org. I realize that would be the best place to ask my question. However, numpy is so widely used, I figure that someone here would be able to help. I like to use numpy.where() to select parts of arrays.

Re: Python 3.x adoption

2014-01-17 Thread Ben Finney
Ben Finney writes: > Terry Reedy writes: > > > Since 3.0, we have added new syntax ('yield from', u'' for instance) > > but I do not believe we have deleted or changed any syntax (I might > > have forgotten something minor) > > I'm aware of the removal of ‘`foo`’ (use ‘repr(foo)’ instead), and >

Re: Python 3.x adoption

2014-01-17 Thread Ben Finney
Terry Reedy writes: > Since 3.0, we have added new syntax ('yield from', u'' for instance) > but I do not believe we have deleted or changed any syntax (I might > have forgotten something minor) I'm aware of the removal of ‘`foo`’ (use ‘repr(foo)’ instead), and removal of ‘except ExcClass, exc_i

Re: setup.py issue - some files are included as intended, but one is not

2014-01-17 Thread Dan Stromberg
On Wed, Jan 15, 2014 at 7:18 AM, Piet van Oostrum wrote: > Dan Stromberg writes: > >> On Sat, Jan 11, 2014 at 2:04 PM, Dan Stromberg wrote: >>> Hi folks. >>> >>> I have a setup.py problem that's driving me nuts. >> >> Anyone? I've received 0 responses. > > I can't even install your code because

Re: How to write this as a list comprehension?

2014-01-17 Thread Dan Stromberg
On Fri, Jan 17, 2014 at 3:19 PM, Piet van Oostrum wrote: > Hi, > > I am looking for an elegant way to write the following code as a list > comprehension: > > labels = [] > for then, name in mylist: > _, mn, dy, _, _, _, wd, _, _ = localtime(then) > labels.append(somefunc(mn, day, wd, name)

How to write this as a list comprehension?

2014-01-17 Thread Piet van Oostrum
Hi, I am looking for an elegant way to write the following code as a list comprehension: labels = [] for then, name in mylist: _, mn, dy, _, _, _, wd, _, _ = localtime(then) labels.append(somefunc(mn, day, wd, name)) So mylist is a list of tuples, the first member of the tuple is a time

Re: Python 3.x adoption

2014-01-17 Thread Chris Angelico
On Sat, Jan 18, 2014 at 10:12 AM, MRAB wrote: > On 2014-01-17 23:03, Terry Reedy wrote: > [snip] > >> Since 3.0, we have added new syntax ('yield from', u'' for instance) but >> I do not believe we have deleted or changed any syntax (I might have >> forgotten something minor) and I do not know of

Re: Python 3.x adoption

2014-01-17 Thread MRAB
On 2014-01-17 23:03, Terry Reedy wrote: [snip] Since 3.0, we have added new syntax ('yield from', u'' for instance) but I do not believe we have deleted or changed any syntax (I might have forgotten something minor) and I do not know of any proposal to do so (except to re-delete u'', which should

Re: Python 3.x adoption

2014-01-17 Thread Terry Reedy
On 1/17/2014 5:16 PM, beliav...@aol.com wrote: I don't think the Fortran analogy is valid. The appropriate analogy for the changes between Python 2.x and 3.x, which started about 1 and 2 decades after the original Python, are the changes between Fortran IV/66 and Fortran 77, also about 1 and

Re: Python 3.x adoption

2014-01-17 Thread Mark Lawrence
On 17/01/2014 22:16, beliav...@aol.com wrote: On Tuesday, January 14, 2014 2:38:29 PM UTC-5, Skip Montanaro wrote: What's the problem with Python 3.x? It was first released in 2008, but web hosting companies still seem to offer Python 2.x rather. For example, Google App Engine only off

Re: Python 3.x adoption

2014-01-17 Thread beliavsky
On Tuesday, January 14, 2014 2:38:29 PM UTC-5, Skip Montanaro wrote: > > What's the problem with Python 3.x? It was first released in 2008, but > > > web hosting companies still seem to offer Python 2.x rather. > > > > > > For example, Google App Engine only offers Python 2.7. > > > > > > What

Re: Python 3.x adoption

2014-01-17 Thread Terry Reedy
On 1/17/2014 10:27 AM, Grant Edwards wrote: On 2014-01-14, Staszek wrote: What's the problem with Python 3.x? The problem with Python 3.x is Python 2.7. ;) Cute. What's wrong?... Python 2.7 still does everything 99% of us need to do, and we're too lazy to switch. While '99' is rhetor

Re: Is it possible to protect python source code by compiling it to .pyc or .pyo?

2014-01-17 Thread Tim Delaney
On 18 January 2014 08:31, Joshua Landau wrote: > On 17 January 2014 00:58, Sam wrote: > > I would like to protect my python source code. It need not be foolproof > as long as it adds inconvenience to pirates. > > > > Is it possible to protect python source code by compiling it to .pyc or > .pyo?

Re: [newbie] advice and comment wanted on first tkinter program

2014-01-17 Thread Terry Reedy
On 1/17/2014 8:20 AM, Jean Dupont wrote: Dear all, I made a simple gui with tkinter. I can imagine there are things which I did which are "not optimal". So what I ask is to comment on my code preferable with snippets of code which show how to do improve my code. #!/usr/bin/env python import Tkint

Re: Is it possible to protect python source code by compiling it to .pyc or .pyo?

2014-01-17 Thread Joshua Landau
On 17 January 2014 00:58, Sam wrote: > I would like to protect my python source code. It need not be foolproof as > long as it adds inconvenience to pirates. > > Is it possible to protect python source code by compiling it to .pyc or .pyo? > Does .pyo offer better protection? If you're worried

Re: interactive help on the base object

2014-01-17 Thread Terry Reedy
On 1/17/2014 7:25 AM, Jean-Michel Pichavant wrote: '''The default top superclass for all Python classes. http://bugs.python.org/issue20285 The issue is tagged 2.7. Is object the superclass of all classes in 2.7 ? 2.7 should say 'all new-style classes'. Thanks for noticing and reporting.

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Terry Reedy
On 1/17/2014 7:14 AM, Robin Becker wrote: I tried this approach with a few more complicated outcomes and they fail in python2 or 3 depending on how I try to render the result in the doctest. I never got how you are using doctests. There were certainly not meant for heavy-duty unit testing, bu

Re: Building and accessing an array of dictionaries

2014-01-17 Thread Grant Edwards
On 2014-01-16, Mark Lawrence wrote: > On 16/01/2014 09:48, Chris Angelico wrote: >> On Thu, Jan 16, 2014 at 8:41 PM, Sam wrote: >>> I would like to build an array of dictionaries. Most of the dictionary >>> example on the net are for single dictionary. >>> >>> dict = {'a':'a','b':'b','c':'c'} >>

Re: Guessing the encoding from a BOM

2014-01-17 Thread Rotwang
On 17/01/2014 18:43, Tim Chase wrote: On 2014-01-17 09:10, Mark Lawrence wrote: Slight aside, any chance of changing the subject of this thread, or even ending the thread completely? Why? Every time I see it I picture Inspector Clouseau, "A BOM!!!" :) In discussions regarding BOMs, I regular

Re: Compiling main script into .pyc

2014-01-17 Thread Grant Edwards
On 2014-01-17, Steven D'Aprano wrote: > On Thu, 16 Jan 2014 23:43:02 -0500, Dave Angel wrote: > [steve@ando ~]$ cat sample.py > print("Hello!") > > [steve@ando ~]$ ls sample.pyc > ls: sample.pyc: No such file or directory > [steve@ando ~]$ python -m compileall sample.py > Compiling sample.py ...

Re: Python 3.x adoption

2014-01-17 Thread Grant Edwards
On 2014-01-17, Tim Chase wrote: > On 2014-01-17 15:27, Grant Edwards wrote: >> > What's wrong?... >> >> Python 2.7 still does everything 99% of us need to do, and we're too >> lazy to switch. > > And in most distros, typing "python" invokes 2.x, and explicitly > typing "python3" is almost 17% l

Re: Guessing the encoding from a BOM

2014-01-17 Thread Tim Chase
On 2014-01-17 09:10, Mark Lawrence wrote: > Slight aside, any chance of changing the subject of this thread, or > even ending the thread completely? Why? Every time I see it I > picture Inspector Clouseau, "A BOM!!!" :) In discussions regarding BOMs, I regularly get the "All your base" meme from

Re: python2.6 needed as an aptitude package as dependency

2014-01-17 Thread Asaf Las
On Friday, January 17, 2014 4:24:16 PM UTC+2, Jan Hapala wrote: > Hello, > I need to install a program (MACS: http://liulab.dfci.harvard.edu/MACS/) for > which I need to have Python2.6 installed. > I do have two other Pythons installed but not this version. > I will be grateful for your suggestion

Re: Guessing the encoding from a BOM

2014-01-17 Thread Ethan Furman
On 01/17/2014 08:46 AM, Pete Forman wrote: Chris Angelico writes: On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence wrote: Slight aside, any chance of changing the subject of this thread, or even ending the thread completely? Why? Every time I see it I picture Inspector Clouseau, "A BOM!!!" :)

Re: Python glob and raw string

2014-01-17 Thread Mark Lawrence
On 17/01/2014 16:45, Xaxa Urtiz wrote: [masses of double spaced lines snipped] Would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the double line spacing in your posts, thanks. -- My fellow Pythonistas, ask not what our language can do

Re: Templating engines that work very well with Python/Django

2014-01-17 Thread Marc Aymerich
On Fri, Jan 17, 2014 at 6:22 PM, San D wrote: > Can someone suggest a few templating engines that work really well with > Django and help in coding efficiency? > > Where can I fin comparison of tempating engines I can find to know their pros > and cons? I believe the most widely used template e

Re: Graph or Chart Software for Django

2014-01-17 Thread Marc Aymerich
On Fri, Jan 17, 2014 at 6:18 PM, San D wrote: > What is the best Graph or Chart software used with Django (libraries & > products), preferably open source? > > Need something stable and robust, and used by many developers, so active on > community channels. what I use is a JS library called hig

Templating engines that work very well with Python/Django

2014-01-17 Thread San D
Can someone suggest a few templating engines that work really well with Django and help in coding efficiency? Where can I fin comparison of tempating engines I can find to know their pros and cons? Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Graph or Chart Software for Django

2014-01-17 Thread San D
What is the best Graph or Chart software used with Django (libraries & products), preferably open source? Need something stable and robust, and used by many developers, so active on community channels. Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Compiling main script into .pyc

2014-01-17 Thread Alister
On Thu, 16 Jan 2014 17:01:51 -0800, Sam wrote: > One thing I observe about python byte-code compiling is that the main > script does not gets compiled into .pyc. Only imported modules are > compiled into .pyc. > > May I know how can I compile the main script into .pyc? It is to > inconvenience po

Re: Guessing the encoding from a BOM

2014-01-17 Thread Chris Angelico
On Sat, Jan 18, 2014 at 3:30 AM, Rustom Mody wrote: > If you or I break a standard then, well, we broke a standard. > If Microsoft breaks a standard the standard is obliged to change. > > Or as the saying goes, everyone is equal though some are more equal. https://en.wikipedia.org/wiki/800_pound_

Re: Guessing the encoding from a BOM

2014-01-17 Thread Pete Forman
Chris Angelico writes: > On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence > wrote: >> Slight aside, any chance of changing the subject of this thread, or even >> ending the thread completely? Why? Every time I see it I picture Inspector >> Clouseau, "A BOM!!!" :) > > Special delivery, a berm! We

Re: Python glob and raw string

2014-01-17 Thread Xaxa Urtiz
Le jeudi 16 janvier 2014 19:14:30 UTC+1, Neil Cerutti a écrit : > On 2014-01-16, Xaxa Urtiz <> wrote: > > > Hello everybody, i've got a little problem, i've made a script > > > which look after some files in some directory, typically my > > > folder are organized like this : > > > > > > [share

Re: Guessing the encoding from a BOM

2014-01-17 Thread Chris Angelico
On Sat, Jan 18, 2014 at 3:26 AM, Pete Forman wrote: > It would have been nice if there was an eighth encoding scheme defined > there UTF-8NB which would be UTF-8 with BOM not allowed. Or call that one UTF-8, and the one with the marker can be UTF-8-MS-NOTEPAD. ChrisA -- https://mail.python.org/

Re: Guessing the encoding from a BOM

2014-01-17 Thread Rustom Mody
On Friday, January 17, 2014 9:56:28 PM UTC+5:30, Pete Forman wrote: > Rustom Mody writes: > > On Friday, January 17, 2014 7:10:05 AM UTC+5:30, Tim Chase wrote: > >> On 2014-01-17 11:14, Chris Angelico wrote: > >> > UTF-8 specifies the byte order > >> > as part of the protocol, so you don't need t

Re: Guessing the encoding from a BOM

2014-01-17 Thread Pete Forman
Rustom Mody writes: > On Friday, January 17, 2014 7:10:05 AM UTC+5:30, Tim Chase wrote: >> On 2014-01-17 11:14, Chris Angelico wrote: >> > UTF-8 specifies the byte order >> > as part of the protocol, so you don't need to mark it. > >> You don't need to mark it when writing, but some idiots use it

Re: Python 3.x adoption

2014-01-17 Thread Mark Lawrence
On 17/01/2014 16:15, Tim Chase wrote: On 2014-01-17 15:27, Grant Edwards wrote: What's wrong?... Python 2.7 still does everything 99% of us need to do, and we're too lazy to switch. And in most distros, typing "python" invokes 2.x, and explicitly typing "python3" is almost 17% longer. We're

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
On 17/01/2014 15:27, Steven D'Aprano wrote: .. # -*- coding: utf-8 -*- def func(a): """ >>> print(func(u'aaa\u020b')) aaaȋ """ return a There seems to be some mojibake in your post, which confuses issues. You refer to \u020b, which is LATIN SMALL LETTER

Re: Python 3.x adoption

2014-01-17 Thread Tim Chase
On 2014-01-17 15:27, Grant Edwards wrote: > > What's wrong?... > > Python 2.7 still does everything 99% of us need to do, and we're too > lazy to switch. And in most distros, typing "python" invokes 2.x, and explicitly typing "python3" is almost 17% longer. We're a lazy bunch! :-) -tkc --

Re: Python 3.x adoption

2014-01-17 Thread Grant Edwards
On 2014-01-14, Staszek wrote: > What's the problem with Python 3.x? The problem with Python 3.x is Python 2.7. ;) > What's wrong?... Python 2.7 still does everything 99% of us need to do, and we're too lazy to switch. -- Grant Edwards grant.b.edwardsYow! We have DIFFERE

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Steven D'Aprano
On Fri, 17 Jan 2014 12:12:35 +, Robin Becker wrote: > On 17/01/2014 11:41, Steven D'Aprano wrote: >> def func(a): >> """ >> >>> print(func(u'aaa')) >> aaa >> """ >> return a > > I think this approach seems to work if I turn the docstring into unicode > > def func(a):

Re: [newbie] advice and comment wanted on first tkinter program

2014-01-17 Thread Peter Otten
Jean Dupont wrote: > Dear all, > I made a simple gui with tkinter. I can imagine there are things which I > did which are "not optimal". So what I ask is to comment on my code > preferable with snippets of code which show how to do improve my code. > #!/usr/bin/env python > import Tkinter > import

Re: python2.6 needed as an aptitude package as dependency

2014-01-17 Thread Chris Angelico
On Sat, Jan 18, 2014 at 1:24 AM, Jan Hapala wrote: > I need to install a program (MACS: http://liulab.dfci.harvard.edu/MACS/) for > which I need to have Python2.6 installed. > > I do have two other Pythons installed but not this version. Is one of those Pythons a 2.7? If so, MACS will probably r

Re: Python declarative

2014-01-17 Thread sertorbe
El miércoles, 15 de enero de 2014 18:02:08 UTC+1, Sergio Tortosa Benedito escribió: > Hi I'm developing a sort of language extension for writing GUI programs > > called guilang, right now it's written in Lua but I'm considreing Python > > instead (because it's more tailored to alone application

Re: Python declarative

2014-01-17 Thread Francesco Bochicchio
Some time ago I played with Tkinter trying a more declarative way of coding the GUI building part and I come out with this: top = Tk( 'top' ).add ( Frame( 'frame' ).add ( Pack( side = 'top' ), Frame ( 'panel1' ).add ( Pack( s

python2.6 needed as an aptitude package as dependency

2014-01-17 Thread Jan Hapala
Hello, I need to install a program (MACS: http://liulab.dfci.harvard.edu/MACS/) for which I need to have Python2.6 installed. I do have two other Pythons installed but not this version. 1) So I tried apt-get install... python2.6 is not there as a package (I am running Linux Mint 15). 2) Okay,

[newbie] advice and comment wanted on first tkinter program

2014-01-17 Thread Jean Dupont
Dear all, I made a simple gui with tkinter. I can imagine there are things which I did which are "not optimal". So what I ask is to comment on my code preferable with snippets of code which show how to do improve my code. #!/usr/bin/env python import Tkinter import time import RPi.GPIO as GPIO GPIO

Re: EuroPython has a new blog

2014-01-17 Thread Stéphane Wirtel
Hi Marc-André, Cool for EuroPython, Good idea, I think we will use tumblr for a small blog for Python-FOSDEM. Stef On 17 Jan 2014, at 13:37, M.-A. Lemburg wrote: > The EuroPython Society has setup a new blog for EuroPython in its > efforts to provide more conference facilities for the EuroPy

EuroPython Society website now live

2014-01-17 Thread M.-A. Lemburg
The EuroPython Society has created a new website to collect information on EuroPython, the society and its workings: http://www.europython-society.org/ For those who don’t know: the society is a Swedish non-profit organization which was formed in 2004 by the EuroPython organizers to put on Eu

EuroPython has a new blog

2014-01-17 Thread M.-A. Lemburg
The EuroPython Society has setup a new blog for EuroPython in its efforts to provide more conference facilities for the EuroPython organization and to enhance the EuroPython attendee experience. http://blog.europython.eu/ There’s an RSS feed in case you want to subscribe to it: http://bl

Re: interactive help on the base object

2014-01-17 Thread Jean-Michel Pichavant
- Original Message - > On 17/01/2014 01:00, Terry Reedy wrote: > > On 12/6/2013 8:35 PM, Terry Reedy wrote: > >> On 12/6/2013 12:03 PM, Mark Lawrence wrote: > >>> Is it just me, or is this basically useless? > >>> > >>> >>> help(object) > >>> Help on class object in module builtins: > >>>

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
On 17/01/2014 11:30, Chris Angelico wrote: On Fri, Jan 17, 2014 at 10:24 PM, Chris Angelico wrote: Do your test strings contain any non-ASCII characters? If not, you might be able to do this: def func(a): """ >>> str(func(u'aaa')) 'aaa' """ return a Actually, probabl

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
On 17/01/2014 11:41, Steven D'Aprano wrote: def func(a): """ >>> print(func(u'aaa')) aaa """ return a I think this approach seems to work if I turn the docstring into unicode def func(a): u""" >>> print(func(u'aaa\u020b')) aaa\u020b """

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Steven D'Aprano
On Fri, 17 Jan 2014 11:16:17 +, Robin Becker wrote: > I have some problems making some doctests for python2 code compatible > with python3. The problem is that as part of our approach we are > converting the code to use unicode internally. So we allow eihter byte > strings or unicode in inputs

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Chris Angelico
On Fri, Jan 17, 2014 at 10:24 PM, Chris Angelico wrote: > Do your test strings contain any non-ASCII characters? If not, you > might be able to do this: > > def func(a): > """ > >>> str(func(u'aaa')) > 'aaa' > """ > return a Actually, probably better than that: def func(a):

Re: doctests compatibility for python 2 & python 3

2014-01-17 Thread Chris Angelico
On Fri, Jan 17, 2014 at 10:16 PM, Robin Becker wrote: > Aside from changing the tests so they look like > """ > >>> func(u'aaa')==u'aaa' > True > """ Do your test strings contain any non-ASCII characters? If not, you might be able to do this: def func(a): """ >>> str(func

doctests compatibility for python 2 & python 3

2014-01-17 Thread Robin Becker
I have some problems making some doctests for python2 code compatible with python3. The problem is that as part of our approach we are converting the code to use unicode internally. So we allow eihter byte strings or unicode in inputs, but we are trying to convert to unicode outputs. That make

Re: Guessing the encoding from a BOM

2014-01-17 Thread Chris Angelico
On Fri, Jan 17, 2014 at 8:47 PM, Mark Lawrence wrote: > On 17/01/2014 09:43, Chris Angelico wrote: >> >> On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence >> wrote: >>> >>> Slight aside, any chance of changing the subject of this thread, or even >>> ending the thread completely? Why? Every time I

Re: Guessing the encoding from a BOM

2014-01-17 Thread Mark Lawrence
On 17/01/2014 09:43, Chris Angelico wrote: On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence wrote: Slight aside, any chance of changing the subject of this thread, or even ending the thread completely? Why? Every time I see it I picture Inspector Clouseau, "A BOM!!!" :) Special delivery, a be

Re: Guessing the encoding from a BOM

2014-01-17 Thread Chris Angelico
On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence wrote: > Slight aside, any chance of changing the subject of this thread, or even > ending the thread completely? Why? Every time I see it I picture Inspector > Clouseau, "A BOM!!!" :) Special delivery, a berm! Were you expecting one? ChrisA -- h

Re: extracting string.Template substitution placeholders

2014-01-17 Thread Mark Lawrence
On 17/01/2014 06:07, gmflanagan wrote: On Sunday, January 12, 2014 3:08:31 PM UTC, Eric S. Johansson wrote: As part of speech recognition accessibility tools that I'm building, I'm using string.Template. In order to construct on-the-fly grammar, I need to know all of the identifiers before the

Re: Process datafeed in one MySql table and output to another MySql table

2014-01-17 Thread Mark Lawrence
On 17/01/2014 08:53, Sam wrote: On Friday, January 17, 2014 10:07:58 AM UTC+8, Denis McMahon wrote: On Thu, 16 Jan 2014 17:03:24 -0800, Sam wrote: I have a datafeed which is constantly sent to a MySql table ... Which are the python libraries which are suitable for this purpose? Are t

Re: interactive help on the base object

2014-01-17 Thread Mark Lawrence
On 17/01/2014 01:00, Terry Reedy wrote: On 12/6/2013 8:35 PM, Terry Reedy wrote: On 12/6/2013 12:03 PM, Mark Lawrence wrote: Is it just me, or is this basically useless? >>> help(object) Help on class object in module builtins: class object | The most base type Given that this can be in

Re: Guessing the encoding from a BOM

2014-01-17 Thread Mark Lawrence
On 17/01/2014 01:40, Tim Chase wrote: On 2014-01-17 11:14, Chris Angelico wrote: UTF-8 specifies the byte order as part of the protocol, so you don't need to mark it. You don't need to mark it when writing, but some idiots use it anyway. If you're sniffing a file for purposes of reading, you

Re: Converting folders of jpegs to single pdf per folder

2014-01-17 Thread Tim Golden
On 17/01/2014 05:42, vasishtha.sp...@gmail.com wrote: > try: > n = 0 > for dirpath, dirnames, filenames in os.walk(root): > PdfOutputFileName = os.path.basename(dirpath) + ".pdf" > c = canvas.Canvas(PdfOutputFileName) > if n > 0 : >for filena

Re: Process datafeed in one MySql table and output to another MySql table

2014-01-17 Thread Sam
On Friday, January 17, 2014 10:07:58 AM UTC+8, Denis McMahon wrote: > On Thu, 16 Jan 2014 17:03:24 -0800, Sam wrote: > > > > > I have a datafeed which is constantly sent to a MySql table ... > > > > > Which are the python libraries which are suitable for this purpose? Are > > > there any use

Re: Converting folders of jpegs to single pdf per folder

2014-01-17 Thread Tim Golden
On 17/01/2014 05:42, vasishtha.sp...@gmail.com wrote: > On Thursday, January 16, 2014 12:07:59 PM UTC-8, Tim Golden wrote: >> >> Here's a quick example. This should walk down the Python directory, >> creating a text file for each directory. The textfile will contain >> the names of all the files i

Re: Compiling main script into .pyc

2014-01-17 Thread Steven D'Aprano
On Thu, 16 Jan 2014 23:43:02 -0500, Dave Angel wrote: > MRAB Wrote in message: >> On 2014-01-17 02:56, bob gailer wrote: >>> On 1/16/2014 8:01 PM, Sam wrote: One thing I observe about python byte-code compiling is that the main script does not gets compiled into .pyc. Only imported modu