Re: Redirecting to a third party site with injected HTML

2013-06-09 Thread Ian
he problem you are trying to solve? Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-27 Thread Ian
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

Re: Encapsulation, inheritance and polymorphism

2012-07-17 Thread Ian
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

Help needed installing easy_install and lxml2

2012-08-15 Thread Ian
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

Re: Help needed installing easy_install and lxml2

2012-08-16 Thread Ian
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

Want to improve my code.

2012-02-09 Thread Ian
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

Re: Guide to: Learning Python Decorators

2012-02-09 Thread Ian
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

Re: how to avoid leading white spaces

2011-06-06 Thread Ian
would have to be walked anyway. Or am I misunderstanding something. Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Any Better logic for this problem..

2011-06-09 Thread Ian
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

How to get return values of a forked process

2011-06-21 Thread Ian
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',('/

Re: How to get return values of a forked process

2011-06-21 Thread Ian
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

Re: web browsing short cut

2011-07-06 Thread Ian
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

Re: changing to function what works like a function

2011-03-07 Thread Ian
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

Re: Absolutely Insane Problem with Gmail

2011-03-07 Thread Ian
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

Re: Don't Want Visitor To See Nuttin'

2011-03-09 Thread Ian
don't say what framework you are using. Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Deadlock and a rather weird stacktrace

2011-03-10 Thread Ian
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

Re: Questions about GIL and web services from a n00b

2011-04-17 Thread Ian
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

Re: checking if a list is empty

2011-05-11 Thread Ian
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

Re: checking if a list is empty

2011-05-22 Thread Ian
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

Re: Anaconda Navigator : Add App

2018-01-01 Thread Ian
Anaconda is v3.6 very 2017'ish by now... ;-) -- https://mail.python.org/mailman/listinfo/python-list

Re: ctypes NULL pointers; was: Python To Send Emails Via Outlook Express

2005-01-02 Thread ian
Thanks again Lenard!! -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes NULL pointers; was: Python To Send Emails Via Outlook Express

2005-01-03 Thread ian
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

Re: Help! Host is reluctant to install Python

2005-01-30 Thread Ian
>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

Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
;[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

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
lp. Thanks in advance Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
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.. -

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread ian
,"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

Re: Windows XP - cron or scheduler for Python?

2004-12-23 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread ian
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

Re: Python To Send Emails Via Outlook Express

2004-12-25 Thread ian
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

Re: Windows XP - cron or scheduler for Python?

2004-12-26 Thread ian
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

Re: Python 3 regex?

2015-01-12 Thread Ian
'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

Re: Deep vs. shallow copy?

2014-03-13 Thread Ian
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

python.org appears to be down

2011-10-16 Thread Ian
Hopefully someone who can do something about it will read this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need some help here

2006-09-22 Thread ian
"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

Problem with time

2007-03-22 Thread ian
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

Re: Problem with time

2007-03-23 Thread ian
"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

sys.excepthook and threads

2007-03-27 Thread ian
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

list property fires get on append

2008-01-05 Thread ian
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

style question - hasattr

2008-04-08 Thread ian
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

Re: SQLite3 and lastrowid

2010-11-16 Thread Ian
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

Re: SQLite3 and lastrowid

2010-11-16 Thread Ian
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

Re: Collect output to string

2010-11-23 Thread Ian
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

Re: Style question for conditional execution

2010-11-24 Thread Ian
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

Re: Packages at Python.org

2010-12-01 Thread Ian
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

Re: Google AI challenge: planet war. Lisp won.

2010-12-02 Thread Ian
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

Re: win32com pythonwin extensions part of stdlib?

2010-12-07 Thread Ian
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

Re: Collision of rotated rectangles without pygame

2010-12-07 Thread Ian
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

Re: continuing development on modules after they're installed

2010-12-10 Thread Ian
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

Re: surprised by import in python 2.6

2010-12-10 Thread Ian
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

Re: while True or while 1

2010-12-16 Thread Ian
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/

Re: Convert arbitrary function inputs to string

2011-01-06 Thread Ian
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

Re: Convert arbitrary function inputs to string

2011-01-06 Thread Ian
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

Re: PEP: possibility of inline using of a symbol instead of "import"

2011-01-06 Thread Ian
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

Re: type of methods of builtin exceptions

2011-01-06 Thread Ian
.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

Re: python only prints integers

2011-01-06 Thread Ian
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.

Re: Nothing to repeat

2011-01-09 Thread Ian
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

Re: Nothing to repeat

2011-01-09 Thread Ian
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&

Re: Help needed with unittest and global

2011-01-09 Thread Ian
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

Re: WxPython versus Tkinter.

2011-01-25 Thread Ian
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

Re: Style question: Nicknames for deeply nested objects

2011-01-30 Thread Ian
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

Re: Create classes at runtnime

2011-02-04 Thread Ian
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

Re: Create classes at runtnime

2011-02-04 Thread Ian
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_

Re: Are Small Dogs Good with Kids?

2011-02-06 Thread Ian
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

Re: splitting by double newline

2011-02-07 Thread Ian
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

Re: Arrays/List, filters, Pytho, Ruby

2011-02-11 Thread Ian
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

Re: Problems of Symbol Congestion in Computer Languages

2011-02-21 Thread Ian
ation which took 10 foot of shelf space to house. Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: python and parsing an xml file

2011-02-22 Thread Ian
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

Re: Python fails on math

2011-02-22 Thread Ian
different approximations to numbers that they cannot express exactly. Regards Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: non-uniform distribution

2010-06-12 Thread Ian
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

Re: a +b ?

2010-06-14 Thread Ian
.NET from Iron Python anyone? Regards Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Where is StackPanel in IronPython / .Net 4?

2010-06-27 Thread Ian
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

Re: Is This Open To SQL Injection?

2010-07-07 Thread Ian
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

Re: Visitor pattern and separating iteration

2010-07-22 Thread Ian
gards Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Smith-Waterman Algorithm in Python

2010-08-07 Thread Ian
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: Newbie question - calculating prime numbers

2010-08-10 Thread Ian
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

Re: Iterative vs. Recursive coding

2010-08-21 Thread Ian
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

Re: Iterative vs. Recursive coding

2010-08-21 Thread Ian
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

Re: adodbapi help needed

2010-08-24 Thread Ian
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

Re: palindrome iteration

2010-08-27 Thread Ian
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(

Re: palindrome iteration

2010-08-28 Thread Ian
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

Re: Performance: sets vs dicts.

2010-08-31 Thread Ian
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

Re: Help needed with Windows Service in Python

2010-09-02 Thread Ian
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

Re: MySQL Problem

2010-09-02 Thread Ian
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

Re: Help needed with Windows Service in Python

2010-09-02 Thread Ian
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

Re: MySQL Problem

2010-09-03 Thread Ian
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

Re: Help needed with Windows Service in Python

2010-09-03 Thread Ian
and stops properly. Regards Ian -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >