Cashing in PythonWin name space?... seems unexpected to me

2009-10-08 Thread bsneddon
I saw an issue on winXP box not connected to internet yesterday, where i was running a script in the interactive window on PythonWin . I would modify the script save and import and was still running the old version. I did that several times with same result. I even renamed the function and it

parse a string of parameters and values

2009-12-12 Thread bsneddon
I have a problem that I can come up with a brute force solution to solve but it occurred to me that there may be an "one-- and preferably only one --obvious way to do it". I am going to read a text file that is an export from a control system. It has lines with information like base=1 name="firs

Re: parse a string of parameters and values

2009-12-13 Thread bsneddon
On Dec 13, 5:28 am, Peter Otten <__pete...@web.de> wrote: > bsneddon wrote: > > I have a problem that I can come up with a brute force solution to > > solve but it occurred to me that there may be an > >  "one-- and preferably only one --obvious way to do it".

XQuery module for Python

2007-07-05 Thread bsneddon
Does anyone know of a module for Python XML that includes XQuery? http://www.w3.org/XML/Query/ It seem like it would be very useful. Is there a down side to XQuery that has prevented it from being incorporated into some of the Python XML offerings? I have googled this some and have not seen answer

Re: Validating XML in Windows

2007-07-08 Thread bsneddon
On Jul 8, 12:22 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Omari Norman wrote: > > My app needs to validate XML. That's easy enough in Unix. What is the > > best way to do it in Windows? > > > The most obvious choice would of course be PyXML. However, apparently it > > is no longer maintained:

Re: Pretty Printing Like Tidy for HTML

2007-07-08 Thread bsneddon
On Jul 8, 10:59 am, [EMAIL PROTECTED] (John J. Lee) wrote: > David <[EMAIL PROTECTED]> writes: > > Is there a pretty printing utility for Python, something like Tidy for > > HTML? > > > That will change: > > > xp=self.uleft[0]+percentx*(self.xwidth) > > > To: > > > xp = self.uleft[0

Re: Pretty Printing Like Tidy for HTML

2007-07-08 Thread bsneddon
On Jul 8, 1:53 pm, bsneddon <[EMAIL PROTECTED]> wrote: > On Jul 8, 10:59 am, [EMAIL PROTECTED] (John J. Lee) wrote: > > > > > David <[EMAIL PROTECTED]> writes: > > > Is there a pretty printing utility for Python, something like Tidy for > > > HT

Re: Fastest way to convert a byte of integer into a list

2007-07-12 Thread bsneddon
On Jul 12, 8:49 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Jul 13, 10:28 am, Paul Rubin wrote: > > > Godzilla <[EMAIL PROTECTED]> writes: > > > > num = 255 > > > > numlist = [num >> i & 1 for i in range(8)] > > > > Thanks matimus! I will look into it... > > > numlist

Re: problem of converting a list to dict

2008-01-09 Thread bsneddon
On Jan 9, 3:12 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > mylist=['','tom=boss','mike=manager','paul=employee','meaningless'] > > > I'd like to remove the first and the last item as they are irrevalent, > > and convert it to the dict: > > {'tom':'boss','mike':'manager','paul':'employee'} > > > I

When do default parameters get their values set?

2014-12-08 Thread bSneddon
I ran into an issue setting variables from a GUI module that imports a back end module. My approach was wrong obviously but what is the best way to set values in a back end module. #module name beTest.py cfg = { 'def' : 'blue'} def printDef(argT = cfg['def']): print argT #module na

Re: When do default parameters get their values set?

2014-12-08 Thread bSneddon
Thanks to all. I now understand what is happening. Originally wrote a script be executed from command line. No want to use Gui to change defaults. Will refactor to fix where necessary. On Monday, December 8, 2014 5:10:58 PM UTC-5, bSneddon wrote: > I ran into an issue setting variab

When do default parameters get their values set?

2014-12-09 Thread bSneddon
I ran into an issue setting variables from a GUI module that imports a back end module. My approach was wrong obviously but what is the best way to set values in a back end module. #module name beTest.py cfg = { 'def' : 'blue'} def printDef(argT = cfg['def']): print argT #module nam

Creating a 2s compliment hex string for negitive numbers

2014-08-01 Thread bSneddon
I need to calculate an error correction code for an old protocol. I calculate the integer 4617 and want to code the 2s compliment in ASCII hex EDF7. When issue the following. >>> hex(-4617) '-0x1209' Does anyone know a clean way to get to the desired results? My ECC will always be 16 bit (4

Re: Creating a 2s compliment hex string for negitive numbers

2014-08-01 Thread bSneddon
On Friday, August 1, 2014 4:47:20 PM UTC-4, MRAB wrote: > On 2014-08-01 21:35, bSneddon wrote: > > > I need to calculate an error correction code for an old protocol. > > > > > > I calculate the integer 4617 and want to code the 2s compliment in ASCII > > &

Dabbling in web development

2015-11-19 Thread bSneddon
I know there are a plethora of web frameworks out there for Python and to be serious about website developement I should learn on like Django. Really thought, I just want to dabble and do some easy stuff. Does anyone have any suggestons? I have a a website hosted with a hosting company who

Re: Dabbling in web development

2015-11-20 Thread bSneddon
Thanks all! -- https://mail.python.org/mailman/listinfo/python-list