you see the subtle difference?
Awww nuts, I do! What a pain, wouldn't it be nice if there was a
standard on such things.
Thanks for the pointer!
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 23 Jun 2020 00:40:28 +0100,
MRAB wrote:
> On 2020-06-22 23:38, Seb wrote:
>> Hello,
>> What's the pythonic way to do this without polluting the user's
>> directory with the decrypted file? I wrongly thought this should do
>> it:
>> impo
"rb") as f:
with tempfile.NamedTemporaryFile("w+") as tf:
status = gpg.decrypt_file(f, output=tf.name)
info = netrc.netrc(tf.name)
which fails as the temporary file doesn't even get created.
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, 27 Feb 2018 07:36:31 -0700,
Ian Kelly wrote:
> On Tue, Feb 27, 2018 at 4:08 AM, Peter Otten <__pete...@web.de> wrote:
>> Seb wrote:
>>> On Tue, 27 Feb 2018 12:25:30 +1300,
>>> Gregory Ewing wrote:
>>>> Seb wrote:
>>>>> I
On Tue, 27 Feb 2018 12:25:30 +1300,
Gregory Ewing wrote:
> Seb wrote:
>> I was wondering is whether there's a faster way of multiplying each
>> row (1x3) of a matrix by another matrix (3x3), compared to looping
>> through the matrix row by row as shown in the code
, compared
to looping through the matrix row by row as shown in the code. Perhaps
I'm not understanding how to use the broadcasting features of `matmul`.
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
, mati)
uvw_rots[i] = uvw_roti
---<cut here---end->---
Is there a better (faster) approach than looping through the rows of uvw
as shown?
Thanks,
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 17 Dec 2017 10:12:07 +0100,
Peter Otten <__pete...@web.de> wrote:
> Seb wrote:
>> As far as I can see it is currently impossible to apply more than one
>> class to an ArgumentParser. For example, I'd like to use both
>> RawDescriptionHelpFormatter *and*
single one. Any suggestions?
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
], [0, 1]]])
This one is not so big, but if it were, there must be a way to code this
properly.
Thanks,
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
his by converting the list to a
> pandas dataframe; it might be worthwhile to ask in a specialised
> forum.
Thank you, I learned a few things there (particularly nonlocal, since
I'm still in Python 2.7)!
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
)
ifiles = [x for x in ec_files if
pd.to_datetime(x[-18:-4], format="%Y%m%d%H%M%S") >= w and
pd.to_datetime(x[-18:-4], format="%Y%m%d%H%M%S") < nextw]
win_files.append(ifiles)
However, this is proving very slow, and was wondering whether there's a
better/faster way to do this. Any tips would be appreciated.
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
rd[j, i + 1], latgrd[j + 1, i]), # upper right
(longrd[j, i], latgrd[j + 1, i]), # upper left
(longrd[j, i], latgrd[j, i])] # close at lower left
---<cut here-------end->---
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
to
work, but I can't seem hit the right keywords and come with all sorts of
tangentially related stuff. I'm sure there must be some tool that sets
up the development environment when the package source is not on
`sys.path`. Any advice on this topic would be appreciated.
Ch
1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: ger.gmane.org 1437828370 13839 80.91.229.3 (25 Jul 2015 12:46:10 GMT)
X-Complaints-To: use...@ger.gmane.org
NNTP-Posting-Date: Sat, 25 Jul 2015 12:46:10 + (UTC)
Cc: Seb
To: python-list@python.o
st be a proper object-oriented solution to
this. Any tips appreciated.
Cheers,
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
uation more
effectively.
Cheers,
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
expanded out to
> a for loop building a list, another way to specify a generator is by
> defining a function using the yield keyword. For example, this
> generator function is equivalent to the generator expression above:
[...]
Thank you, this exactly what I was missing.
Happy holidays
on-language-features-and-tricks-you-may-not-know.html#sliding-windows-n-grams-using-zip-and-iterators
--
Seb
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 25 Apr 2013 06:54:33 -0700 (PDT),
rusi wrote:
> On Apr 25, 6:01 pm, Seb wrote:
>> On Wed, 24 Apr 2013 21:38:04 -0700 (PDT),
>> rusi wrote:
>> > There were some ipython+emacs+windows bugs:
>> >https://bugs.launchpad.net/ipython/+bug/290228 > Last
7f28368e
On Debian here, so not a problem.
Thanks,
--
Seb
--
http://mail.python.org/mailman/listinfo/python-list
;';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
but this may be a little outdated as it refers to IPython 0.11.
Thanks,
Seb
+--- Footnotes ---+
¹ Ignored recommended setting for `python-shell-interpreter-args'
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
Just a quick question , I have a simple script I want to convert into a windows
installer and give to some friends.
I had a look at http://docs.python.org/distutils/introduction.html and wrote
this setup script:
#!/usr/bin/env python
from distutils.core import setup
setup(name="C:
best regards,
Seb
--
http://mail.python.org/mailman/listinfo/python-list
Forgot the code... doh! :)
#! /usr/bin/env python
import socket
import time
class MulticastSender(object):
def __init__(self, MCAST_ADDR = "224.168.2.9", MCAST_PORT = 1600):
self.MCAST_ADDR = MCAST_ADDR
self.MCAST_PORT = MCAST_PORT
ANY = "0
On Aug 25, 11:57 pm, Piet van Oostrum wrote:
> You can also say:
> [x+y for x in range(3) for y in range(4) if x < y]
> If you want to write this as a loop you have to put the for's on
> separate lines separated by colons, so why not the if also? Or would you
> also like to have the for's on one l
On Aug 25, 10:46 pm, Falcolas wrote:
> On Aug 25, 1:58 pm, seb wrote:
>
> > On Aug 25, 9:42 pm, Falcolas wrote:
> > > On Aug 25, 11:25 am, seb wrote:
> > > So, what part of the statement does the "if" statement belong to;
> > > partic
On Aug 25, 9:42 pm, Falcolas wrote:
> On Aug 25, 11:25 am, seb wrote:
>
>
>
> > We could as consistenly explain that the syntax
>
> > for n in range(10) if n%3==0:
> > body
>
> > means
>
> > for n in range(10):
> > if n%3==0:
> >
On Aug 24, 12:05 am, Mel wrote:
> seb wrote:
> > On Aug 23, 6:18 pm, John Posner wrote:
> [ ... ]
> >> How about using a generator expression instead of a list?
>
> >> for i in (x for x in range(10) if x > 5):
> >> print i
>
> >> -John
On Aug 23, 11:02 pm, Chris Rebert wrote:
> On Sun, Aug 23, 2009 at 1:36 PM, seb wrote:
> > On Aug 23, 6:18 pm, John Posner wrote:
> >> >> Hi,
>
> >> >> i was wondering if there is a syntax alike:
>
> >> >> for i in range(10) if i >
On Aug 23, 10:36 pm, seb wrote:
> On Aug 23, 6:18 pm, John Posner wrote:
>
>
>
>
>
> > >> Hi,
>
> > >> i was wondering if there is a syntax alike:
>
> > >> for i in range(10) if i > 5:
> > >> print i
>
> > &g
On Aug 23, 6:18 pm, John Posner wrote:
> >> Hi,
>
> >> i was wondering if there is a syntax alike:
>
> >> for i in range(10) if i > 5:
> >> print i
>
> > You can write
>
> > for i in filter(lambda i: i > 5, range(10)):
> > print i
>
> > but
>
> > for i in range(10):
> > if i > 5:
> >
Hi,
i was wondering if there is a syntax alike:
for i in range(10) if i > 5:
print i
equivalent to
for i in (for i in range(10) if i>5):
print i
sebastien
--
http://mail.python.org/mailman/listinfo/python-list
On May 16, 5:04 pm, MRAB wrote:
> Seb wrote:
> > On May 16, 4:20 pm, MRAB wrote:
> >> Seb wrote:
> >>> I'm trying to construct a menu from an xml file. However my recursive
> >>> algorithm isn't doing what I want it too. I've been
On May 16, 5:04 pm, MRAB wrote:
> Seb wrote:
> > On May 16, 4:20 pm, MRAB wrote:
> >> Seb wrote:
> >>> I'm trying to construct a menu from an xml file. However my recursive
> >>> algorithm isn't doing what I want it too. I've been
On May 16, 4:20 pm, MRAB wrote:
> Seb wrote:
> > I'm trying to construct a menu from an xml file. However my recursive
> > algorithm isn't doing what I want it too. I've been starring at this
> > for too long. Any help appreciated :)
>
> > I get the
:40: GtkWarning: gtk_menu_shell_insert: assertion
`GTK_IS_MENU_ITEM (child)' failed
menu_bar.append(menu)
I'm pretty sure I fuck up around line 27-30
xml file:
http://pastie.org/480045
python code:
http://pastie.org/480042
best regards,
Seb
--
http://mail.python.org/mailman/listinfo/python-list
hi there,
[snip]
> Google uses Processes for the Tabs in Chrome, because that way they get
> around many Memory Management Problems they would have with Threads or with
> a singlethreaded reactor. Using Processes is not per se a bad Idea. You pay
> a bit with Memory and CPU but in many situations
On Sep 17, 7:33 pm, Seb <[EMAIL PROTECTED]> wrote:
> I'm making a ssl server, but I'm not sure how I can verify the
> clients. What do I actually need to place in _verify to actually
> verify that the client cert is signed by me?
>
> 50 class SSLTCPServer(TC
On Sep 18, 1:05 am, Michael Palmer <[EMAIL PROTECTED]> wrote:
> On Sep 17, 1:33 pm, Seb <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm making a ssl server, but I'm not sure how I can verify the
> > clients. What do I actually need to place in _verify to actu
On Sep 17, 10:53 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote:
> On 17 Set, 19:33, Seb <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm making a ssl server, but I'm not sure how I can verify the
> > clients. What do I actually need to pl
I'm making a ssl server, but I'm not sure how I can verify the
clients. What do I actually need to place in _verify to actually
verify that the client cert is signed by me?
50 class SSLTCPServer(TCPServer):
51 keyFile = "sslcert/server.key"
52 certFile = "sslcert/server.crt"
53
I'm trying to implement a file server using the code below. However
the locking doesn't work. I can delete while put'ing a file.
Anyone got an idea about why?
best regards,
seb
#! /usr/bin/env python
import Pyro.core, Pyro.naming
from Pyro.errors import PyroError, NamingE
, and whatever is of interest to us.
Interested ? Please post on this thread.
Seb
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm trying to use an egg packages (pyOpenGL) as a "normal
package" (by unzipping the egg into a directory).
Generally this seems to work fine, except one init-step is missing.
>From setuptools I got the pkg_resources.py file.
But now the package is not properly initialized, because
iter_entry
Hi!
I was surprised when I did a google-groups search for python,
(
http://groups.google.com/groups/search?q=python&qt_s=Search+Groups
)
it shows these groups:
comp.lang.python with about 11000 users,
and second,
Django users
Discussion group for Django users. Django is a high-level Python
Web ..
Are there PyOpenGL 2.0 (I guess 2.0.1.09 is goood) binaries available
for Python 2.5 ? Anywhere ?
Thanks for the reply
-Sebastian Haase
On Oct 1, 11:49 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Oct 1, 4:04 am, [EMAIL PROTECTED] wrote:
>
>
>
> > Hi,
> > I am distributing a package with a
Hi,
I am distributing a package with a precompiled collection of modules
and packages useful for Python based medical/biological/astronomical
image analysis and algorithm development. (Codename: Priithon).
For Priithon I put all modules/packages in a simple / single directory
(tree) including one s
((socket.gethostname(), self.PORT))
The strange thing is that using the "" it works for a few hours.
Regards.
Sebastien.
Dennis Lee Bieber a écrit :
> On 17 Jan 2007 00:08:52 -0800, "seb" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> &g
ing or not.
--
partial conclusion
-
It is only python programs that are listening from the port 37 that are
blocked at a certain time.
How is it possible (without firewall enabled) ?
Thanks .
Sebastien.
Dennis Lee Bieber a écrit :
> On 16 Jan 2007 07:39:35 -0800,
running winXP SP2, python 2.4.
Do you have any clues ?
Thanks in advance.
Seb.
PS : I am calling this server from another program and make it run in a
thread.
Below is the standalone version (wich is adpated from effbot site).
import socket
import struct, time
import threading
import os
import
logging.warning(str(message))
elif str(level).lower() =="critical":
logging.critical(str(message))
elif str(level).lower() == "exception":
logging.exception(str(message))
else :
logging.INFO(str(message))
? Thanks in advance.
Seb.
*
The very simple "logging program ":
*
import logging, logging.handlers
import time
def write_log(level, message):
# Utilisation de l'API pour le Handler globa
aking the time to read this mail.
Best regards.
Seb.
--
http://mail.python.org/mailman/listinfo/python-list
different rights).
It seems that RPC call would do the job but I would have liked
something simplier (although I did not tried it).
The best thing would be to have a queue feature that would be be shared
between processes but as far as I know It does not exists in python.
Thanks.
Seb
Do you know
using at the moment do not have any time.sleep(ing).
I am afraid I have still to use an intermediate class between the
computing thread and the gui to send data between the two of them but
now about all the computing time is devoided to the thread.
Thanks a lot !!!
Seb.
ps : the only mod that I
Hi,
I am using pygtk for the first times.
I am wondering what would be the best "pattern" to interface pygtk with
a thread.
The thread is collecting informations (over the network for example) or
is doing some long calculations.
I would like also to separate the gui part to the action part so t
Thank you all for the reply,
**
More tests :
***
1) I tried to input the D-word with the parameters and I did not see
anychanged (checked with process explorer. The limit of the
simultaneous connexion is always 10.
2)
I have applied the patch from
http://www.lvllord.de/?l
ing the TCP/IP connections from my python program at
10 maximum at the same time.
I do not see this limit in my code.
I did not bumped over the 4226 error.
=> Where does this limit come from.
=> How can I overcome it.
Thanks for the advice anyway.
Sebastien.
Ben Sizer wrote:
> seb
.
Ben Sizer wrote:
> seb wrote:
> > I need to write a scanner that test all the IP adresses that repond on
> > a given port.
> ...
> > I am using winXP pro on a 2GHZ P4 and 512 Mo.
>
> If you have XP Service Pack 2, it cripples port-scanning as part of a
>
Hello,
What I need :
I need to write a scanner that test all the IP adresses that repond on
a given port.
The Ip list is of roughly of length 200.
I need to get the response every 60 seconds (or better).
I would prefer first not to use nmap.
Co
Hi,
I have ordered a new Athlon64 PC running linux x86_64.
I'm using Pyro to communicate between python programs running on
different machines.
I know that, because Pyro's communication is based on pickle, that the
different machines have to run the same Python (major) version: that
is, it did not
Thank you very much, Magnus !
This is the answer I had been waiting for:
> A problem as I see it today, is that this behaviour is
> not actively encouraged. The tutorial, which is maintained
> and updated, still describes old style classes, and the
> old division behaviour.
My main point was/is:
Thanks for the replies,
But to point out what the subject of this thread is (sorry for the typo
;-) :
There is a PEP (proposal 238) to change Python so that
5/2 WOULD do the true division -- and obviously break lots of code.
Just type this in your python interpeter:
>>> from __future__ import
Hi,
Is it true that that "Python 3000" is dead ?
Honestly I think that e.g. changing 5/2 to be 2.5 (instead of 2) would
just break to much code :-(
On the otherhand I'm using Python as "Matlab replacement" and would
generally like 5/2 ==2.5
So, I was contemplating to default all my modules/script
Hi,
I have a series of images (either from numarray or from PIL)
After googling if read something about pyMedia...
Can I create an AVI movie from my images with that ? How about
quicktime ?
Thanks,
Sebastian Haase
--
http://mail.python.org/mailman/listinfo/python-list
Does that mean PyOpenGL is based on ctypes ?
I thought is was using SWIG ?
And on that note: I have some (old) SWIG typemaps for numarray arrays
that I'm using for many years.
I was always wondering how difficult it would be for me to add them
into PyOpenGL ?
So far I'm just using my own (one !)
OK,
point taken - maybe what threw me off was the simple fact that there
CAN be NO "ONE standard/default SQL package".
As a newbie in sql I was hoping to find something like e.g. the socket
module (one size fits all)
So: Maybe this could be explained on the "Database Modules" page.
(and again: jus
This was my point though: I found the *description* - but no wordon
WHICH implementation to get WHERE ?
Don't get me wrong - I like Python and I will stick to it for some time
to come ...
but WHY are the places to get those SQL implementations not better
marked:
Just try to google for "python sql"
Hi,
I thought I would quickly write a
"SELECT * FROM ... " line in python ...
... but then I was suprised to find that the only "official" web page I
found was mainly linking to the PEP on HOW the DB API2.0 should look
like.
Then there is a choice of maybe ten modules which more or less all
claim t
70 matches
Mail list logo