>
> As you've written it, the statement declares your intent to enter both
> ‘conn’ and ‘conn.cursor()’ as context managers.
>
> https://docs.python.org/3/reference/compound_stmts.html#with>
>
> To “enter a context manager” entails calling the ‘__enter__’ method on
> the context manager obje
On Saturday, 14 May 2016 07:39:23 UTC+10, Ehsan Hajiramezanali wrote:
> Hi,
>
> I want to use pip to install dtrx. However, I got the following error.
>
> ~~~
> $ pip install --allow-external dtrx dtrx
> DEPRECATION: --allow-external has been deprecated and will be removed
> in the future. Due t
On Wednesday, 4 May 2016 17:57:32 UTC+10, Sayth Renshaw wrote:
> Oops sorry noticed you did in the glob. Sorry squinting at phone.
>
> Sayth
Hi
this seems to be causing me an error in my thinking as well as the program. I
am creating a function GetArgs to take a path and file extension from t
On Monday, 16 May 2016 12:45:26 UTC+10, DFS wrote:
> On 5/15/2016 10:21 PM, Sayth Renshaw wrote:
> > Hi
> >
> > I have a file and want to create the sqlite3 db. Using with however i
> > receive an attribute error and it causes an exit.
> >
> > The relevant section of the file is:
> >
> > import s
Sayth Renshaw writes:
> with conn, conn.cursor() as cur:
What are you expecting this ‘with’ statement to do?
As you've written it, the statement declares your intent to enter both
‘conn’ and ‘conn.cursor()’ as context managers.
https://docs.python.org/3/reference/compound_stmts.html#with>
Hi
I have a file and want to create the sqlite3 db. Using with however i receive
an attribute error and it causes an exit.
The relevant section of the file is:
import sqlite3
conn = sqlite3.connect("trial.db")
with conn, conn.cursor() as cur:
# First, create tables.
cur.execute("dr
On Mon, May 16, 2016 at 9:17 AM, Pavlos Parissis
wrote:
> On 16/05/2016 12:59 πμ, Chris Angelico wrote:
>> Ah. I didn't click that link in your original post - didn't know it
>> was the traceback. Better would have been to at least say so; best
>> would have been to include it inline.
>>
>
> I don
On 16/05/2016 12:59 πμ, Chris Angelico wrote:
> On Mon, May 16, 2016 at 8:32 AM, Pavlos Parissis
> wrote:
>>> Searching the CPython sources for that exception shows one hit:
>>> selectors.py, where it converts a file object to an integer file
>>> descriptor. (You could have helped out by showing u
On Mon, May 16, 2016 at 8:32 AM, Pavlos Parissis
wrote:
>> Searching the CPython sources for that exception shows one hit:
>> selectors.py, where it converts a file object to an integer file
>> descriptor. (You could have helped out by showing us the full
>> traceback.)
>
> I did, https://gist.git
On 16/05/2016 12:08 πμ, Chris Angelico wrote:
> On Mon, May 16, 2016 at 1:49 AM, Pavlos Parissis
> wrote:
>> I use subprocess.check_output like this:
>>
>> cmd = [
>> '/sbin/ip',
>> 'address',
>> 'show',
>> 'dev',
>> "{}".format(self.config['interface']),
>> 'to',
>> "{
On Mon, May 16, 2016 at 1:49 AM, Pavlos Parissis
wrote:
> I use subprocess.check_output like this:
>
> cmd = [
> '/sbin/ip',
> 'address',
> 'show',
> 'dev',
> "{}".format(self.config['interface']),
> 'to',
> "{}".format(self.config['ip_prefix']),
> ]
Unrelated to your
On Mon, May 16, 2016 at 2:00 AM, Grant Edwards
wrote:
> On 2016-05-15, Michael Selik wrote:
>> On Sun, May 15, 2016, 10:37 AM Grant Edwards
>> wrote:
>>> On 2016-05-15, Tim Chase wrote:
unless sorted() returns a lazy sorter,
>>>
>>> What's a lazy sorter?
>>
>> One that doesn't calcul
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
On Sun, May 15, 2016 at 7:07 AM David Shi wrote:
> Hello, Michael,
>
> Pandas GroupBy does not behave consistently.
>
> Last time, when we had conversation, I used grouby. It works well.
>
> Now, I thought to re-write the program, so that I can end up with a clean
> script.
>
> But, the problem
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 same time.
Though I typed that ini
Hello, Michael,
Pandas GroupBy does not behave consistently.
Last time, when we had conversation, I used grouby. It works well.
Now, I thought to re-write the program, so that I can end up with a clean
script.
But, the problem is that a lot of columns are missing after groupby application.
Any id
On 2016-05-15, Michael Selik wrote:
> On Sun, May 15, 2016, 10:37 AM Grant Edwards
> wrote:
>> On 2016-05-15, Tim Chase wrote:
>>>
>>> unless sorted() returns a lazy sorter,
>>
>> What's a lazy sorter?
>
> One that doesn't calculate the next item in the sequence until you
> ask for it. It's imp
On Sun, May 15, 2016, 10:37 AM Grant Edwards
wrote:
> On 2016-05-15, Tim Chase wrote:
> > On 2016-05-15 11:46, Peter Otten wrote:
> >> def sorted_dir(folder):
> >> def getmtime(name):
> >> path = os.path.join(folder, name)
> >> return os.path.getmtime(path)
> >>
> >> retu
Hi,
I get intermittent ValueErrors[1] from subprocess when I check if an IP
is assigned to loopback interface by running:
/sbin/ip address show dev lo to 10.52.12.2/32
I use subprocess.check_output like this:
cmd = [
'/sbin/ip',
'address',
'show',
'dev',
"{}".format(self.con
On Sun, May 15, 2016 at 10:36 AM, Grant Edwards
wrote:
> On 2016-05-15, Tim Chase wrote:
>> On 2016-05-15 11:46, Peter Otten wrote:
>>> def sorted_dir(folder):
>>> def getmtime(name):
>>> path = os.path.join(folder, name)
>>> return os.path.getmtime(path)
>>>
>>> return so
Hey there,
Many thanks, Vincent,
On Sun, May 15, 2016 at 11:15 PM, Vincent Vande Vyvre <
vincent.vande.vy...@telenet.be> wrote:
> Le 15/05/2016 13:19, tommy yama a écrit :
>
>> Hi folks,
>>
>> Are there people using QT cross-platform framework on the list?
>> I appreciate for your advices and
On 2016-05-15, Tim Chase wrote:
> On 2016-05-15 11:46, Peter Otten wrote:
>> def sorted_dir(folder):
>> def getmtime(name):
>> path = os.path.join(folder, name)
>> return os.path.getmtime(path)
>>
>> return sorted(os.listdir(folder), key=getmtime, reverse=True)
>>
>> The
Le 15/05/2016 13:19, tommy yama a écrit :
Hi folks,
Are there people using QT cross-platform framework on the list?
I appreciate for your advices and references regarding this.
I am a novice python programmer who started using this framework.
Thanks a lot in advance!
Tomo
Yes.
Note, it is
Le 15/05/2016 10:47, c...@isbd.net a écrit :
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
Hi folks,
Are there people using QT cross-platform framework on the list?
I appreciate for your advices and references regarding this.
I am a novice python programmer who started using this framework.
Thanks a lot in advance!
Tomo
--
https://mail.python.org/mailman/listinfo/python-list
Tim Chase wrote:
> On 2016-05-15 11:46, Peter Otten wrote:
>> def sorted_dir(folder):
>> def getmtime(name):
>> path = os.path.join(folder, name)
>> return os.path.getmtime(path)
>>
>> return sorted(os.listdir(folder), key=getmtime, reverse=True)
>>
>> The same idea will
On Sun, May 15, 2016 at 9:15 PM, Tim Chase
wrote:
> On 2016-05-15 11:46, Peter Otten wrote:
>> def sorted_dir(folder):
>> def getmtime(name):
>> path = os.path.join(folder, name)
>> return os.path.getmtime(path)
>>
>> return sorted(os.listdir(folder), key=getmtime, reverse=
On 2016-05-15 11:46, Peter Otten wrote:
> def sorted_dir(folder):
> def getmtime(name):
> path = os.path.join(folder, name)
> return os.path.getmtime(path)
>
> return sorted(os.listdir(folder), key=getmtime, reverse=True)
>
> The same idea will work with pathlib and os.sca
On 2016-05-15 20:48, Steven D'Aprano wrote:
> Also, remember that most operating systems provide (at least) three
> different times. I'm not sure which one you want, but if I had to
> guess, I would probably guess mtime. If I remember correctly:
>
> atime is usually the last access time;
> mtime i
Hello Dieter,
Am 13.05.2016 um 09:21 schrieb dieter:
Dirk Bächle writes:
...
My questions
- Is this a good approach, that I could use for other parts of the architecture
as well, e.g. the Node class mentioned above?
You might look at the "adpater" pattern.
It is heavily used
Hi Gregory,
thanks a lot for your answer and comments.
Am 13.05.2016 um 08:35 schrieb Gregory Ewing:
Dirk Bächle wrote:
[...]
I'd even suggest that *all* of the build logic should be in
the Nodes, and the Taskmaster class shouldn't exist at all.
The top level logic should just tell the final
Hi Marko,
Am 13.05.2016 um 07:53 schrieb Marko Rauhamaa:
Dirk Bächle :
For example, why do you need a key? Couldn't you simply pass the task
master class as an argument?
The idea behind this is, to be able to select classes by giving a
parameter on the command-line. So at some point a transl
On Sunday 15 May 2016 18:47, c...@isbd.net wrote:
> What I want is a list in the order produced by:-
> ls --sort=time
I'm not sure if this is the best way to do it, but what I would do is sort the
directory list by the file's time metadata, which you can access using os.stat.
To sort the fi
c...@isbd.net wrote:
> 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 simp
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
Full blog post:
http://grodola.blogspot.com/2016/05/psutil-420-windows-services-and-python.html
--
Giampaolo - http://grodola.blogspot.com
--
https://mail.python.org/mailman/listinfo/python-list
Full blog post:
http://grodola.blogspot.com/2016/05/psutil-420-windows-services-and-python.html
--
Giampaolo - http://grodola.blogspot.com
--
https://mail.python.org/mailman/listinfo/python-list
37 matches
Mail list logo