Ben Finney wrote:
> c...@isbd.net writes:
>
> > If I do:-
> >
> > f = logging.handlers.RotatingFileHandler("/home/chris/tmp/mail.log",
> > 'a', 100, 4)
> > f.setLevel(logging.DEBUG)
> > formatter = logging.Formatter('%(message)s')
> > f.setFormatter(formatter)
> > log.add
I want to use Python to handle the stdout logging that comes from
syncthing.
When you run syncthing it logs to stdout in a fairly standard format
with date, time, ERROR/WARNING/INFO etc. so I don't want to add these.
I just want to be able to write the log to a file with appropriate
rotation etc.
Tim Chase wrote:
> On 2016-05-15 14:36, Grant Edwards wrote:
> > On 2016-05-15, Tim Chase wrote:
> > > unless sorted() returns a lazy sorter,
> >
> > What's a lazy sorter?
>
> A hypothetical algorithm that can spool out a sorted sequence without
> holding the entire sequence in memory at the sa
I have a little Python program I wrote myself which copies images from
a camera (well, any mounted directory) to my picture archive. The
picture archive is simply a directory hierarchy of dates with years at
the top, then months, then days.
My Python program simply extracts the date from the imag
There's a gmane 'newsgroup from a mailing list' for sqlite:-
gmane.comp.db.sqlite.general
It's quite active and helpful too. (Also 'announce' and others)
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Thomas 'PointedEars' Lahn wrote:
> c...@isbd.net wrote:
>
> > Occasionally I have to make forays into Javascript, can anyone
> > recommend a place similar to this list where Javascript questions can
> > be asked? The trouble is that there are very many usenet Javascript
> > lists and it's diffic
Ned Batchelder wrote:
> On Friday, March 25, 2016 at 5:17:21 PM UTC-4, Thomas 'PointedEars' Lahn
> wrote:
> > c...@isbd.net wrote:
> >
> > > Occasionally I have to make forays into Javascript, can anyone
> > > recommend a place similar to this list where Javascript questions can
> > > be asked?
Larry Martell wrote:
> On Thu, Mar 24, 2016 at 4:53 PM, wrote:
> > I use Python wherever I can and find this list (as a usenet group via
> > gmane) an invaluable help at times.
> >
> > Occasionally I have to make forays into Javascript, can anyone
> > recommend a place similar to this list where
Mark Lawrence wrote:
> On 24/03/2016 22:08, c...@isbd.net wrote:
> >
> >> If you do find anything like c.l.p for Javascript, let us know...
> >>
> > OK! :-)
> >
>
> I'd try c.l.bartc as he is the world's leading expert on everything that
> you need to know about any language, whereby the only t
Grant Edwards wrote:
> On 2016-03-24, c...@isbd.net wrote:
>
> > I use Python wherever I can and find this list (as a usenet group
> > via gmane) an invaluable help at times.
> >
> > Occasionally I have to make forays into Javascript, can anyone
> > recommend a place similar to this list where J
I use Python wherever I can and find this list (as a usenet group via
gmane) an invaluable help at times.
Occasionally I have to make forays into Javascript, can anyone
recommend a place similar to this list where Javascript questions can
be asked? The trouble is that there are very many usenet J
c...@isbd.net wrote:
> I am getting the following error when running some code that uses
> python-sqlkit. This uses python-babel to handle dates for different
> locales.
>
> Traceback (most recent call last):
> File
> "/usr/local/lib/python2.7/dist-packages/sqlkit-0.9.6.1-py2.7.egg/sqlkit/wi
Does anyone here use sqledit/sqlkit? It's a sqlite database
browser/editor which does most of its work by introspection (at least
I think that's the right name for it).
Thus it's trivially simple to write a gui program to edit data in a
database:-
#!/usr/bin/python
from sqlkit.widgets i
I am getting the following error when running some code that uses
python-sqlkit. This uses python-babel to handle dates for different
locales.
Traceback (most recent call last):
File
"/usr/local/lib/python2.7/dist-packages/sqlkit-0.9.6.1-py2.7.egg/sqlkit/widgets/table/columns.py",
lin
Gene Heskett wrote:
> On Thursday 17 March 2016 17:37:02 alister wrote:
>
> > On Fri, 18 Mar 2016 07:42:30 +1100, Chris Angelico wrote:
> > > On Fri, Mar 18, 2016 at 7:31 AM, wrote:
> > >> Rick Johnson wrote:
> > >>> In the event that i change my mind about Unicode, and/or for the
> > >>> sake
Grant Edwards wrote:
> On 2016-03-17, Chris Angelico wrote:
> > On Fri, Mar 18, 2016 at 7:31 AM, wrote:
> >> Rick Johnson wrote:
> >>>
> >>> In the event that i change my mind about Unicode, and/or for
> >>> the sake of others, who may want to know, please provide a
> >>> list of languages tha
Rick Johnson wrote:
> On Thursday, March 17, 2016 at 5:48:12 PM UTC-5, c...@isbd.net wrote:
> > So, my mistake, but python-babel should have caught it.
>
> Yeah, errors like that are a real pisser, and the further away from the
> source that they break, the more headache they become to resolve.
Rick Johnson wrote:
>
> In the event that i change my mind about Unicode, and/or for
> the sake of others, who may want to know, please provide a
> list of languages that *YOU* think handle Unicode better than
> Python, starting with the best first. Thanks.
>
How about a list of languages that U
Jon Ribbens wrote:
> On 2016-03-10, c...@isbd.net wrote:
> > # Read each message into a string and then parse with the email
> > module, if
> > # there's an error retrieving the message then just throw it away
> > #
> > try:
> > popmsg = pop3.retr(i
Mark Lawrence wrote:
> On 10/03/2016 12:04, c...@isbd.net wrote:
> > I have a (fairly simple) Python program that scans through a
> > 'catchall' E-Mail address for things that *might* be for me. It sends
> > anything that could be for me to my main E-Mail and discards the rest.
> >
> > However I
I have a (fairly simple) Python program that scans through a
'catchall' E-Mail address for things that *might* be for me. It sends
anything that could be for me to my main E-Mail and discards the rest.
However I *occasionally* get an error from it as follows:-
Traceback (most recent call las
Steven D'Aprano wrote:
> On Fri, 4 Mar 2016 12:23 pm, INADA Naoki wrote:
>
> >>
> >>
> >> Indeed. I don't understand why, when splitting a condition such as this,
> >> people tend to put the operator at the end of each line.
> >>
> >>
> > Because PEP8 says:
> >
> >> The preferred place to break
codewiz...@gmail.com wrote:
> On Wednesday, March 2, 2016 at 3:44:07 PM UTC-5, Skip Montanaro wrote:
> >
> > if (some_condition and
> > some_other_condition and
> > some_final_condition):
> > play_bingo()
>
> How about:
>
> continue_playing = (
> some_conditio
Dietmar Schwertberger wrote:
> On 28.02.2016 13:23, Sven R. Kunze wrote:
> > I recently introduced LaTeX to my girlfriend. LaTeX is quite ugly and
> > it has this "distinct compile/execute step", so initially I hesitated
> > to show it to her. But her MS Word experience got worse and worse the
Frank Miles wrote:
> On Thu, 11 Feb 2016 14:29:04 +0000, cl wrote:
>
> > I am trying out wxGlade on Linux, version 0.7.1 of wxGlade on xubuntu
> > 15.10.
> >
> > I have already written something using wxPython directly so I have the
> > basics (of my Pyt
I am trying out wxGlade on Linux, version 0.7.1 of wxGlade on xubuntu
15.10.
I have already written something using wxPython directly so I have the
basics (of my Python skills and the environment) OK I think.
I am having a lot of trouble getting beyond the first hurdle of
creating a trivial Pytho
Peter Otten <__pete...@web.de> wrote:
> c...@isbd.net wrote:
>
> > It's absolutely right, there is a non-UTF character in the column.
> > However I don't want to have to clean up the data, it would take
> > rather a long time. How can I trap the error and just put a Null or
> > zero in the datagr
I have the following code snippet populating a wxPython grid with data
from a database. :-
#
#
# populate grid with data
#
all = self.cur.execute("SELECT * from " + table + " ORDER by id ")
for row in all:
row_num = row[0]
ce
Ian Kelly wrote:
> On Mon, Feb 8, 2016 at 8:36 AM, wrote:
> > I'm playing around with some existing code that uses wxpython. I've
> > been trying to understand a basic bit about the import statement and
> > so went to the beginning of the wxPython on line documents.
> >
> > Going from the top t
I'm playing with some code that uses the wxpython grid. *Every*
example I have seen starts with the imports:-
import wx
import wx.grid as Gridlib
As Gridlib is exactly the same number of characters as wx.grid I
really don't see the point. Am I missing something?
--
Chris Green
·
--
h
I'm playing around with some existing code that uses wxpython. I've
been trying to understand a basic bit about the import statement and
so went to the beginning of the wxPython on line documents.
Going from the top to the "Hello World Example" (can't give URL as the
URL is the same for all the d
Vlastimil Brom wrote:
>
> Hi,
> your code in
> http://www.salstat.com/news/linking-wxgrid-to-sqlite-database-in-python-an-example
>
> seems to work for me after small changes with both python 2.7 and 3.4
> (using wx Phoenix)
Where are you getting phoenix from? It's not in the Ubuntu
repositori
Dietmar Schwertberger wrote:
> On 07.02.2016 12:19, c...@isbd.net wrote:
> > However my database has quite a lot of Unicode data as there are
> > French (and other) names with accents etc. What's the right way to
> > handle this reasonably neatly? At the moment it traps an error at
> > line 37:-
Chris Angelico wrote:
> On Sun, Feb 7, 2016 at 11:42 PM, wrote:
> >
> > Are there any Python 3 GUIs that would be reasonably easy to move to?
> > E.g. ones which have a grid object and which work in the same sort of
> > way as wxpython in general?
>
> Grid object? I'm not sure. But all of my GU
Chris Angelico wrote:
>
> So the question then becomes: Under Python 3, can you use regular
> string objects for both the things you're working with? I can confirm
> that the inbuilt sqlite3 module works just fine with Unicode text; so
> all you need to do is try out your GUI code under Python 3.
I'm using this as a starting point for creating a grid to view and
edit some sqlite data:-
http://www.salstat.com/news/linking-wxgrid-to-sqlite-database-in-python-an-example
I can actually understand most of it which is a good start.
However my database has quite a lot of Unicode data as t
Dennis Lee Bieber wrote:
> On Wed, 7 Oct 2015 13:05:07 + (UTC), alister
> declaimed the following:
>
>
> >With a simple Cesar the method is "shift the alphabet by 'X' characters
> >and X is the key
> >
> >if the key is unknown then the attacker still has to brute force the
> >method (admi
I know questions similar to this are often asked but my reasons for
wanting to do this (and thus ways it can be done) are slightly different.
I have a number of little utility scripts (python and others) which I
use to automate the process of decrypting and displaying things like
files containing
c...@isbd.net wrote:
> I have a (fairly) simple script that does 'catchall' processing on my
> POP3 mailbox. It looks for messages To: strings that *might* be for
> me and then throws everything else away.
>
[snip]
Sorry folks, I found the problem, it's a known 'bug' due to someone
trying to pro
I have a (fairly) simple script that does 'catchall' processing on my
POP3 mailbox. It looks for messages To: strings that *might* be for
me and then throws everything else away.
I was getting the occasional error as follows:-
Traceback (most recent call last):
File "/home/chris/.mutt/
fa...@vt.edu wrote:
> I have the following directory /home/me/projects/modulename.
>
> I update PYTHONPATH using the following command:
> export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename
>
> It seems to have been added:
> [me@machine ~]$ python -c "import sys; print(sys.path)"
> ['',...
Ian Kelly wrote:
> On Wed, Feb 25, 2015 at 1:45 PM, Mark Lawrence
> wrote:
> > http://www.slideshare.net/pydanny/python-worst-practices
> >
> > Any that should be added to this list? Any that be removed as not that bad?
>
> Using XML for configuration is a good example of a worst practice, but
Ben Finney wrote:
> Chris Angelico writes:
>
> > I'd really like to see a lot more presentations done in pure text.
>
> Maybe so. My request at the moment, though, is not for people to change
> what's on their slides; rather, if they want people to retrieve them,
> the slides should be download
Michael Torrie wrote:
> On 01/17/2015 07:51 AM, Albert van der Horst wrote:
> > In article ,
> > Chris Angelico wrote:
> >
> >>
> >> But sure. If you want to cut out complication, dispense with user
> >> accounts altogether and run everything as root. That's WAY simpler!
> >
> > I didn't excep
Chris Angelico wrote:
> On Sun, Jan 18, 2015 at 1:51 AM, Albert van der Horst
> wrote:
> > In article ,
> > Chris Angelico wrote:
> >
> >>
> >>But sure. If you want to cut out complication, dispense with user
> >>accounts altogether and run everything as root. That's WAY simpler!
> >
> > I did
Marko Rauhamaa wrote:
> Chris Angelico :
>
> > You could deduplicate it by shifting the condition:
> >
> > while True:
> > value = get_some_value()
> > if value not in undesired_values: break
> >
> > But I'm not sure how common this idiom actually is.
>
> Extremely common, and not only i
sohcahto...@gmail.com wrote:
>
> # increment x
> x += 1
But it shouldn't say 'increment x', it should say 'add one to the line
count' or some such. Although changing the variable name to
'lineCount' would do almost as well.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-l
Darren Chen wrote:
> 在 2014年11月5日星期三UTC+8下午8时17分11秒,larry@gmail.com写道:
> > On Wed, Nov 5, 2014 at 7:13 AM, Ivan Evstegneev
> > wrote:
> > > Firtst of all thanks for reply.
> > >
> > >>>brackets [] means that the argument is optional.
> > >
> > > That's what I'm talking about (asking actually
I have installed (using easy_install) a little utility, it seems to
have installed just the top-level python script in /usr/local/bin
which in turn uses load_entry_point() to run the actual code.
As far as I can see the code and support files remain in the .egg file
in /usr/local/lib/python2.7/dis
Grant Edwards wrote:
> On 2014-10-02, c...@isbd.net wrote:
> > Travis Griggs wrote:
> >>
> >>
> >> Sent from my iPhone
> >>
> >> > On Oct 1, 2014, at 04:12, Peter Otten <__pete...@web.de> wrote:
> >> >
> >> > `lambda` is just a fancy way to define a function inline
> >>
> >> Not sure "fancy
Travis Griggs wrote:
>
>
> Sent from my iPhone
>
> > On Oct 1, 2014, at 04:12, Peter Otten <__pete...@web.de> wrote:
> >
> > `lambda` is just a fancy way to define a function inline
>
> Not sure "fancy" is the correct adjective; more like syntactic tartness
> (a less sweet version of syntact
Steven D'Aprano wrote:
> between printing output to the screen and returning values from a function,
> and under what circumstances Python will automatically print said returned
> values as a convenience. Conflating the two as "2 kinds of return" is an
To me automically printing something is a mi
Joel Goldstick wrote:
> On Wed, Oct 1, 2014 at 5:58 AM, wrote:
> > I have a dictionary as follows:-
> >
> > {
> > u'StarterAmps1': Row(id=4, ain=u'AIN3', name=u'StarterAmps1',
> > conv=6834.374834509803,
> Description=u'Starter Amps'),
> > u'LeisureVolts': Row(id=1, ain=u'AIN0', name=u'Leisur
Joel Goldstick wrote:
> On Wed, Oct 1, 2014 at 6:45 AM, wrote:
> > Peter Otten <__pete...@web.de> wrote:
> >> c...@isbd.net wrote:
> >>
> >> > I have a dictionary as follows:-
> >> >
> >> > {
> >> > u'StarterAmps1': Row(id=4, ain=u'AIN3', name=u'StarterAmps1',
> >> > conv=6834.374834509803, Desc
Peter Otten <__pete...@web.de> wrote:
> c...@isbd.net wrote:
>
> > I have a dictionary as follows:-
> >
> > {
> > u'StarterAmps1': Row(id=4, ain=u'AIN3', name=u'StarterAmps1',
> > conv=6834.374834509803, Description=u'Starter Amps'), u'LeisureVolts':
> > Row(id=1, ain=u'AIN0', name=u'LeisureVolts
I have a dictionary as follows:-
{
u'StarterAmps1': Row(id=4, ain=u'AIN3', name=u'StarterAmps1',
conv=6834.374834509803, Description=u'Starter Amps'),
u'LeisureVolts': Row(id=1, ain=u'AIN0', name=u'LeisureVolts',
conv=29.01374215995874, Description=u'Leisure Volts'),
u'RudderPos': Row(id=6, ain
In the namedtuple documentation there's an example:-
EmployeeRecord = namedtuple('EmployeeRecord', 'name, age, title,
department, paygrade')
import sqlite3
conn = sqlite3.connect('/companydata')
cursor = conn.cursor()
cursor.execute('SELECT name, age, title, department, paygr
Neil D. Cerutti wrote:
> On 9/30/2014 7:35 AM, c...@isbd.net wrote:
> > Thus I'd have something like (apologies for any syntax errors):-
> >
> > cfg = { "LeisureVolts": ["AIN0", 0.061256, "Leisure Battery Voltage"],
> > "StarterVolts": ["AIN1", 0.060943, "Starter Battery Voltage"],
> >
Rustom Mody wrote:
>
> > # docs for first option
> > # more docs
> > # examples
> > # etcetera
> > first_option =123
>
> > # docs for second option
> > second_option = 234
>
> > Is that Python code, or is it a sectionless INI file, or what?
>
> Yeah I was going to say that this is possible
>
Rustom Mody wrote:
> On Tuesday, September 30, 2014 5:18:31 PM UTC+5:30, Chris wrote:
>
> > I would actually
> > quite like to keep the configuration data separate from the code as it
> > would simplify using the data at the 'home' end of things as I'd just
> > need to copy the configuration file
Dave Angel wrote:
> c...@isbd.net Wrote in message:
> > I am puzzling where and how to keep these configuration values. My
> > current design has them in dedicated tables in the database but this
> > is rather clumsy in many ways as there's an overhead reading them
> > every time the program needs
I am developing some code which runs on a (remote from me most of the
time) Beaglebone Black single board computer. It reads various items
of data (voltages, currents, temperatures, etc.) using both a 1-wire
bus system and the Beaglebone's ADC inputs. The values are stored
at hourly intervals int
Joshua Landau wrote:
> On 3 September 2014 15:48, wrote:
> > Peter Otten <__pete...@web.de> wrote:
> >> >>> [ord(c) for c in "This is a string"]
> >> [84, 104, 105, 115, 32, 105, 115, 32, 97, 32, 115, 116, 114, 105, 110, 103]
> >>
> >> There are other ways, but you have to describe the use case
Peter Otten <__pete...@web.de> wrote:
> c...@isbd.net wrote:
>
> > I know I can get a list of the characters in a string by simply doing:-
> >
> > listOfCharacters = list("This is a string")
> >
> > ... but how do I get a list of integers?
> >
>
> >>> [ord(c) for c in "This is a string"]
>
I know I can get a list of the characters in a string by simply doing:-
listOfCharacters = list("This is a string")
... but how do I get a list of integers?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
Sturla Molden wrote:
> Monte Milanuk wrote:
> > Aaaannnd here we have a good example of why it would be really nice to
> > be able to filter/score based on the message *body*, not just the
> > headers. 8(
>
> Actually, here we have the reason why Usenet died.
>
... and the alternatives have the
Sturla Molden wrote:
> > Guess where I'm going with this is... is there anything out there worth
> > trying - on Linux - that I'm missing?
>
> leafnode
>
That doesn't address the problem at all! :-) You still need a news
reader.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/p
memilanuk wrote:
>
> Guess where I'm going with this is... is there anything out there worth
> trying - on Linux - that I'm missing?
>
If slrn was a maybe then there's also tin for text mode news readers,
it's what I have always used. I don't know what it does with HTML as
none of the groups I
Chris Angelico wrote:
> On Fri, Apr 11, 2014 at 7:17 PM, Sturla Molden
> wrote:
> > The only way to protect your code is never to ship anything.
>
> It's worth noting, as an aside, that this does NOT mean you don't
> produce or sell anything. You can keep your code secure by running it
> on a s
Robert Kern wrote:
> On 2013-04-29 13:59, c...@isbd.net wrote:
> > Dave Angel wrote:
> >> On 04/29/2013 05:47 AM, c...@isbd.net wrote:
> >>
> >> A couple of generic comments: your email program made a mess of the
> >> traceback by appending each source line to the location information.
> >>
> >
Dave Angel wrote:
> On 04/29/2013 05:47 AM, c...@isbd.net wrote:
>
> A couple of generic comments: your email program made a mess of the
> traceback by appending each source line to the location information.
>
What's me email program got to do with it? :-) I'm using a dedicated
newsreader (
Andrew Berg wrote:
> On 2013.04.29 04:47, c...@isbd.net wrote:
> > If I understand correctly the encode() is saying that it can't
> > understand the data in the html because there's a character 0xc3 in it.
> > I *think* this means that the é is encoded in UTF-8 already in the
> > incoming data str
I am debugging some code that creates a static HTML gallery from a
directory hierarchy full of images. It's this package:-
https://pypi.python.org/pypi/Gallery2.py/2.0
It's basically working and does pretty much what I want so I'm happy to
put some effort into it and fix things.
The problem
What's a neat way to print columns of numbers with blanks where a number
is zero or None?
E.g. I want to output something like:-
Credit Debit Description
100.00 Initial balance
123.45 Payment for cabbages
202.00 Telephone bill
For ea
I'm trying to use the python vobject package instead of what I use at
the moment (the icalendar package) because it's more widely supported
and available from my Linux repository.
However I'm having a really hard time actually working out how to use
it. The 'Usage examples' at http://vobject.skyho
HiCould the trython use the Oracle instead of the default postgresql ?
2008/11/19 erp software <[EMAIL PROTECTED]>
> On Nov 18, 3:26 pm, Hartmut Goebel <[EMAIL PROTECTED]> wrote:
> > On behalf of the Tryton team I'm proud to announce Tryton 1.0,
> > an Open Source application platform and ERP. It
Hi,all:I make the SQLObject as the ORM in turbogears ,now I meet a problems
on selecting records for a given date . Here is the define for my class:
class updateHistory(SQLObject):
actionTime = DateTimeCol(default=datetime.now)
actionContent = UnicodeCol(length=500,default="")
Then how ca
HI,there:
I get the errors below when installing the Turebogear,could anyone help me ?
Thanks in advance.
error: Not a recognized archive type: c:\docume~1\admini~1\locals~1\
temp\easy_in
stall-y2znne\PasteScript-1.6.3.tar.gz
--
http://mail.python.org/mailman/listinfo/python-list
78 matches
Mail list logo