from here:
https://github.com/Rapptz/discord.py I’ve tried the 3 commands in the
Installing section and I’ve tried pip install discord.py.
Thanks,
Hamish
--
https://mail.python.org/mailman/listinfo/python-list
for such a message but what the hey.
Hamish
--
--
https://mail.python.org/mailman/listinfo/python-list
I need to run a cmd line app from python whose run time can vary from a
fraction of a second to minutes. I need to be able to tell whether the process
is still waiting, or whether it has stalled - and this is farily easily done by
keeping an eye on whether its writing to stdout or not. The pro
so I'm trying to wrap some functionality around execfile but don't want to
modify the way it works. specifically when you call execfile, it automatically
grabs globals and locals from the frame the execfile exists in.
so if I wrap execfile in a function, I need a way to reliably get at the
cal
I actually have no idea what ur talking about... aren't conversations threaded
by subject?
-Original Message-
From: python-list-bounces+hamish=valvesoftware@python.org
[mailto:python-list-bounces+hamish=valvesoftware@python.org] On Behalf Of r
Sent: Friday, January 02,
>> You could also use a dict with type:method key/value pairings. This is
>> closer to a switch/case than an if...elif chain is.
of course, that's a great idea...
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
sometimes I want to be able to initialize an instance with a variety of
different data types.
as an obvious example I might want to initialize a 4x4 matrix with either 16
floats, a list/tuple or 16 floats, another matrix or a quaternion.
is there any other way to do it other than putting case s
I want to write a Vector class and it makes the most sense to just subclass
list. I also want to be able to instantiate a vector using either:
Vector( 1, 2, 3 )
OR
Vector( [1, 2, 3] )
so I have this:
class Vector(list):
def __new__( cls, *a ):
try:
print a
I want to write a Vector class and it makes the most sense to just subclass
list. I also want to be able to instantiate a vector using either:
Vector( 1, 2, 3 )
OR
Vector( [1, 2, 3] )
so I have this:
class Vector(list):
def __new__( cls, *a ):
try:
I have this class:
class Vector(object):
TOL = 1e-5
def __eq__( self, other, tolerance=TOL ):
print tolerance
shortened for clarity obviously. so I want to subclass this class like
so:
class BigVector(Vector)
TOL = 100
for example if I was working with large vector
so I'm trying to create a class that inherits from str, but I want to
run some code on the value on object init. this is what I have:
class Path(str):
def __init__( self, path ):
clean = str(path).replace('\\','/')
while clean.f
fatal, but otherwise nothing
is executed until EOF.
So the answer to my question is to run:
$ ssh localhost python -ui
Best wishes,
Hamish
On Feb 13, 2008 4:20 PM, Hamish Allan <[EMAIL PROTECTED]> wrote:
> Further to my query about trying to make Python run unbuffered, I have
> discove
rror) does not:
$ ssh localhost python -u
pront
[^D]
Traceback (most recent call last):
File "", line 1, in
NameError: name 'pront' is not defined
$
Can anyone tell me why?!
Thanks,
Hamish
On Feb 13, 2008 1:12 AM, Hamish Allan <[EMAIL PROTECTED]> wrote:
> Hi,
&g
27;)
sys.stdout.flush()
[^D]
hello, world
$
Again, nothing happens until I send the EOF. How can I get Python to
run over SSH unbuffered?
Thanks,
Hamish
--
http://mail.python.org/mailman/listinfo/python-list
Thanks worked Perfectly
On Dec 13, 9:32 am, [EMAIL PROTECTED] wrote:
> On Dec 12, 3:10 pm, Hamish <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hey
>
> > I'm new to python, but I have used a fair bit of C and Perl
>
> > I found Perls regex'
Hey
I'm new to python, but I have used a fair bit of C and Perl
I found Perls regex's to be very easy to use however I don't find
Pythons regexes as good.
All I am trying to do is detect if there is a number in a string.
I am reading the string from an excel spread sheet using the xlrd
module
On Aug 21, 5:07 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hey all,
>
> I've been usinglibgmailto send out automated notification emails for
> my company's nightly regression testing. Last night these emails
> started failing, though the python code has not changed. I updated to
> the l
tc/syslog.conf or
equivalent on your system.
Hamish
--
http://mail.python.org/mailman/listinfo/python-list
27;t necessarily want to disable substitution, I just want transparent
handling of lone %s.
Since SafeConfigParser.get() is fussy about the format of interpolation
instructions, SafeConfigParser.set() can safely know when you're not
trying to use them and escape lone percents.
To summarise: set(
), causing a get()
to fail just the same later.
> While I think you have technically pointed out a potential bug, I'm
> not sure why it matters. Such a bug only comes about for (IMHO) flawed
> use cases.
Sorry, that's incorrect.
Hamish
--
http://mail.python.org/mailman/listinfo/python-list
.py", line 634, in _interpolate_some
"'%%' must be followed by '%%' or '(', found: %r" % (rest,))
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or
'(', found: '%there'
ConfigParser does not do this:
>>> y=ConfigParser.ConfigParser()
>>> y.add_section('test')
>>> y.set('test', 'a', 'hi%there')
>>> y.get('test', 'a')
'hi%there'
Should SafeConfigParser.set() be escaping automatically?
Hamish
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> On Jun 7, 2:15 pm, Hamish Moffatt <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> Hello all,
>>> I have two integers and I want to divide one by another, and want to
>>> get an integer result which is the higher
easier solution other than int(math.ceil(float(3)/2))
The normal solution is to add (divisor-1) to the dividend before division.
Ie ceil(3/2) = floor((3+(2-1))/2) = 2. Correct.
But ceil(4/2) = floor((4+(2-1))/2) = 2 also. Correct.
Hamish
--
http://mail.python.org/mailman/listinfo/python-list
; perhaps it
allows it.
TLS Lite on to of M2Crypto? Something else again?
Thanks
Hamish
--
http://mail.python.org/mailman/listinfo/python-list
A sexy design?
But yes, there are quite a few out there.
--
http://mail.python.org/mailman/listinfo/python-list
25 matches
Mail list logo