The following function should be immune to race conditions
and doesn't use mktemp.
def templink(destpath):
"""Create a hard link to the given file with a unique name.
Returns the name of the link."""
pid = os.getpid()
i = 1
while True:
linkpath = "%s-%s-%s" % (destpath
Hi All,
The second PyCon Israel will take place June 11-14, 2017.
* 11 June Django girls workshop at Red Hat Israel offices in Raanana
* 12-13 June PyCon Israel main event at Wohl center
* 14 June PyCon Israel workshops and sprints
We still have some sponsorship spots available, great recruiting
On Mon, 1 May 2017 01:01 pm, Metallicow wrote:
> I finally uploaded my wx/lib/mcow package.
> It has many widgets and mixins and probably more to come.
Congratulations! What does it do?
--
Steve
Emoji: a small, fuzzy, indistinct picture used to replace a clear and
perfectly comprehensible wo
I finally uploaded my wx/lib/mcow package.
It has many widgets and mixins and probably more to come.
It has been extensively tested on Windows and at least tested on a linux flavor.
It would be nice if I could get some mac testing also. :)
https://github.com/Metallicow/MCOW
--
https://mail.pyth
I finally uploaded my wx/lib/mcow package.
It has many widgets and mixins and probably more to come.
It has been extensively tested on Windows and at least tested on a linux flavor.
It would be nice if I could get some mac testing also. :)
https://github.com/Metallicow/MCOW
--
https://mail.pyth
On 2017-05-01 08:41, Cameron Simpson wrote:
> On 30Apr2017 06:52, Tim Chase wrote:
> >> > - use a GUID-named temp-file instead for less chance of
> >> > collision?
>
> You could, but mktemp is supposed to robustly perform that task,
> versus "very very probably".
Though with the potential of its
On 2017-05-01 09:15, Ben Finney wrote:
> I reported this – for a different use case – in issue26362 [0]
> https://bugs.python.org/issue26362>.
>
> The suggested solutions in the documentation do not address the use
> case described there; and they do not address the use case you've
> described her
On Sat, Apr 29, 2017 at 11:45 AM, Tim Chase
wrote:
> Working on some deduplication code, I want do my my best at
> performing an atomic re-hard-linking atop an existing file, akin to
> "ln -f source.txt dest.txt"
>
> However, when I issue
>
> os.link("source.txt", "dest.txt")
>
> it fails with a
Tim Chase writes:
> Unfortunately, tempfile.mktemp() is described as deprecated since 2.3
> (though appears to still exist in the 3.4.2 that is the default Py3 on
> Debian Stable). While the deprecation notice says "In version 2.3 of
> Python, this module was overhauled for enhanced security. It
On 30Apr2017 06:52, Tim Chase wrote:
On 2017-04-29 20:51, Devin Jeanpierre wrote:
On Sat, Apr 29, 2017 at 11:45 AM, Tim Chase wrote
> So which route should I pursue?
> - go ahead and use tempfile.mktemp() ignoring the deprecation?
I'd be tempted to. But...
> - use a GUID-named temp-file ins
On 4/30/2017 9:09 AM, Wade Wang wrote:
Hello, everyone. I'm trying to install Python 3.6.1 on my CentOS 6.9
server, but test_imaplib always fails its test when make test. Here is what
I got:
==
ERROR: test_logincapa_with_client
Hello, everyone. I'm trying to install Python 3.6.1 on my CentOS 6.9
server, but test_imaplib always fails its test when make test. Here is what
I got:
> ==
> ERROR: test_logincapa_with_client_certfile (test.test_imaplib.RemoteIMA
On 2017-04-29 20:51, Devin Jeanpierre wrote:
> On Sat, Apr 29, 2017 at 11:45 AM, Tim Chase wrote
> > So which route should I pursue?
> >
> > - go ahead and use tempfile.mktemp() ignoring the deprecation?
> >
> > - use a GUID-named temp-file instead for less chance of collision?
> >
> > - I happen t
On Sat, 29 Apr 2017 22:05:16 +, Robert L. wrote:
>> Task
>>
>> Write a program which counts up from 1, displaying each number as the
>> multiplication of its prime factors.
>>
>> For the purpose of this task, 1 (unity) may be shown as itself.
>>
>>
>> Example
>>
>>2 is prime, so i
Jason Friedman wrote:
> def test_to_start(s):
> return "2" in s
>
> for line in itertools.dropwhile(test_to_start, data.splitlines()):
> print(line)
It's really all in the names: it could either be
for line in dropwhile(test_to_drop, items):
...
or
for line in dropwhilenot(test_to
15 matches
Mail list logo