On 2023-02-05, ^Bart wrote:
>> xdg-email appears to be for interactive use (it opens the user's
>> "preferred email composer"); I think sendmail would work much better
>> from a script.
>
> Like what I said in another post I think I could use ssmtp than
> xdg-email or sendmail...
>
>> Otherwise,
On 2023-02-05, ^Bart wrote:
>> For example, try to do whatever parts you know how to do and when some part
>> fails or is missing, ask.
>
> You're right but first of all I wrote what I'd like to do and if Python
> could be the best choice about it! :)
I'd say you want a simple shell script wrapp
Hi
I'm new to Python and currently taking part in a Data Science course. Python is
the main coding/programming language for the course. We were guided to download
the Python application through Anaconda which worked. I have been using
Jupyther through a browser to practice Python exercises. Ho
Thank you all. It was unfortunate that it was f since I thought it was
some strange mistaken hex nibble. All very clear and helpful.
On Sun, Oct 6, 2013 at 9:07 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Sun, 06 Oct 2013 20:39:39 -0400, Ned Batchelder wrote:
>
> >
I am very new to python so I'll apologize up front if this is some
boneheaded thing. I am using python and pyserial to talk to an embedded
pic processor in a piece of scientific equipment. I sometimes find the
when I construct the bytes object to write it adds an extra f to the first
byte.
For e
Thankyou this was very helpful
--
http://mail.python.org/mailman/listinfo/python-list
I'm currently using a function pasted in below. This allows me to sum
a column (index) in a list of lists.
So if mylist = [[1, 2, 3], [1, 3, 4], [2, 3, 4], [2, 4, 5]]
group_results(mylist,[0],1)
Returns:
[(1, 5), (2, 7)]
What I would like to do is allow a tuple/list of index values, rather
than
i need to run a python script on any arbitrary server and don't want to do
an actual installation. i figured i could do a clean install on my machine
and install whatever libraries would be needed, then zip them all up for
remote deployment. to avoid bloating, i am wondering which files i can
safel
ok, cut and pasted, but changed the username/password to protect the innocent.
this is from interactive prompt.
let me know if i am still not doing the slashes correctly please.
i doubt authentication is the issue.; i can get pid information using
WQL queries.
objCreateProc.Create expects 4 strings
log("ERROR", "Password reset failed.\n{0}{1} generated the
following error: {2}".format(p4, cmd, stderr))
except OSError as err:
log("ERROR", "Execution failed: {0}".format(err))
Thanks,
Rusty
On Tue, Sep 15, 2009 at 6:37 PM, Chris Rebert
hris Rebert wrote:
> On Tue, Sep 15, 2009 at 5:07 PM, Chris Rebert wrote:
> > On Tue, Sep 15, 2009 at 4:01 PM, Russell Jackson
> > wrote:
> >
> >> Attempted code in Python 3: (Doesn't work either)
> >
> >> cmd = ' passwd {0}'
saw
in the docs, and the fact that it didn't complain about that part, but I'll
try the close():
Thanks,
Rusty
On Tue, Sep 15, 2009 at 4:24 PM, Rhodri James
wrote:
> On Wed, 16 Sep 2009 00:01:17 +0100, Russell Jackson <
> ru...@rcjacksonconsulting.com> wrote:
>
> H
Hi,
I have the following code that works fine in Python 2.x, but I can't seem to
get it to work in Python 3 with Popen. Can you please tell me how to get the
same functionality out of Python 3? The gist of what I doing is in the
setpassword function. I have tried numerous ways to get this to work,
Bruno Desthuilliers wrote:
Tim Greening-Jackson a écrit :
(snip)
You're not going to get anywhere without learning (x)html and css IMHO.
Even using a "graphical" html editor like Dreamweaver requires having a
good enough (IOW : being able to do it all by hand) knowledge of t
Tobiah wrote:
You may enjoy:
http://www.pythonchallenge.com/
It's a blast and a half. To solve the
puzzles you have to write python programs
that do various things.
Thanks for that. I can see that will keep me amused for quote some time.
--
http://mail.python.org/mailman/listinfo/python-li
Hi there.
I've recently learned Python -- but would by no means describe myself as
expert -- and have a couple of "pet" projects I want to do in my spare
time in order to consolidate what I've learned by using it to solve
"real" problems.
I'd like to create a couple of websites on my Mac at
On Jul 28, 6:25 am, alex23 <[EMAIL PROTECTED]> wrote:
> On Jul 28, 12:46 pm, Sera Jackson <[EMAIL PROTECTED]> wrote:
>
> > ok, I know its an over discussed topic. Althought I understand why it
> > is there I cant constantly see it in my argument list in parenthesis
ok, I know its an over discussed topic. Althought I understand why it
is there I cant constantly see it in my argument list in parenthesis.
can someone give me an insight of the cons of a syntax like this:
class Class:
def self.method(arguments):
etc, etc
In other words def method(se
Is there a Python programmer living near Bend Oregon that I could call via
phone & ask some questions on how they accomplish certain tasks? I’ve been
programming using several languages for over fifty years, but am unable to get
Python to due what I would like to do! Papa Jackson
Thanks, Ethan. that was a great solution. i just tested it.
On Fri, May 23, 2008 at 7:08 PM, Ethan Furman <[EMAIL PROTECTED]> wrote:
> davidj411 wrote:
>
> When you save an open file to a variable, you can re-use that variable
>> for membership checking.
>> it does not seem to be that way with
For example,
class A:
def __init__(self,a):
self.a = a
def __eq__(self, other):
return self.a == other.a
class B:
def __init__(self,b):
self.b = b
def __eq__(self, other):
return self.b == other.b
A(1) == B(1)
---> AttributeError: B instance has no attribute a
B
Alexander Schmolck wrote the following on 05/25/2007 02:33 PM:
> I have no idea whether this will resolve your problem, but you could try
> updating to 0.90 (BTW what happens if you do axis([0,128,0,128])).
The problem appears to be with a matplotlibrc file. If I delete the
matplotlibrc file, th
Alexander Schmolck wrote the following on 05/25/2007 02:33 PM:
> (BTW what happens if you do axis([0,128,0,128])).
In [1]: import pylab
In [2]: pylab.axis([0,128,0,128])
In [3]: pylab.show()
---
Traceback (most recent cal
Hi, I'm having some trouble plotting with the following matplotlibrc:
text.usetex : True
I tried clearing the cache files under ~/.matplotlib, but this did not
help the problem. I'd post on the matplotlib mailing list, but I have a
hard enough time browsing sourceforge's achives (frequen
Bill Jackson wrote the following on 04/27/2007 12:49 PM:
> # importtest/test2/__init__.py
> from someclass import *
> from test2 import *
Sorry typo here:
# importtest/test2/__init__.py
from someclass import *
from mytest import *
--
http://mail.python.org/mailman/listinfo/python-list
Once again, I am having issues with imports...
Until now, I thought the general guidelines were to rarely use 'from x
import y' syntax, except when you really want to copy names over.
However, I have run into issues by following this guideline. So...
1) What is going wrong in the example below
Paul Rubin wrote the following on 04/25/2007 10:17 PM:
> Bill Jackson <[EMAIL PROTECTED]> writes:
>> Is there a preferred random library?
>
> Preferred for what? Maybe you want os.urandom().
How about for general usage...I am just asking for a very broad
descript
In random.py (Python 2.5.1), line 86 says:
VERSION = 2# used by getstate/setstate
Then, in the definition of Random.setstate, we have:
if version == 2:
Why is it not:
if version == self.VERSION:
--
http://mail.python.org/mailman/listinfo/python-list
Is there a preferred random library?
scipy.random
random
Besides scipy's library returning ndarrays, is there any other
advantage/disadvantage?
--
http://mail.python.org/mailman/listinfo/python-list
Bill Jackson wrote the following on 04/20/2007 09:48 AM:
> >>> import some_function
>
> >>> a = {1:2,3:4}
> >>> b = {1:2:4:3}
> >>> a.clear()
> >>> a.update(b)
>
> >>> a = {1:2,3:4}
> >>> b = {1
What is the benefit of clearing a dictionary, when you can just reassign
it as empty? Similarly, suppose I generate a new dictionary b, and need
to have it accessible from a. What is the best method, under which
circumstances?
>>> import some_function
>>> a = {1:2,3:4}
>>> b = {1:2:4:3}
Martin v. Löwis wrote the following on 04/19/2007 02:43 PM:
> Bill Jackson schrieb:
>> I have a dictionary of dictionaries where the keys are typically very
>> long tuples and repeated in each inner dictionary.
>
> What I don't understand here: you say the keys are tup
I have a dictionary of dictionaries where the keys are typically very
long tuples and repeated in each inner dictionary. The dictionary
representation is nice because it handles sparseness well...and it is
nice to be able to look up values based on a string rather than a
number. However, sinc
x();
> }
> popMatrix();
>
> The curly brackets have no functional meaning but increase the
> readability significantly.
You are e. e. cummings, and I claim my £5.
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
Every 10 years we say t
Dennis Lee Bieber wrote:
> On Wed, 07 Feb 2007 11:14:39 -0800, Ron Jackson
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>
>>I am using Python 2.5 on Windows XP. I have installed Pyserial and
>>win32all extensions.
>>
>
>
I am using Python 2.5 on Windows XP. I have installed Pyserial and
win32all extensions.
When I try to run the example program scan.py (included below), or any
other program using pyserial, as soon as it hits the statement:
s = serial.Serial(i)
I get the error:
Traceback (most recent call last)
Tim Roberts wrote the following on 12/09/2006 08:27 PM:
> The source code could answer that question for sure, but I doubt that it is
> CaptureMouse doing it, and I know the SetCapture API (which it eventually
> calls) does not. Is it possible that your clicking caused some part of the
> app to be
It seems that the CaptureMouse method sends an EVT_PAINT handler. The
documentation does not mention this...is it somewhere else? Could
someone explain why this handler is sent out?
Also, I've seen:
def OnMouseDown(self, evt):
self.CaptureMouse()
self.x, self.y = self.l
I've got an inheritance question and was hoping brighter minds could
guide me. I am in the strange situation where some of the methods in a
subclass are actually more general than methods in a superclass. What
is the preferred way to handle such situations. My original thought was
to do somethin
Is there a package which provides a VectorSpace object defined over the
Reals, Rationals, Complex, etc? It'd be nice to test membership.
--
http://mail.python.org/mailman/listinfo/python-list
What is the difference between "object is unindexable" and "object is
unsubscriptable"?
I would like to test if an object can accept: obj[0]
>>> from sets import Set
>>> Set([1,2])[0]
TypeError: unindexable object
>>> 3[0]
TypeError: unsubscriptable object
It seems like each of these erro
John Machin wrote the following on 2006-08-14 01:45:
> Here are a couple of thoughts that *might* help:
>
> (1) mix-in i.e. a class can have multiple base classes:
>
> class AntWorker(Animal, Worker):
>
> (2) you can create classes on the fly using the 3-argument form of the
> built-in type() fu
Maric Michaud wrote the following on 2006-08-14 01:26:
> In [28]: class Animal(object) :
>: _types = {}
>:
>:
>
> In [29]: class Worker(object) :
>: def work(self) : print 'hard'
>:
>:
>
[snip]
> What you are trying to achieve is more common
Thanks for the reply.
danielx wrote the following on 2006-08-13 19:49:
> Is your declaration of ABC supposed to have some_super as one of the
> base classes? Your constructor has some_super as a parameter. What is
> this supposed to mean in light of the declaration for ABC?
Indeed, my goal is to
I want a class that will determine its base class by the argument passed
in. What I am about to write _does_not_work_, but it shows what I am
trying to do.
class ABC(some_super):
def __init__(self,some_super):
some_super.__init__(self)
if some_super == list:
underscores].
> and you might want to import sys and check sys.path [the list of
> directories searched by the import mechanism].
>
>
> David Jackson wrote:
>> Hi all,
>>
>> I'm a real beginner with python but have what I think is a simple
>> question.
&
Hi all,
I'm a real beginner with python but have what I think is a simple question.
I am writing some simple modules and would like to place them into a
subdirectory. But then I cannot seem to import them. I have tried the
following.
I wrote a module called fibo.py with some definitions in i
f/types.html
>
> (One item of what type, one might ask)
Good point. ". . .represented by a string of length one" would be
better.
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
An information system based on theory isolated from reality
is bound to fail. - Mitch Kabay
--
http://mail.python.org/mailman/listinfo/python-list
Does anybody know of a tool that will take a module as input, look for
any wildcard imports, and then identify what symbols in the module come
from which wildcard import? It could then expand out the from module
import * to from module import foo, bar. It might need to ask the user
on this, sin
e search box in Google, your AOL or Jabber buddy
> list: all case-insensitive.
Not all URLs. Compare, for example:
http://www.python.org/doc/Summary.html
http://www.python.org/doc/summary.html
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
Those who can make you believe a
only
> user. But are those 10 modules the same 10 modules that other folks
> need? I don't know...
>
> Of course, the only way to find out is to try...
Or you can just look up the module you need to write a 'bot to
constantly look up the
y
> else:
> x -= 1
> y += 1
> add(x, y)
>
> print add(2, 4)
>
> result:
> 6
> None
Perhaps this hint will help:
>>> print add(0,6)
6
6
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
Of course a weed-puller isn&
I would be interested in an alternative approach which does not
generate a ton of intermediate pdfs.
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
It is difficult for men in high office to avoid
the malady of self-delusion.- Calvin Coolidge
--
http://mail.python.org/mailman/listinfo/python-list
turn a new dict with string keys and lists containing the
> previous keys for repeated values.
>
> NewDict = {'This is repeated':['rt','sr'],'This is not':['gf']}
NewDict = {}
for x in Dict.keys():
try:
NewDict[Dic
"Gianluca Sartori" <[EMAIL PROTECTED]> writes:
> What web framework do you suggest to develop with?
I tend to use mod_python.
Phil
--
http://mail.python.org/mailman/listinfo/python-list
Tom Willis <[EMAIL PROTECTED]> writes:
> How are the expert pythoneers dealing with config files?
You could use the cPickle module if you don't mind your config files
being unreadable by humans. There is also the shlex module for more
powerful config file needs:
http://docs.python.org/lib/module
[EMAIL PROTECTED] writes:
> Is there a way to figure out what filename an email object points to
> in a qmail style Maildir directory?
What do you mean bu "email object"? Surely if you are iterating a
Maildir then you should have the filename. Or am I misunderstanding
what you mean?
Phil
--
htt
[EMAIL PROTECTED] (John Machin) writes:
> [EMAIL PROTECTED] (Mark Jackson) wrote in message news:<[EMAIL PROTECTED]>...
> >
> > A: 42
> >
> > Q: What multiple of 7 did I add to the critical expression in the Zeller
> > algorithm so it would remain
Q: What multiple of 7 did I add to the critical expression in the Zeller
algorithm so it would remain nonnegative for the next few centuries?
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
People who write obscurely are either unskilled in writing
or up to mischie
7;ll just have to put
> up with the ambiguities. Or perhaps, given my (lack of) typing skill, I
> should just start signing myself "Stvev"?
What's this doing *here*? I thought the discussion of the pitfalls of
name rebinding was taking place in the "variable declaration&q
> the re class for example.
>
> Somebody called O'Reilly taught you that Python has "standard
> classes", one of which is "re"??? Hmmm, can't have been O'Reilly the
> publisher; must have been O'Reilly the builder.
Or possibly O'Reilly
61 matches
Mail list logo