he problem you are trying to solve?
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 27/06/2013 11:52, rusi wrote:
On Thursday, June 27, 2013 12:35:14 PM UTC+5:30, Russel Walker wrote:
On Thursday, June 27, 2013 6:19:18 AM UTC+2, Thrinaxodon wrote:
I was hoping to have a good laugh. :|
Although I wouldn't call it hostile.
I think the python community is being educated in
t;= b: . . .'
No worries, I'm sure your unittests would have caught it. ;)
~Ethan~
Wouldn't the compiler have caught it before the unittests? :-)
Silly me, the word processor would have caught it!
~Ethan~
No compiler can find as many faults as publishing your code on a mailing
the instructions at
http://lxml.de/installation.html#installation
This ends with:
Processing lxml-2.3.5.tgz
Running lxml-2.3.5\setup.py -q bdist_egg --dist-dir
c:\users\ian\appdata\local\temp\easy_install-9__rq7\lxml-2.3.5\egg-dist-tmp-uj_v_2
Building lxml version 2.3.5.
Building without Cython
On 16/08/2012 08:01, Stefan Behnel wrote:
http://lxml.de/FAQ.html#where-are-the-binary-builds Stefan
Hi Stefan,
Thanks Stefan, everything is working fine now.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
It troubles me that there is so much repetition in the lines that call
joiner.
How can I improve the code?
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
its source.
c) Must contain the cover image.
As a *very* rough guess, that means the files expands to 344K.
Remove the cover image at 250-300kb leaves 44 to 94KB
That is 8700 words to 18400 words or approx 25 to 50 pages.
But that is *very* *very* rough.
Regards
Ian
--
http
would have to be
walked anyway.
Or am I misunderstanding something.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
goes into
next iteration with 5
25 // 5 is 5 so factors become (2,5) and 5 into next iteration with 5
5 // 5 is 1so factors are (2,5,5) and computation complete.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I need some helped with forking. In my script, I fork a process. I
want to get return values from the child process.
This is the script that does the forking:
for x in (mylist):
pid = os.fork()
if pid:
pidList.append(pid)
else:
os.execv('/usr/bin/python',('/
On Jun 21, 1:54 pm, Ian Kelly wrote:
> On Tue, Jun 21, 2011 at 12:26 PM, Ian wrote:
> > myForkedScript has code like this:
> > if fail:
> > os._exit(1)
> > else:
> > os._exit(os.EX_OK)
>
> > Is using os._exit() the correct way to get a
direction? Here is what I came up
with so far..
I suggest you create a dummy page on your disk with an onload event that
uses javascript to open, size and load all the windows you want.
Then create a short cut to the dummy page.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python
complex numbers might change
(there isn't), and if that would mean that z.real and z.imag could not
work (it doesn't), then
z.real() and z.imag() might be an improvement. As there is no such
risk, the current syntax is as good as it can get.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 06/03/2011 13:56, Victor Subervi wrote:
gmail, for whatever reason, filters out emails send to the same
address from which they are sent.
Its possibly a protection against circular forwarding.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
don't say what
framework you are using.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
matters - the thread will die or return to the pool
when its run() exits, and the extra stack is used only by the creating
thread, and
not the new threads.
It might also be that anything above the first run() call is reported
incorrectly when dumped from another thread.
Have you checked
y 2 cores can be slower than one.
(The overhead
of starting the second thread, finding it can't get the GIL and closing
down again).
5) Even in CPython, I/O-bound processes are not slowed significantly
by the GIL. It's really CPU-bound processes that are.
Its ONLY when you have t
a party and invite nobody.
What kind of building is one with zero floors?
Would you have an Aircraft Carrier with no aircraft?
Oh Wait - the UK has one of those coming into service soon.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 12/05/2011 04:51, Chris Angelico wrote:
On Thu, May 12, 2011 at 7:02 AM, Ian wrote:
In the "real world" lists of zero items do not exist.
You don't go shopping with a shopping list of zero items.
Actually, yes you do. You maintain your shopping list between trips;
wh
Anaconda is v3.6
very 2017'ish by now...
;-)
--
https://mail.python.org/mailman/listinfo/python-list
Thanks again Lenard!!
--
http://mail.python.org/mailman/listinfo/python-list
Hi Lenard
Hopefully I have understood you properly.
The updated script is now as follows, or you can download it from
http://www.kirbyfooty.com/simplemapi.py
Thanks again for all your help!!!
Kindest regards
Ian Cook
>you find one that you like, post it here, I'm interested in this myself.
I'm very happy with uml from tummy.com for 25 USD/month, with good
support by email for configuring mod_python in my case. They are also
a Pycon sponsor.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
uot;[EMAIL PROTECTED]"
s.To = "[EMAIL PROTECTED]"
s.Subject = "The subject"
s.Send
... but nothing happens.
What am I doing wrong? Does anyone have some sample code to share with
me please?
Thank you!
Ian Cook
(freeware author of Kirby Alarm And Task Scheduler ww
Hi Ganesan
I tried changing s.Send to s.Send(). It now comes up with an exception
error..
The details are below.
Ian
Traceback (most recent call last):
File
"C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
line 307, in RunScript
debugger.run(codeObject
eally
impressed with the power of Python. It seems just about anything you
can think of is there already so I know th eanswer is out there
somewhere!
Can this be done using Python? Does anyone have a sample script please?
Pretty please??
Ian
--
http://mail.python.org/mailman/listinfo/python-list
llent
There has to be a way for Python to send emails via Outlook Express
Kind regards
Ian
PS Here is the working script for sending emails via SMTP..
-
# Import smtplib for the a
;[EMAIL PROTECTED]")
s.To = "[EMAIL PROTECTED]" (was
"[EMAIL PROTECTED]")
s.Subject = "The subject"
s.Send()
My problem is thought, the message is still not being sent via Outlook
Express.
What am I missing?
Thanks again for your
Hi Ganesan
Wow, I'm REALLY impressed with the high level of support in this forum.
(Another great reason to continue learning Python
I tried what you suggested.
After trying a different from/to address the message is sent. But it is
NOT sent via Outlook Express.
I would appreciate any other sug
ild up a suite of
useful utilities and therefore try an keep the program size relatively
small.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hi Max,
Thanks for the suggestion. I'm always open to new ideas.
Can you please tell me how to retrieve the default account settings
from Outlook Express?
Ian
--
http://mail.python.org/mailman/listinfo/python-list
lp.
Thanks in advance
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Heavy sigh...
==
This script WILL send the email
import win32com.client
s = win32com.client.Dispatch('CDO.Message')
c = win32com.client.Dispatch('CDO.Configuration')
cdoSourceOutlookExpress = 2
c.Load(cdoSourceOutlookExpress)
s.Configuration = c
s.From = "[EMAIL PROTECTED]"
s.To = "[EMAIL P
That sound really promising. Is there any chance you could forward me a
copy of the script. I'm still very new to Python and it would help me a
lot.
Thanks again
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hi Lenard,
Absolutely fantastic!!
That worked like a charm.
Now onto adapting it to send attachments.
Thanks again
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hi Lenard,
Absolutely fantastic!!
That worked like a charm.
Now onto adapting it to send attachments.
Thanks again
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hi Lenard,
As the risk of severely embarassing myself can I ask for your help one
more time.
I have tried changing your script to include attachments, but guess
what, (and this should come as no suprise) I can't do it.
So
Here is my feeble attempt at changing the script..
-
,"The Subject","The
body","c:\ian\ian.txt")
nFileCount 14
Traceback (most recent call last):
File "", line 1, in ?
File "simplemapi.py", line 111, in SendMail
raise WindowsError, "MAPI error %i" % rc
WindowsError: MAPI error 2
This
e included wherever there are spaces in the command
line)
"C:\Python23\python.exe" "d:\mypython\Say Time.py"
Have a great Christmas!
God bless
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hi Lenard,
You just beat me to it.
Suprise, suprise, I discovered the answer myself this time.
I have modified the script to allow the attachment(s) to still be
passed as a string.
Some error checking is also done to verify the attachment file exists.
I have also modified it so it can be used for
I wish I new why google doesn't show nicely aligned python code when
you paste the script.
Anyways, in case this helps someone else you can download the script
from
http://www.kirbyfooty.com/simplemapi.py
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hey guys, I'm just thankful the answer has been found and hope this
helps someone else. To everyone (especially Lenard) that responded to
my request for help, thank you!!
Merry Christmas everyone!!!
God bless
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hi David,
I'd be happy to post it to python-win32 but don't know how.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Hi Esmail,
Kirby Alarm is written in Clarion.
Sorry, but I want to keep the source code to myself.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
'Some people, when confronted with a problem, think "I know, I'll use
regular expressions." Now they have two problems.' - Jamie Zawinski.
Regards
Ian
--
https://mail.python.org/mailman/listinfo/python-list
Constant/Variable |
| Data Structures | Mutable| Immutable |
| Loop primitive | Recursion | Iteration |
| World is| In time| Timeless (Platonic) |
Small typo I think in that the looping Primitives are switched about?
Regards
Hopefully someone who can do something about it will read this.
--
http://mail.python.org/mailman/listinfo/python-list
"Frank Drackman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
:
: "Kareem840" <[EMAIL PROTECTED]> wrote in message
: news:[EMAIL PROTECTED]
: > Hello. Unfortunately, I am in need of money to pay my credit card
: > bills. If you could spare just $1, I would be grateful. I have a Pay
Hi,
i have a problem with time in python.
1) i got 2 values from mysql db (fields are "time" type)
2) python get it as "" (why timedelta???)
3) i need to compare 2 fields with actual time ... EG:
if ArrOutputsAuto[i].TimeFrom >= GNow and ArrOutputsAuto[i].TimeTo <= GNow:
i need actual time, and
"Steve Holden" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> import time
> import datetime
>
> dbtd =
> h, m, s = time.localtime()[3:6]
> timenow = s + (60 * (m + 60 * h))
Look like ok, thanks all :)
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
sys.excepthook don't work if an exception come in a thread...
It's normal or its a bug ? There are any tip ? look here :
http://spyced.blogspot.com/2005_06_01_archive.html
Thx
--
http://mail.python.org/mailman/listinfo/python-list
I've created a class that has a property which points at a private
list. When I try to use the append() function on this list property,
the fget method is fired rather than the fset method. If I directly
set my property to a literal list, the set method fires.
Here's a stripped down version of m
In old python code i would use 'has_key' to determine if an element
was present in a dictionary.
Python 3.0 will even removed 'has_key'. The reason for removal is that
using the 'in' operator is a cleaner syntax and having two ways to
achieve the same result is against the principle of the languag
cursor.
But perhaps this is not what you're actually trying to do. I can't
tell, because I haven't seen the code.
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
keys. But it's unreliable and
only available immediately after an insert, so don't do it that way.
The proper way to get the number of rows is to use the COUNT aggregate
function, e.g., "SELECT COUNT(*) FROM TABLE1", which will return a
single row with a single col
whole would be a bit more Pythonic if written as a
decorator IMO, but that's your call.
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
on is clearer, so I would nearly always go
with that. The rare exception would be if I were genuinely interested
in capturing the value of "v" if it evaluated false. I can't remember
the last time that was the case.
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 1, 1:38 pm, "kirby.ur...@gmail.com"
wrote:
> http://packages.python.org/dbf/
>
> So how *do* you get source code from such a web place? I'm not
> finding
> a tar ball or installer. Sorry if I'm missing something obvious, like
> a link
> to Sourceforge.
That site only contains documentati
nd
> > it)
>
> > Xah ∑http://xahlee.org/☄
>
> this game is very cool and it's hard ..
> arghhttp://www.galcon.com/flash/play.php
For what it's worth, I recollect that the original GalCon was written
in Python as part of one of the PyWeek competitions. ;-)
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 7, 11:02 am, harijay wrote:
> Hi I am using Python 2.6.5 on Windows.
>
> I wanted to start using the win32com extensions which I understand are
> "essentially part of the stdlib" ( quoted
> inhttp://tgolden.sc.sabren.com/python/win32_how_do_i.html)
> Since I didnt have the extensions as st
all angles will be an
integer number of degrees. One could add precision, but looking up
specific float values in a dict is dicey, so then one has to switch to
decimal math, and that's going to add extra overhead -- probably
enough to tip the scales in favor of math.sin.
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
y get
the development version is to add it to the *beginning* of sys.path:
sys.path.insert(0, '/path/to/development/directory/')
This process can be simplified further by putting it in a
PYTHONSTARTUP script.
HTH,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
l the variables exported by the
module test and bind them using the same names in the main namespace.
Thus "a" and "test.a" refer to the same int; and "f" and "test.f"
refer to the same function, but they are not the same variables. When
you rebind the na
On Dec 16, 4:34 pm, "BartC" wrote:
> def p2(n):
> p=1
> whileTrue:
> if n<=p: return p
> p<<=1
> return 0
>
> for i in xrange(100):
> x=p2(i)
>
> p2() calculates the smallest power of 2 >= it's operand.
def p2(n):
return 1 << n.bit_length()
--
http://mail.python.org/mailman/
omething else? It's not clear from your examples, which use invalid
syntax.
If you're looking for something like the "quote" form from Lisp, you
can't really do that in Python. Just use a string.
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
ng you need to do. So this:
"(print \"Hello\\n\")"
becomes this:
r"""(print "Hello\n")"""
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
eature
> for what is effectively already possible with the language as it
> exists?
Isn't "Python's use of @ for decorators" a "language bloating feature
for what [was] effectively already possible with the language as it
[existed]?" ;-)
Cheers
.html?highlight=__reduce__#object.__reduce__
Another good place to start would be:
http://docs.python.org/reference/datamodel.html#special-method-names
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 6, 3:49 pm, francesco wrote:
> I'm pretty new in Python language. I have a problem with numbers: it
> seems python doesn't know any more how to count!
> I get only the down rounded integer
> 20/8 = 2
> 8/3=2
> I probably changed some option to round the numbers, but I don't
> remember how.
what i should do? Do i have to bite the bullet and
apply some cleverness in my pattern generation to avoid situations
like this?
Thanks,
tom
I think you want to anchor your list, or anything will match. Perhaps
re.compile('/^(spa(m)+)*$/')
is what you need.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 09/01/2011 17:49, Ian wrote:
I think you want to anchor your list, or anything will match. Perhaps
My bad - this is better
re.compile('^((spa)*(m)*)+$')
search finds match in 'spa', 'spaspaspa', 'spammmspa', '' and 'mmm&
On 09/01/2011 19:53, Dave Angel wrote:
On 01/-10/-28163 02:59 PM, Ian Hobson wrote:
Hi all,
I am trying to develop a PyQt application, and I want to unittest it.
snip
D:\work\ian>python testAll.py
E
==
ER
ey can get ornery about duplicates at times.
Are you referring to ticket #14081? I expect the reason this hasn't
been addressed is because nobody has submitted a patch or suggested an
improved wording. If you were to make a suggestion, I doubt that
anybody would be hostile to the idea of impro
ect
to it can issue the correct commands.
Then you tell some to do Somthing by writing
some.takeMeaningfullAction()
and it all happens "under the covers".
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
sically work, but since you're subclassing the
Django ModelForm, note that it already has its own metaclass:
>>> django.forms.ModelForm.__class__
So you will need to either subclass ModelFormMetaclass for your
metaclass and override the __init__ method, or modify what Peter
posted like so:
>>> C = django.forms.ModelForm.__class__("VirtualUserLimitForm",
>>> (django.forms.ModelForm,), dict(a=1, b=lambda self: 42))
Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 4, 5:49 pm, Steven D'Aprano wrote:
> Just add in the class attributes you want after creating the class.
>
> class VirtualUserLimitForm(ModelForm):
> pass
>
> f = forms.CharField # alias for brevity
> for name, value in [
> ('swap_limit', f(max_length=100, initial=monitor1.default_
On Feb 7, 12:19 am, Bob Martin wrote:
> You cannot generalise. It depends on how they are brought up.
> My two terriers absolutely love children.
Please don't reply to spam.
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 7, 10:43 am, Nikola Skoric wrote:
> Hello everybody,
>
> I'd like to split a file by double newlines, but portably. Now,
> splitting by one or more newlines is relatively easy:
>
> self.tables = re.split("[\r\n]+", bulk)
>
> But, how can I split on double newlines? I tried several approache
On Feb 11, 2:24 pm, "LL.Snark" wrote:
> Hi,
>
> I'm looking for a pythonic way to translate this short Ruby code :
> t=[6,7,8,6,7,9,8,4,3,6,7]
> i=t.index {|x| xhttp://mail.python.org/mailman/listinfo/python-list
ation which took
10 foot of shelf space to house.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
ce or they can't coordinate format changes. Even then
it is slow and verbose.
Use the config module if the configuration is simple to moderately complex.
Consider JSON or Python (source) if your requirements are really
complicated.
Regards
Ian
--
http://mail.python.org/mailman/listi
different approximations to numbers that they cannot express
exactly.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
question is "No", and the reason is that your
requirement is impossible.
Whatever distribution you choose - and you have not said what you
require - will be altered by any scaling to meet the constraint that the
total is 1.
What exactly are you trying to achieve?
Regards
I
.NET from Iron Python anyone?
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
aspx>
*Assembly:* System.Windows (in System.Windows.dll)
^^^
End quote
So I write
clr.AddReference('System.Windows')
and it errors - Could not add reference to System.Windows
So clearly I still don't understand something rather basic.
More help please.
Thanks
Ian
--
http://mail.python.org/mailman/listinfo/python-list
riate routine to make whatever has been
entered into storable data and not part of the sql statement.
In php this is mysql_real_escape_string(). In your favourite language
there will be an equivalent.
If you miss just one occurrence its like leaving the side window
unlocked! Someone will
gards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
he OP questions or your reply.
Daniel - you are no help at all, and no funny.
Ian
--
http://mail.python.org/mailman/listinfo/python-list
re confused.
A candidate is only prime if it is not divisible by *any* number other
than 1 or itself.
Two hints for efficiency:
If candidate has a factor, one of those factors MUST be <= square root
of candidate - so you don't need to loop through so many.
If x is prime, all multiples
teaching and coaching methods and cultural
expectations will
prove more fruitful that looking at differences between learners.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
rogram did more than
the old, ran faster,
was many fewer source lines and was easier to test, so it was really
profitable to write - and
the customer was delighted. :)
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 24/08/2010 18:08, Emile van Sebille wrote:
On 8/24/2010 8:25 AM Ian Hobson said...
Hi all,
I am just starting to learn Python and I have a setup problem - I think.
Python 3.1.
def connect(connection_string, timeout=30):
I expected that to be called.
What have I missed?
The
On 27/08/2010 09:53, Baba wrote:
level: beginner
the following code looks ok to me but it doesn't work. I would like
some hints as to where my reasoning / thought goes wrong
def i_palindrome(pal):
while len(pal)>1:
if pal[0] == pal[-1]:
pal=pal[1:-1]
return True
print i_palindrome(
going on and why at a cost of very little code.
Very helpful to the maintenance programming in 18 months time!
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 31/08/2010 15:09, Aahz wrote:
I suggest that we should agree on these guarantees and document them in
the core.
I suspect that documenting them will be the easy part ;)
--
http://mail.python.org/mailman/listinfo/python-list
On 02/09/2010 18:03, David wrote:
Il Thu, 02 Sep 2010 16:22:04 +0100, Ian Hobson ha scritto:
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
You may try to give a WaitHint parameter to ReportServiceStatus call,
otherwise the Service Manager will expect the service is stopped
data contains bytes
that are invalid in the character encoding you are using in python.
4) The python field type used for some column in the missing row,
contains a value that cannot be held in the python variable assigned.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
On 02/09/2010 20:06, Edward Kozlowski wrote:
On Sep 2, 10:22 am, Ian Hobson wrote:
Hi All,
I am attempting to create a Windows Service in Python.
I have the framework (from Mark Hammond and Andy Robinason's book)
running - see below. It starts fine - but it will not stop. :(
net
ding as the data moves between disk,
MySQL link or Python.
(1) There are some minor human languages that cannot be encoded -
usually because no written form has yet been devised or the code points
have not been agreed. These languages will not be met in practise.
Regards
Ian
--
http://mail.py
and stops properly.
Regards
Ian
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 3944 matches
Mail list logo