Ruby with Netbeans question!

2008-02-24 Thread Steve
it keeps running the `main project` which might be an earlier prog I have written??. I`m sure the solution is staring me in the face but would be grateful for any tips folk could provide. Cheers Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Ruby with Netbeans question!

2008-02-24 Thread Steve
On Feb 24, 11:26 am, Steve <[EMAIL PROTECTED]> wrote: > Hi all > Hope I`m ok posting a Netbeans query here?. I`m trying to learn Ruby > using the Netbeans IDE. It seems a pretty slick application but I`m > wondering if its possible to run a prog without creating a `new > p

Please help to play 5 jpegs as a slideshow in JES(Jython) --- BEGINNER.

2009-02-01 Thread steve
Hello, I am a brand brand new programming student in Jython and I have been working on a simple homework assignment in JES for the last 12 hours and am completely lost. Basically, we have to make a jpeg slideshow with 5 different pictures with audio background that lasts 60 seconds. I have absolut

How to setup pythonpath in Ubuntu8.04

2008-10-06 Thread Steve
Ubuntu8.04 wrapped python25 and set python25 as default python path in the shell.Now I want upgrade to python26,how I set up python26 as default python path?Thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

pyAmazon

2008-04-07 Thread steve
Anyone familiar with pyAmazon ( the latest for AWS 4.0 ), who knows why the ItemSearch echo's the XML that is retrieved ? My statement is products = ecs.ItemSearch("Duma Key", SearchIndex='Books') And the "products" list is populated okay, however before my script ends ( executing script on DOS c

Re: pyAmazon

2008-04-07 Thread steve
I noticed it's happening at the line that does the parsing: dom = minidom.parse(usock), in pyaws/ecs.py I'll look into how to turn off the outputting. On Apr 7, 4:20 pm, steve <[EMAIL PROTECTED]> wrote: > Anyone familiar with pyAmazon (

Re: Python graphical library

2008-09-24 Thread Steve
On Sep 24, 7:31 pm, [EMAIL PROTECTED] wrote: > Hi all, > > I am looking for a python graphical library that would allow me to > draw borderless windows, sort of like a notification frame showing up. > I would also like to be able to make it transparent but I suppose that > is very much desktop mana

Stopping a Thread with Time Slicing

2008-10-02 Thread Steve
Hi All, I've been trying to come up with a good way to run a certain process at a timed interval (say every 5 mins) using the SLEEP command and a semaphore flag. The basic thread loop was always sitting in the sleep command and not able to be interrupted. When the time came to set the semaphore fl

Re: Stopping a Thread with Time Slicing

2008-10-03 Thread Steve
nt loop = 6 13:03:22 : current loop = 7 13:03:42 : ** Doing Work 13:03:42 : my_function running... 15 13:03:57 : current loop = 8 13:04:32 : current loop = 9 13:04:32 : Call Thread Stop 13:04:32 : * Stopping Thread 13:04:32 : ** Thread Has STOPPED! 13:04:32 : Done! On Oct 2, 4:40 pm, T

Re: Tried Ruby (or, "what Python *really* needs" or "perldoc!")

2006-03-14 Thread Steve
I have found the Python sidebar VERY helpful: http://projects.edgewall.com/python-sidebar/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling yes/no questions from the User

2006-03-21 Thread Steve
You need easygui: http://www.ferg.org/easygui/index.html -- http://mail.python.org/mailman/listinfo/python-list

Re: DO NOT USE JAVA BECAUSE IT IS NOT OPEN SOURCE

2006-04-01 Thread steve
On Sat, 1 Apr 2006 13:06:52 +0800, Luc The Perverse wrote (in article <[EMAIL PROTECTED]>): > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Programing Languiges Are Ment to be free. That is why i am starting The >> Coo De Tar thats french for Blow of state it is a flash/java >>

wxPython and SuSE 10.0

2006-04-05 Thread Steve
Hello, I was wondering if there is a wxPython RPM for SuSE 10.0 available. I Googled for it with no luck, but I'm hopeful that there is one out there. Thanks-in-Advance Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython and SuSE 10.0

2006-04-05 Thread Steve
Ben C wrote: > On 2006-04-05, Steve <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I was wondering if there is a wxPython RPM for SuSE 10.0 >> available. I >> Googled for it with no luck, but I'm hopeful that there is one out >> there.

Re: wxPython and SuSE 10.0

2006-04-08 Thread Steve
Jorge Godoy wrote: > Steve <[EMAIL PROTECTED]> writes: > >> I was wondering if there is a wxPython RPM for SuSE 10.0 >> available. I >> Googled for it with no luck, but I'm hopeful that there is one out >> there. > > There are RPMs

Re: Best Python web-hosting?

2006-04-09 Thread Steve
http://www.python-hosting.com/ I haven't used them myself, but recent research that I did made them look like good candidates. -- http://mail.python.org/mailman/listinfo/python-list

Re: Request for py program to insert space between two characters and saved as text?

2009-12-08 Thread steve
kannada itself. After all Kannada is the language of the sate of Karnataka, of which Bangalore (or Bengaluru as it is known these days) is the capital city. cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogspot.com/ what i'm

Re: a questions about thread-safety of boolean variables

2009-09-30 Thread steve
#x27;t even need a.x. and what if x was a dict ? especially if the only values that are set in the dictionary are simple: booleans, integers, floats, strings Same logic applies. hth, cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.bl

Re: Help with code = Extract numerical value to variable

2009-10-22 Thread Steve
If there is a number in the line I want the number otherwise I want a 0 I don't think I can use strip because the lines have no standards Thanks again Steve On Oct 22, 1:53 pm, ru...@yahoo.com wrote: > On Oct 22, 11:27 am, Steve wrote: > > > > > > > I have some

Re: Help with code = Extract numerical value to variable

2009-10-22 Thread Steve
Sorry I'm not being clear Input** sold: 16 sold: 20 sold: 2 sold: 0 sold: 7 0 sold null Output 16 20 2 0 0 7 0 0 0 0 -- http://mail.python.org/mailman/listinfo/python-list

Help with code = Extract numerical value to variable

2009-10-23 Thread Steve
I have some data that I'm performing some analysis on. How do I grab the numerical value if it's present and ignore otherwise. So in the following example I would have assign the following values to my var 16 20 2 7 0 In Field6 Sample String data is sold: 16 sold: 20 sold: 2 sold: 0 sold: 7 0 s

Re: restriction on sum: intentional bug?

2009-10-27 Thread Steve
On Oct 17, 8:28 pm, Tim Chase wrote: > Christian Heimes wrote: > > Alan G Isaac wrote: > >> On 10/16/2009 5:03 PM, Christian Heimes wrote: > >>> It's not going to happen. > >> That's a prediction, not a justification. > > > It's not a prediction, it's a statement. It's not going to happend > > bec

Re: New syntax for blocks

2009-11-10 Thread steve
returns_value([1,2,3]) as value: value.append(4) print value ---- nasty huh ? :) cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogspot.com/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: New syntax for blocks

2009-11-10 Thread steve
On 11/11/2009 02:05 AM, steve wrote: Hi, On 11/11/2009 12:53 AM, r wrote: [...snip...] i dunno, just seems to make good sense. You save one line of code but more importantly one indention level. However i have no idea how much trouble the implementation would be? I guess the problem would

Re: New syntax for blocks

2009-11-11 Thread steve
lue(0) and value) or globals().pop('value'): print value # ...but that is beginning to look too much like the perl. Well, that's all i could think of to overcome one line of extra code. cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: ht

Re: hi can any one please help me..

2010-02-15 Thread steve
You need to install the python development libraries. For example if you are doing this on a Fedora or Red Hat Enterprise Linux system, execute the command: $ yum install python-devel ...to install the necessary libraries. cheers, - steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a simple way to find the list index to the max value?

2010-02-16 Thread steve
On 02/16/2010 05:49 PM, W. eWatson wrote: See Subject. a = [1,4,9,3]. Find max, 9, then index to it, 2. The most obvious would be a.index(max(a)). Is that what you wanted ? cheers, - steve -- http://mail.python.org/mailman/listinfo/python-list

Browser-based MMOG web framework

2010-04-01 Thread Steve
Hi, I could use some advice on my project. It's a browser-based MMOG: "The High Seas" (working title) Basically it is a trading game set in 1600s or 1700s ... inspirations: Patrician 3, Mine Things, Space Rangers 2, ... Travel between cities takes several days: game updates trading ship position

v = vte.Terminal() AttributeError: 'module' object has no attribute 'Terminal'

2010-12-07 Thread Steve
Error: 'module' object has no attribute 'Terminal' I'm using ubuntu 9.10 karmic. I've installed (apt-get) python-gtk, /2, -dev, libvte... Anyone know if there's a bug on this using karmic, or i must to download and compile gtk/vte from sources? thanks, Ste

A wrap for a multi-tabbed terminal. Some questions

2010-12-29 Thread Steve
terminal to get focus) How can fork a command thru the menus? thank you, Steve, -- http://mail.python.org/mailman/listinfo/python-list

ctypes inheritance issue

2011-02-22 Thread Steve
I've filed a bug in python but I wanted to see if other ctypes users/ experts viewed this issue as a bug. Consider the following: python code: import ctypes class my_array( ctypes.Array ): _type_= ctypes.c_uint8 _length_ = 256 class my_array2( my_array ): pass Output: class my_ar

Re: ctypes inheritance issue

2011-02-23 Thread Steve
On Feb 23, 12:38 am, Carl Banks wrote: > Steve wrote: > > I've filed a bug in python but I wanted to see if other ctypes users/ > > experts viewed this issue as a bug. > > Consider the following: > > python code: > > import ctypes > > cl

Re: how does a queue stop the thread?

2010-04-23 Thread Steve
On Apr 21, 6:08 pm, kaiix wrote: > A simple thread pool example. My question is, since *MyThread.run* > will loop endless, how does the thread know the time to quit? how does > the *queue* notify the thread? is there any shared variables, like a > *lock*? > > When I set daemon false, it stays in t

Re: Replace in large text file ?

2010-06-05 Thread Steve
On 5 June, 08:53, Steve wrote: > I am new to Python and am wanting  to replace characters in a very > large text file.6 GB > In plain language what I wish to do is: > > Remove all comma's > Replace all @ with comma's > Save as a new file. > > Any of you

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-01 Thread Steve
; python-gnupg (for example). > > Thank you, > Malcolm I used python-gnupg successfully to create some Django utilities for sending encrypted email. You can grab the source code at http://github.com/stephenmcd/django-email-extras Cheers, Steve -- http://mail.python.org/mailman/listinfo/python-list

python tutorial

2009-06-15 Thread steve
ly when data is read or written. I don't see any obvious way to at docs.python.org to get that corrected: Is there some standard procedure? Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: python tutorial

2009-06-17 Thread steve
>"Carl Banks" wrote in message >news:2f6271b1-5ffa-4cec-81f8->>0276ad647...@p5g2000pre.googlegroups.com... >On Jun 15, 7:56 pm, "steve" wrote: >> I was just looking at the python tutorial, and I noticed these lines: >> >> http://docs.pyt

Re: python tutorial

2009-06-17 Thread steve
"Steven D'Aprano" wrote in message news:pan.2009.06.16.04.29...@remove.this.cybersource.com.au... > On Mon, 15 Jun 2009 20:58:47 -0700, Carl Banks wrote: > >> On Jun 15, 7:56 pm, "steve" wrote: >>> I was just looking at the python tut

Re: python tutorial

2009-06-17 Thread steve
"Robert Kern" wrote in message news:mailman.1728.1245289092.8015.python-l...@python.org... > On 2009-06-17 19:36, steve wrote: >>> "Carl Banks" wrote in message >>> news:2f6271b1-5ffa-4cec-81f8->>0276ad647...@p5g2000pre.googlegroups.com... >

Re: python tutorial

2009-06-17 Thread steve
"Steven D'Aprano" wrote in message news:pan.2009.06.18.01.42...@remove.this.cybersource.com.au... > On Thu, 18 Jun 2009 10:36:01 +1000, steve wrote: > >> 1) Windows does not make a distinction between text and binary files. > > Of course it does. > > >

Re: python tutorial

2009-06-18 Thread steve
"Steven D'Aprano" wrote in message news:pan.2009.06.18.07.05...@remove.this.cybersource.com.au... > On Thu, 18 Jun 2009 15:58:37 +1000, steve wrote: > >> "Steven D'Aprano" wrote in >> message news:pan.2009.06.18.01.42...@remove.this.cybersource.

Test for Pythonwin?

2009-07-30 Thread steve
Is there a good way to check if a script is running inside Pythonwin? Perhaps a property or method that is exposed by that environment? or, alternatively, is there a better place to ask :-) Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Test for Pythonwin?

2009-08-03 Thread steve
"steve" wrote in message news:4a728aac$0$9744$5a62a...@per-qv1-newsreader-01.iinet.net.au... > Is there a good way to check if a script is running inside Pythonwin? > Perhaps a property or method that is exposed by that environment? > > or, alternatively, is there

Re: Python for professsional Windows GUI apps?

2009-08-24 Thread Steve
You can also use Windows Forms with IronPython http://www.ironpython.info/index.php/Contents#Windows_Forms -- http://mail.python.org/mailman/listinfo/python-list

Re: An assessment of the Unicode standard

2009-08-29 Thread steve
icode and save us all a few keystrokes and bottles of aspirin for the persistent headaches! Simplicity is beautiful!! You are right ! In the same vein, we should all also standardize on using the Java language for programming, after all /everybody/ writes code in Java. cheers, - steve -- random

Re: An assessment of the Unicode standard

2009-09-01 Thread steve
apting to complexity rather then those who expect things to be uniform. You, dear friend, and those who yearn for uniformity are the ones on the path to extinction. cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogs

Re: Entry Level Python Jobs

2009-09-02 Thread steve
ood. Here is a comparison chart in case you decide to go for it http://thethriftygeek.com/2008/11/comparing-the-online-consulting-sites/ Wish you the best, regards, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogspot.com/ what i'm stumbl

Re: Entry Level Python Jobs

2009-09-02 Thread steve
On 09/03/2009 09:36 AM, steve wrote: Hi Jonathan, [...snip...] I feel stupid replying to my own post but just one more thing i thought about mentioning but forgot to add: - Look at your Liberal Arts major as an advantage. Every field has a 'computing gap' that needs to be filled

[repost] Does standard python have BeautifulSoup (or something like it) ?

2009-09-10 Thread steve
opose the inclusion of some module in our beloved 'batteries included' library ? I'd like to see this module (or something similar) included. regards, - steve Original Message Subject: Does standard python have BeautifulSoup (or something like it) ? Date: Tue,

Re: Why use "locals()"

2009-09-16 Thread steve
mmetry about globals() Vs locals() after all... Namespaces are one honking great idea -- let's do more of those! I am sure someone can come up with an example of where having this very distinction is useful ...I am too lazy to dream up one myself right now. cheers, - steve

Re: Why do Perl programmers make more money than Python programmers

2013-05-07 Thread Steve Simmons
"Fábio Santos" wrote: >> >> >> - >> >> >> 1) The memory gain for many of us (usually non ascii users) >> just become irrelevant. >> >> >>> sys.getsizeof('maçã') >> 41 >> >>> sys.getsizeof('abcd') >> 29 >> >> 2) More critical, Py 3.3, just becomes non unicode compliant, >> (eg European languag

Re: Python for IPSA (Power flow analysis)

2013-05-29 Thread steve . ingram
eed tweaking, but should give you the idea. The next version of Ipsa (2.3.2) will have load profiles in so will give a different way of achieving the same results, as well as speed improvements. As Robert mentioned, the best place for Ipsa support is to go onto the website (www.ipsa-power.com) and check the Support of Education pages or check the LinkedIn group Ipsa Power Software Group at http://www.linkedin.com/groups/IPSA-Power-Software-4860907 Hope this helps, Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging memory leaks

2013-06-13 Thread Steve Simmons
fo/python-list No you are not alone. Ignoring a bug is only sensible if you absolutely understand what is going wrong - and by the time you understand the problem that well, you probably have enough understanding to fix it. If tools are available (as the OP knows), then learn them and use them to find/fix the bug. Steve S Sent from a Galaxy far far away-- http://mail.python.org/mailman/listinfo/python-list

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread Steve Simmons
"Νίκος" wrote: >Στις 1/7/2013 11:54 πμ, ο/η Antoon Pardon έγραψε: >>> So shut your piehole and start proving yourself useful in this list. >>> Or sod off. >>> Preferably do the latter. >> Oh we do have illusions of grandeur, don't we? You are in no position >> to judge who is useful on this list

Re: python adds an extra half space when reading from a string or list

2013-07-02 Thread Steve Simmons
"Νίκος" wrote: >Στις 1/7/2013 12:31 μμ, ο/η Steve Simmons έγραψε: > >> I don't know about the other members of this list but I am becoming >> increasingly disturbed by the rudeness and especially the foul >language >> that is being perpetrated on this

Python list code of conduct

2013-07-02 Thread Steve Simmons
e are enthusiasts who choose to discuss Python and *voluntarily* help solve problems with Python for the less experienced members. [Runs for cover] Steve Simmons Sent from a Galaxy far far away-- http://mail.python.org/mailman/listinfo/python-list

Re: Python list code of conduct

2013-07-03 Thread Steve Simmons
. Thanks Ben for that. Lets not stymie Steve Simmons original suggestion for a CoC by making it into a formal CoC and then saying its impossible. There is a good deal of informal enforcement already. Consider eg: - Mark's footnote reminding about GG problems and their solutions - Steven'

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Steve Simmons
On 03/07/2013 15:12, feedthetr...@gmx.de wrote: Am Mittwoch, 3. Juli 2013 12:00:14 UTC+2 schrieb Νίκος: Στις 3/7/2013 12:45 μμ, ο/η Chris Angelico έγραψε: ] You have betrayed the trust of all your customers. ... I just received a call form on of my customers asking me to explain your mail ...

Re: python adds an extra half space when reading from a string or list

2013-07-03 Thread Steve Simmons
several weeks, supported by some *very* patient experts, but it is clear you still have plenty to learn - pause, read, digest, reflect and then move forward. Take care Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Important features for editors

2013-07-04 Thread Steve Simmons
"Νίκος" wrote: >Στις 4/7/2013 11:34 πμ, ο/η Dave Angel έγραψε: >> On 07/04/2013 03:59 AM, Νίκος wrote: >>> Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own reference. I found that each >of them has some features that other don't, but I am not sure whic

Re: Important features for editors

2013-07-04 Thread Steve Simmons
rusi wrote: >On Thursday, July 4, 2013 7:03:19 PM UTC+5:30, Steve Simmons wrote: >> Boy oh boy! You really are a slow learner Nicos. You have just >offered to >> commit a crime and to include dozens of others in that crime ON A >PUBLIC >> FORUM. Please think before y

Re: Important features for editors

2013-07-04 Thread Steve Simmons
ssed' recently on this list, I like Notepad++ for everyday editing but if I'm head-down in a particular language, I prefer to be in an IDE. Steve On Thu, Jul 4, 2013 at 4:56 PM, wrote: > On 07/04/2013 08:24 AM, MRAB wrote: > > On 04/07/2013 14:22, Tim Chase wrote: > >

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread Steve Simmons
Steven D'Aprano wrote: >On Wed, 10 Jul 2013 07:55:05 +, Mats Peterson wrote: > >> A moderator who calls himself “animuson” on Stack Overflow doesn’t >want >> to face the truth. He has deleted all my postings regarding Python >> regular expression matching being extremely slow compared to Perl

DjangoCon US 2012

2012-07-24 Thread Steve Holden
/ Since this is DjangoCon's first ever visit to the East coast we are hoping for good attendance from up and down the East coast, but some delegates will come from as far away as Australia, so Americans have no excuse! regards Steve -- The Open Bastion is the Holden Web

Re: Comparing strings from the back?

2012-09-14 Thread Steve Howell
On Sep 6, 4:04 am, Oscar Benjamin wrote: > On Thu, 06 Sep 2012 06:07:38 -0400, Dave Angel wrote: > > For random strings (as defined below), the average compare time is > > effectively unrelated to the size of the string, once the size > passes > > some point. > > Define random string as being a s

Re: Decorators not worth the effort

2012-09-14 Thread Steve Howell
On Sep 14, 6:05 am, Tim Chase wrote: > On 09/14/12 07:01, Steven D'Aprano wrote:> [snip timeout class] > > > Holy over-engineering Batman!!! > > > No wonder you don't think much of decorators, > > [snip] > > > Most of my decorator functions are under a dozen lines. And that's the > > complicated o

python immersion

2012-09-18 Thread Steve Howell
It's been several years since I announced this page the first time, so I feel like it's okay to announce it again, possibly introducing a few new people to Python's elegance and simplicity. This is my attempt to teach Python to programmers who have experience in other languages, using gentle immer

Re: sum works in sequences (Python 3)

2012-09-19 Thread Steve Howell
On Sep 19, 8:06 am, Neil Cerutti wrote: > On 2012-09-19, Ian Kelly wrote: > > > It notes in the doc string that it does not work on strings: > > > sum(...) > >     sum(sequence[, start]) -> value > > >     Returns the sum of a sequence of numbers (NOT strings) plus > >     the value of parameter

Re: sum works in sequences (Python 3)

2012-09-19 Thread Steve Howell
On Sep 19, 11:34 am, Ian Kelly wrote: > On Wed, Sep 19, 2012 at 9:37 AM, Steve Howell wrote: > > Sequences are iterables, so I'd say the docs are technically correct, > > but maybe I'm misunderstanding what you would be trying to clarify. > > The doc string su

attaching names to subexpressions

2012-10-26 Thread Steve Howell
I have been reading the thread "while expression feature proposal," and one of the interesting outcomes of the thread is the idea that Python could allow you to attach names to subexpressions, much like C allows. In C you can say something like this: tax_next_year = (new_salary = salary * (1 +

Re: A gnarly little python loop

2012-11-10 Thread Steve Howell
On Nov 10, 2:58 pm, Roy Smith wrote: > I'm trying to pull down tweets with one of the many twitter APIs.  The > particular one I'm using (python-twitter), has a call: > > data = api.GetSearch(term="foo", page=page) > > The way it works, you start with page=1.  It returns a list of tweets. > If the

Re: A gnarly little python loop

2012-11-11 Thread Steve Howell
t; Me, I like the itertools version better. There's one chunk of data > > > that goes through a succession of transforms each of which > > > is very straightforward. > > > > [Steve Howell] > > > def get_tweets(term, get_page):

Re: A gnarly little python loop

2012-11-11 Thread Steve Howell
On Nov 11, 1:09 am, Paul Rubin wrote: > Cameron Simpson writes: > > | I'd prefer the original code ten times over this inaccessible beast. > > Me too. > > Me, I like the itertools version better.  There's one chunk of data > that goes through a succession of transforms each of which > is very str

Re: Is there a simpler way to modify all arguments in a function before using the arguments?

2012-11-11 Thread Steve Howell
On Nov 9, 4:48 pm, bruceg113...@gmail.com wrote: > Is there a simpler way to modify all arguments in a function before using the > arguments? > > For example, can the below code, in the modify arguments section be made into > a few statements? > >     def someComputation (aa, bb, cc, dd, ee, ff,

Re: logging, can one get it to email messages over a certain level?

2012-11-11 Thread Steve Howell
On Nov 11, 9:48 am, tinn...@isbd.co.uk wrote: > I'm sure this must be possible but at the moment I can't see how to do it. > > I want to send an E-Mail when the logging module logs a message above > a certain level (probably for ERROR and CRITICAL messages only). > > I.e. I want some sort of hook t

Re: A gnarly little python loop

2012-11-11 Thread Steve Howell
On Nov 11, 10:34 am, Peter Otten <__pete...@web.de> wrote: > Steve Howell wrote: > > On Nov 11, 1:09 am, Paul Rubin wrote: > >> Cameron Simpson writes: > >> > | I'd prefer the original code ten times over this inaccessible beast. > >> > M

Re: Method default argument whose type is the class not yet defined

2012-11-11 Thread Steve Howell
On Nov 10, 11:33 am, Jennie wrote: > What is the best solution to solve the following problem in Python 3.3? > > import math >  >>> class Point: > ...     def __init__(self, x=0, y=0): > ...         self.x = x > ...         self.y = y > ...     def __sub__(self, other): > ...         return Point(

Re: Method default argument whose type is the class not yet defined

2012-11-11 Thread Steve Howell
On Nov 11, 4:31 pm, Oscar Benjamin wrote: > On 11 November 2012 22:31, Steven D'Aprano > > Nonsense. The length and direction of a vector is relative to the origin. > > If the origin is arbitrary, as you claim, then so is the length of the > > vector. > > Wrong on all counts. Neither the length n

Re: A gnarly little python loop

2012-11-11 Thread Steve Howell
On Nov 11, 4:44 pm, Cameron Simpson wrote: > On 11Nov2012 11:16, Steve Howell wrote: > | On Nov 11, 10:34 am, Peter Otten <__pete...@web.de> wrote: > | > Steve Howell wrote: > | > > On Nov 11, 1:09 am, Paul Rubin wrote: > | > >> Cameron Simpson writes: &g

Re: A gnarly little python loop

2012-11-12 Thread Steve Howell
On Nov 12, 7:21 am, rusi wrote: > On Nov 12, 12:09 pm, rusi wrote:> This is a classic > problem -- structure clash of parallel loops > > > > Sorry wrong solution :D > > The fidgetiness is entirely due to python not allowing C-style loops > like these: > > >> while ((c=getchar()!= EOF) { ... } >

Re: Suitable software stacks for simple python web service

2012-11-21 Thread Steve Petrie
instance. Communication with Salesforce is done through the Salesforce Python Toolkit (http://code.google.com/p/salesforce-python-toolkit/), which uses Suds. Communication with the Drupal site uses Python's (and PHP's on the Drupal side) native JSON support. This is under Python 2

Re: Suitable software stacks for simple python web service

2012-11-24 Thread Steve Petrie
On Thursday, November 22, 2012 1:42:42 AM UTC-5, Kev Dwyer wrote: > Steve Petrie wrote: > > > > > On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote: > > >> Hello List, > > >> > > >> > >

Help accessing COM .dll from Python

2012-12-01 Thread Steve Simmons
First time post - be gentle with me :-) I am trying to write a Python script to access a scanning device.  I have an SDK for the scanner but the documentation is a bit limited and the supplier doesn't support Python (bu

Re: Help accessing COM .dll from Python

2012-12-01 Thread Steve Simmons
Gunther - Sorry about that, hoping this response comes through as plain text. Chris - Thanks for the translation and the response. Unfortunately, I don't speak 'C', and I think the learning curve for Python + COM should be slightly less steep. The scanner is supplied by Card Scanning Soluti

Re: please i need explanation

2013-01-11 Thread Steve Simmons
than 2 and, if so, returns a value of 1 The rest of the code counts down from n to 1 multiplying f by n at each iteration. If I guessed the right question, reply to the post for further clarification. Steve On 11/01/2013 16:33, kwakukwat...@gmail.com wrote: -Original Message- From: K

atexit handler in IDLE?

2013-01-15 Thread Steve Spicklemire
see how the program is actually called, and I decided it looked like it was being invoked with with os.spawnv, but I'm not sure why this would defeat the atexit handler. Anybody know? I'd like to register such a function in my module, but I need it to work in IDLE so that

Re: atexit handler in IDLE?

2013-01-15 Thread Steve Spicklemire
On Jan 15, 2013, at 10:22 AM, Mark Janssen wrote: > On Tue, Jan 15, 2013 at 6:25 AM, Steve Spicklemire wrote: >> I'm trying to get this program, which works on the command line, to run >> correctly in the IDLE environment: >> >> import atexit >> &g

handling return codes from CTYPES

2013-01-21 Thread Steve Simmons
PY33, Win7, Python Newbie, Not homework:-) I'm trying to use some 'C' DLLs from Python using ctypes and I have a minor issue with the return valuesbut I am new to Python; ctypes and using DLLs so I am at the bottom of so many learning curves, I'm not sure where or how to find my mistake. When

Re: handling return codes from CTYPES

2013-01-21 Thread Steve Simmons
understand that I am not using the correct approach but I don't understand how I discarded the object I created. Can you clarify please? Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: handling return codes from CTYPES

2013-01-22 Thread Steve Simmons
ut'. I'm just wondering how often I'll have to chant "it isn't a variable, it's a name bound to an object" before I can write a chunk of code without spending ages pondering why it isn't working. I already like Python for its clean design but I think it&#

Re: Need Pattern For Logging Into A Website

2013-01-25 Thread Steve Petrie
On Thursday, January 24, 2013 8:29:51 PM UTC-5, Tim Daneliuk wrote: > I need to write a Python script to do the following: > > > >- Connect to a URL and accept any certificate - self-signed or > authoritative > >- Provide login name/password credentials > >- Fill in some presented

Best approach to OO Style (only slightly off topic)?

2013-02-01 Thread Steve Simmons
ying the high level logic? Anyinput most welcome. I looked briefly at the MVC model which answers my question at a high level but itrepresents another learning curve that I'm reluctant to add to my current challenge. Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is readable

2012-03-20 Thread Steve Howell
On Mar 20, 5:22 pm, Steven D'Aprano wrote: > On Tue, 20 Mar 2012 15:28:25 -0400, Nathan Rice wrote: > > > What if you are composing > > three or four functions, each of which is conditional on the data?  If > > you extract things from a statement and assign them somewhat arbitrary > > names, you'v

Re: Python is readable

2012-03-20 Thread Steve Howell
On Mar 20, 7:28 pm, Ben Finney wrote: > Steve Howell writes: > > Also, while the above idiom puts the verbs in the right order, it is > > still backward to me to say "noun.verb." You don't noun a verb. You > > verb a noun. > > When calling a method, the

Re: List comprehension/genexp inconsistency.

2012-03-20 Thread Steve Howell
On Mar 20, 3:50 pm, Ian Kelly wrote: > On Tue, Mar 20, 2012 at 3:16 PM, Dennis Lee Bieber > > wrote: > > On Tue, 20 Mar 2012 16:23:22 -0400, "J. Cliff Dyer" > > declaimed the following in > > gmane.comp.python.general: > > >> When trying to create a class with a dual-loop generator expression in

Re: Python is readable

2012-03-20 Thread Steve Howell
On Mar 20, 9:16 pm, Chris Angelico wrote: > On Wed, Mar 21, 2012 at 1:44 PM, Steve Howell wrote: > > I think it's a matter of perspective, so there's no right answer, but > > I always think of the program object as also being the grammatical > > object, with

Re: Python is readable

2012-03-20 Thread Steve Howell
On Mar 20, 10:40 pm, Chris Angelico wrote: > On Wed, Mar 21, 2012 at 3:58 PM, Steve Howell wrote: > > So saying "push(stack, item)" or "push(item, stack)" seems very > > unsophisticated, almost assembly-like in syntax, albeit at a higher > > level concep

Re: Python is readable

2012-03-21 Thread Steve Howell
On Mar 21, 12:16 am, Chris Rebert wrote: > On Tue, Mar 20, 2012 at 11:52 PM, Steve Howell wrote: > > On Mar 20, 10:40 pm, Chris Angelico wrote: > >> On Wed, Mar 21, 2012 at 3:58 PM, Steve Howell wrote: > >> > So saying "push(stack, item)

Re: Python is readable

2012-03-21 Thread Steve Howell
On Mar 21, 9:22 am, Evan Driscoll wrote: > On 01/-10/-28163 01:59 PM, Steve Howell wrote: > > > > > > > > > > > Code shouldn't necessarily follow the example of English prose, but it > > seems that English has had some influence: > > >   1

Re: Python is readable

2012-03-21 Thread Steve Howell
On Mar 21, 4:34 pm, Steven D'Aprano wrote: > On Wed, 21 Mar 2012 11:22:01 -0500, Evan Driscoll wrote: > > On 01/-10/-28163 01:59 PM, Steve Howell wrote: > >> Code shouldn't necessarily follow the example of English prose, but it > >> seems that English has

<    1   2   3   4   5   6   7   8   9   10   >