From stuart at swilliams.ca Fri Mar 4 08:22:00 2011 From: stuart at swilliams.ca (Stuart Williams) Date: Fri, 4 Mar 2011 07:22:00 -0600 Subject: [Python Wpg] Offer to present on Bo-Keep In-Reply-To: <4D62B928.9020203@parit.ca> References: <4D62B928.9020203@parit.ca> Message-ID: Our next meeting will be March 23rd at 7:30 p.m. at Epic, http://WinniPUG.caupdated to reflect this. For meetings at Epic, the address is 167 Sherbrook, parking on the street or in the lot at the back, website http://Epic.ca . I hope to see many of you there. I expect an interesting talk. Stuart. On Mon, Feb 21, 2011 at 1:12 PM, Mark Jenkins wrote: > Hey WinniPUG, > > Scratching my head trying to figure out from the archives and wiki if > there was a user-group meeting between November and today... > > I'm willing to offer a presentation on Bo-Keep, http://bokeep.org/, > which I recently did an online 1.0 launch of (as a public project). > (more recently then the launch party we had a few months back) > > http://bokeep.org/ > > I'll try to go beyond just the regular user-demo and show some of the > ways in which I used python in the code. > > If there isn't a regular meeting schedule that I could fit in to > anymore, I could arrange a meeting on my own if there's interest. > > > Mark > _______________________________________________ > Winnipeg Python Users Group mailing list > http://WinniPUG.ca > Winnipeg at python.org > http://mail.python.org/mailman/listinfo/winnipeg > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kveroneau at gmail.com Thu Mar 10 17:33:41 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Thu, 10 Mar 2011 16:33:41 -0600 Subject: [Python Wpg] Cannot figure out this ZeroDivisionError exception Message-ID: Hello, I am in the process of learning the basics of 3D math and programming, and thought using Python and Pygame would be a good choice to prototype in. The 2D example works great, the isometric 3D example also works. But in the 3rd example, when I press Space to enter into full 3D, it uses a flow control statement to change a calculation. Even though the calculation is very similar in both isometric and full 3D, it just does not work and I am very confused why. You can view the source code online in my public Subversion Repository: http://django.kveroneau.info/svn/node1/python/pygame/3danim2.py/cat I am following the tutorial step-by-step on this website: http://skytopia.com/project/cube/cube.html That website explains 3D using pseudo-code, the author made it resemble BASIC-like syntax for clarity. As I read through the tutorial, I coded it in Python, and thus is why there is three python files, one for each phase of the example. I thought I would ask here, as I noticed many of you on this mailing list using Python for mathematical purposes, and this exception is related to a math operation in a calculation. This is my first time going in depth with 3D programming and how the math behind it works. I would of course move to OpenGL once I understand the fundamentals. On the topic of OpenGL, which OpenGL Python library would you recommend someone who is just diving into GL. I feel my Python skills are pretty strong at this point. I understand that Blender can be scripted using Python, would this be a good place to start or should I use a stand-alone python module? Thanks, Kevin Veroneau -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at swilliams.ca Fri Mar 11 14:58:20 2011 From: stuart at swilliams.ca (Stuart Williams) Date: Fri, 11 Mar 2011 13:58:20 -0600 Subject: [Python Wpg] Cannot figure out this ZeroDivisionError exception In-Reply-To: References: Message-ID: I briefly looked through your code, and the print of scale + movex makes me wonder if you're assuming different operator precedence than Python gives you: nx = (x[n]+xrotoffset+camx)/nz/scale+movex is interpreted as (formatted to match PEP8): nx = (((x[n] + xrotoffset + camx) / nz) / scale) + movex I suspect scale is zero, even if scale+movex is not. camz starts at zero, and if line 68 execute then scale becomes zero. The other thing I noticed is your code has the loop over 8 values later in the loop than the code that you're following. Perhaps that will help. Stuart. On Thu, Mar 10, 2011 at 4:33 PM, Kevin Veroneau wrote: > Hello, > > I am in the process of learning the basics of 3D math and programming, > and thought using Python and Pygame would be a good choice to prototype in. > The 2D example works great, the isometric 3D example also works. But in the > 3rd example, when I press Space to enter into full 3D, it uses a flow > control statement to change a calculation. Even though the calculation is > very similar in both isometric and full 3D, it just does not work and I am > very confused why. > > You can view the source code online in my public Subversion Repository: > http://django.kveroneau.info/svn/node1/python/pygame/3danim2.py/cat > > I am following the tutorial step-by-step on this website: > http://skytopia.com/project/cube/cube.html > > That website explains 3D using pseudo-code, the author made it resemble > BASIC-like syntax for clarity. As I read through the tutorial, I coded it > in Python, and thus is why there is three python files, one for each phase > of the example. > > I thought I would ask here, as I noticed many of you on this mailing list > using Python for mathematical purposes, and this exception is related to a > math operation in a calculation. This is my first time going in depth with > 3D programming and how the math behind it works. I would of course move to > OpenGL once I understand the fundamentals. > > On the topic of OpenGL, which OpenGL Python library would you recommend > someone who is just diving into GL. I feel my Python skills are pretty > strong at this point. I understand that Blender can be scripted using > Python, would this be a good place to start or should I use a stand-alone > python module? > > Thanks, > Kevin Veroneau > > > _______________________________________________ > Winnipeg Python Users Group mailing list > http://WinniPUG.ca > Winnipeg at python.org > http://mail.python.org/mailman/listinfo/winnipeg > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kveroneau at gmail.com Fri Mar 11 15:22:20 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Fri, 11 Mar 2011 14:22:20 -0600 Subject: [Python Wpg] Fwd: Cannot figure out this ZeroDivisionError exception In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Kevin Veroneau Date: Fri, Mar 11, 2011 at 2:22 PM Subject: Re: [Python Wpg] Cannot figure out this ZeroDivisionError exception To: Stuart Williams Thank you the help. I updated the code with the added brackets. The exception is still firing. camz is set on line 17: camx, camy, camz = 0, 0, 300 scale is set to 1, and when the mode is changed to from 0 to 1, the following is executed: scale = scale/camz I suspect that I have the scale set too low, it is current 1. In the end, it would be doing: scale = 1/300 which then equals a zero-based float point number: 0.003333 If I set the scale to 1, the objects in 3D space are too far to see and defeats the purpose of the demo. Although I do suspect it is more related to the math in dividing the scale than it is in the math for the drawing routine. This helps a lot as now the problem is more pinpointed and I know where to look. Thanks! On Fri, Mar 11, 2011 at 1:58 PM, Stuart Williams wrote: > I briefly looked through your code, and the print of scale + movex makes me > wonder if you're assuming different operator precedence than Python gives > you: > > nx = (x[n]+xrotoffset+camx)/nz/scale+movex > > is interpreted as (formatted to match PEP8): > > nx = (((x[n] + xrotoffset + camx) / nz) / scale) + movex > > I suspect scale is zero, even if scale+movex is not. > > camz starts at zero, and if line 68 execute then scale becomes zero. > > The other thing I noticed is your code has the loop over 8 values later in > the loop than the code that you're following. > > Perhaps that will help. > > Stuart. > > On Thu, Mar 10, 2011 at 4:33 PM, Kevin Veroneau wrote: > >> Hello, >> >> I am in the process of learning the basics of 3D math and programming, >> and thought using Python and Pygame would be a good choice to prototype in. >> The 2D example works great, the isometric 3D example also works. But in the >> 3rd example, when I press Space to enter into full 3D, it uses a flow >> control statement to change a calculation. Even though the calculation is >> very similar in both isometric and full 3D, it just does not work and I am >> very confused why. >> >> You can view the source code online in my public Subversion Repository: >> http://django.kveroneau.info/svn/node1/python/pygame/3danim2.py/cat >> >> I am following the tutorial step-by-step on this website: >> http://skytopia.com/project/cube/cube.html >> >> That website explains 3D using pseudo-code, the author made it resemble >> BASIC-like syntax for clarity. As I read through the tutorial, I coded it >> in Python, and thus is why there is three python files, one for each phase >> of the example. >> >> I thought I would ask here, as I noticed many of you on this mailing >> list using Python for mathematical purposes, and this exception is related >> to a math operation in a calculation. This is my first time going in depth >> with 3D programming and how the math behind it works. I would of course >> move to OpenGL once I understand the fundamentals. >> >> On the topic of OpenGL, which OpenGL Python library would you recommend >> someone who is just diving into GL. I feel my Python skills are pretty >> strong at this point. I understand that Blender can be scripted using >> Python, would this be a good place to start or should I use a stand-alone >> python module? >> >> Thanks, >> Kevin Veroneau >> >> >> _______________________________________________ >> Winnipeg Python Users Group mailing list >> http://WinniPUG.ca >> Winnipeg at python.org >> http://mail.python.org/mailman/listinfo/winnipeg >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From high.res.mike at gmail.com Fri Mar 11 19:38:41 2011 From: high.res.mike at gmail.com (Mike pfaiffer) Date: Fri, 11 Mar 2011 18:38:41 -0600 Subject: [Python Wpg] Fwd: Cannot figure out this ZeroDivisionError exception In-Reply-To: References: Message-ID: <4D7AC091.8040009@gmail.com> On 11-03-11 2:22 PM, Kevin Veroneau wrote: > ---------- Forwarded message ---------- > From: Kevin Veroneau > Date: Fri, Mar 11, 2011 at 2:22 PM > Subject: Re: [Python Wpg] Cannot figure out this ZeroDivisionError exception > To: Stuart Williams > > > Thank you the help. > > I updated the code with the added brackets. The exception is still firing. > > camz is set on line 17: camx, camy, camz = 0, 0, 300 > > scale is set to 1, and when the mode is changed to from 0 to 1, the > following is executed: > scale = scale/camz > > I suspect that I have the scale set too low, it is current 1. In the end, > it would be doing: > scale = 1/300 which then equals a zero-based float point number: 0.003333 > > If I set the scale to 1, the objects in 3D space are too far to see and > defeats the purpose of the demo. Although I do suspect it is more related > to the math in dividing the scale than it is in the math for the drawing > routine. > > This helps a lot as now the problem is more pinpointed and I know where to > look. > > Thanks! Just a thought. Would scale = 1/300 not produce 0 instead of the floating point 0.00333? It looks like you may have a data type conversion issue. If the numerator is an integer then the result of the division will be an integer. I was caught by this a couple of times (and will no doubt be caught by it again in the future). Later Mike > On Fri, Mar 11, 2011 at 1:58 PM, Stuart Williamswrote: > >> I briefly looked through your code, and the print of scale + movex makes me >> wonder if you're assuming different operator precedence than Python gives >> you: >> >> nx = (x[n]+xrotoffset+camx)/nz/scale+movex >> >> is interpreted as (formatted to match PEP8): >> >> nx = (((x[n] + xrotoffset + camx) / nz) / scale) + movex >> >> I suspect scale is zero, even if scale+movex is not. >> >> camz starts at zero, and if line 68 execute then scale becomes zero. >> >> The other thing I noticed is your code has the loop over 8 values later in >> the loop than the code that you're following. >> >> Perhaps that will help. >> >> Stuart. >> >> On Thu, Mar 10, 2011 at 4:33 PM, Kevin Veroneauwrote: >> >>> Hello, >>> >>> I am in the process of learning the basics of 3D math and programming, >>> and thought using Python and Pygame would be a good choice to prototype in. >>> The 2D example works great, the isometric 3D example also works. But in the >>> 3rd example, when I press Space to enter into full 3D, it uses a flow >>> control statement to change a calculation. Even though the calculation is >>> very similar in both isometric and full 3D, it just does not work and I am >>> very confused why. >>> >>> You can view the source code online in my public Subversion Repository: >>> http://django.kveroneau.info/svn/node1/python/pygame/3danim2.py/cat >>> >>> I am following the tutorial step-by-step on this website: >>> http://skytopia.com/project/cube/cube.html >>> >>> That website explains 3D using pseudo-code, the author made it resemble >>> BASIC-like syntax for clarity. As I read through the tutorial, I coded it >>> in Python, and thus is why there is three python files, one for each phase >>> of the example. >>> >>> I thought I would ask here, as I noticed many of you on this mailing >>> list using Python for mathematical purposes, and this exception is related >>> to a math operation in a calculation. This is my first time going in depth >>> with 3D programming and how the math behind it works. I would of course >>> move to OpenGL once I understand the fundamentals. >>> >>> On the topic of OpenGL, which OpenGL Python library would you recommend >>> someone who is just diving into GL. I feel my Python skills are pretty >>> strong at this point. I understand that Blender can be scripted using >>> Python, would this be a good place to start or should I use a stand-alone >>> python module? >>> >>> Thanks, >>> Kevin Veroneau >>> >>> >>> _______________________________________________ >>> Winnipeg Python Users Group mailing list >>> http://WinniPUG.ca >>> Winnipeg at python.org >>> http://mail.python.org/mailman/listinfo/winnipeg >>> >>> >> > > > > _______________________________________________ > Winnipeg Python Users Group mailing list > http://WinniPUG.ca > Winnipeg at python.org > http://mail.python.org/mailman/listinfo/winnipeg From cmacksey at gmail.com Fri Mar 11 20:22:57 2011 From: cmacksey at gmail.com (Chris Macksey) Date: Fri, 11 Mar 2011 19:22:57 -0600 Subject: [Python Wpg] Fwd: Cannot figure out this ZeroDivisionError exception In-Reply-To: <4D7AC091.8040009@gmail.com> References: <4D7AC091.8040009@gmail.com> Message-ID: On 11 March 2011 18:38, Mike pfaiffer wrote: > > Just a thought. Would scale = 1/300 not produce 0 instead of the > floating point 0.00333? It looks like you may have a data type conversion > issue. If the numerator is an integer then the result of the division will > be an integer. I was caught by this a couple of times (and will no doubt be > caught by it again in the future). > > Later > Mike > > Yes, it would, depending on your Python version - unless you either use from __future__ import division to get the new division semantics, or use 1.0/300 (or equivalent) to force it to be a float. Cheers, Chris. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at swilliams.ca Fri Mar 11 20:59:02 2011 From: stuart at swilliams.ca (Stuart Williams) Date: Fri, 11 Mar 2011 19:59:02 -0600 Subject: [Python Wpg] Fwd: Cannot figure out this ZeroDivisionError exception In-Reply-To: <4D7AC091.8040009@gmail.com> References: <4D7AC091.8040009@gmail.com> Message-ID: Good catch Mike. Stuart. On Fri, Mar 11, 2011 at 6:38 PM, Mike pfaiffer wrote: > On 11-03-11 2:22 PM, Kevin Veroneau wrote: > >> ---------- Forwarded message ---------- >> From: Kevin Veroneau >> Date: Fri, Mar 11, 2011 at 2:22 PM >> Subject: Re: [Python Wpg] Cannot figure out this ZeroDivisionError >> exception >> To: Stuart Williams >> >> >> Thank you the help. >> >> I updated the code with the added brackets. The exception is still >> firing. >> >> camz is set on line 17: camx, camy, camz = 0, 0, 300 >> >> scale is set to 1, and when the mode is changed to from 0 to 1, the >> following is executed: >> scale = scale/camz >> >> I suspect that I have the scale set too low, it is current 1. In the end, >> it would be doing: >> scale = 1/300 which then equals a zero-based float point number: 0.003333 >> >> If I set the scale to 1, the objects in 3D space are too far to see and >> defeats the purpose of the demo. Although I do suspect it is more related >> to the math in dividing the scale than it is in the math for the drawing >> routine. >> >> This helps a lot as now the problem is more pinpointed and I know where to >> look. >> >> Thanks! >> > > Just a thought. Would scale = 1/300 not produce 0 instead of the > floating point 0.00333? It looks like you may have a data type conversion > issue. If the numerator is an integer then the result of the division will > be an integer. I was caught by this a couple of times (and will no doubt be > caught by it again in the future). > > Later > Mike > > > > > On Fri, Mar 11, 2011 at 1:58 PM, Stuart Williams> >wrote: >> >> I briefly looked through your code, and the print of scale + movex makes >>> me >>> wonder if you're assuming different operator precedence than Python gives >>> you: >>> >>> nx = (x[n]+xrotoffset+camx)/nz/scale+movex >>> >>> is interpreted as (formatted to match PEP8): >>> >>> nx = (((x[n] + xrotoffset + camx) / nz) / scale) + movex >>> >>> I suspect scale is zero, even if scale+movex is not. >>> >>> camz starts at zero, and if line 68 execute then scale becomes zero. >>> >>> The other thing I noticed is your code has the loop over 8 values later >>> in >>> the loop than the code that you're following. >>> >>> Perhaps that will help. >>> >>> Stuart. >>> >>> On Thu, Mar 10, 2011 at 4:33 PM, Kevin Veroneau>> >wrote: >>> >>> Hello, >>>> >>>> I am in the process of learning the basics of 3D math and programming, >>>> and thought using Python and Pygame would be a good choice to prototype >>>> in. >>>> The 2D example works great, the isometric 3D example also works. But in >>>> the >>>> 3rd example, when I press Space to enter into full 3D, it uses a flow >>>> control statement to change a calculation. Even though the calculation >>>> is >>>> very similar in both isometric and full 3D, it just does not work and I >>>> am >>>> very confused why. >>>> >>>> You can view the source code online in my public Subversion >>>> Repository: >>>> http://django.kveroneau.info/svn/node1/python/pygame/3danim2.py/cat >>>> >>>> I am following the tutorial step-by-step on this website: >>>> http://skytopia.com/project/cube/cube.html >>>> >>>> That website explains 3D using pseudo-code, the author made it >>>> resemble >>>> BASIC-like syntax for clarity. As I read through the tutorial, I coded >>>> it >>>> in Python, and thus is why there is three python files, one for each >>>> phase >>>> of the example. >>>> >>>> I thought I would ask here, as I noticed many of you on this mailing >>>> list using Python for mathematical purposes, and this exception is >>>> related >>>> to a math operation in a calculation. This is my first time going in >>>> depth >>>> with 3D programming and how the math behind it works. I would of course >>>> move to OpenGL once I understand the fundamentals. >>>> >>>> On the topic of OpenGL, which OpenGL Python library would you >>>> recommend >>>> someone who is just diving into GL. I feel my Python skills are pretty >>>> strong at this point. I understand that Blender can be scripted using >>>> Python, would this be a good place to start or should I use a >>>> stand-alone >>>> python module? >>>> >>>> Thanks, >>>> Kevin Veroneau >>>> >>>> >>>> _______________________________________________ >>>> Winnipeg Python Users Group mailing list >>>> http://WinniPUG.ca >>>> Winnipeg at python.org >>>> http://mail.python.org/mailman/listinfo/winnipeg >>>> >>>> >>>> >>> >> >> >> _______________________________________________ >> Winnipeg Python Users Group mailing list >> http://WinniPUG.ca >> Winnipeg at python.org >> http://mail.python.org/mailman/listinfo/winnipeg >> > > _______________________________________________ > Winnipeg Python Users Group mailing list > http://WinniPUG.ca > Winnipeg at python.org > http://mail.python.org/mailman/listinfo/winnipeg > -------------- next part -------------- An HTML attachment was scrubbed... URL: From high.res.mike at gmail.com Sat Mar 12 00:27:19 2011 From: high.res.mike at gmail.com (Mike pfaiffer) Date: Fri, 11 Mar 2011 23:27:19 -0600 Subject: [Python Wpg] Fwd: Cannot figure out this ZeroDivisionError exception In-Reply-To: References: <4D7AC091.8040009@gmail.com> Message-ID: <4D7B0437.9030303@gmail.com> On 11-03-11 7:59 PM, Stuart Williams wrote: > Good catch Mike. > > Stuart. Years ago there was something similar with the Apple][ computer. The idea was to map a 3D wire frame object into 2D. At the time I figured since this was a lot of horsepower involved for a 1MHz system I'd use integer variables to speed up processing. It worked out to be very much faster but the results left a lot to be desired. ;-) Later Mike > On Fri, Mar 11, 2011 at 6:38 PM, Mike pfaifferwrote: > >> On 11-03-11 2:22 PM, Kevin Veroneau wrote: >> >>> ---------- Forwarded message ---------- >>> From: Kevin Veroneau >>> Date: Fri, Mar 11, 2011 at 2:22 PM >>> Subject: Re: [Python Wpg] Cannot figure out this ZeroDivisionError >>> exception >>> To: Stuart Williams >>> >>> >>> Thank you the help. >>> >>> I updated the code with the added brackets. The exception is still >>> firing. >>> >>> camz is set on line 17: camx, camy, camz = 0, 0, 300 >>> >>> scale is set to 1, and when the mode is changed to from 0 to 1, the >>> following is executed: >>> scale = scale/camz >>> >>> I suspect that I have the scale set too low, it is current 1. In the end, >>> it would be doing: >>> scale = 1/300 which then equals a zero-based float point number: 0.003333 >>> >>> If I set the scale to 1, the objects in 3D space are too far to see and >>> defeats the purpose of the demo. Although I do suspect it is more related >>> to the math in dividing the scale than it is in the math for the drawing >>> routine. >>> >>> This helps a lot as now the problem is more pinpointed and I know where to >>> look. >>> >>> Thanks! >>> >> >> Just a thought. Would scale = 1/300 not produce 0 instead of the >> floating point 0.00333? It looks like you may have a data type conversion >> issue. If the numerator is an integer then the result of the division will >> be an integer. I was caught by this a couple of times (and will no doubt be >> caught by it again in the future). >> >> Later >> Mike >> >> >> >> >> On Fri, Mar 11, 2011 at 1:58 PM, Stuart Williams>>> wrote: >>> >>> I briefly looked through your code, and the print of scale + movex makes >>>> me >>>> wonder if you're assuming different operator precedence than Python gives >>>> you: >>>> >>>> nx = (x[n]+xrotoffset+camx)/nz/scale+movex >>>> >>>> is interpreted as (formatted to match PEP8): >>>> >>>> nx = (((x[n] + xrotoffset + camx) / nz) / scale) + movex >>>> >>>> I suspect scale is zero, even if scale+movex is not. >>>> >>>> camz starts at zero, and if line 68 execute then scale becomes zero. >>>> >>>> The other thing I noticed is your code has the loop over 8 values later >>>> in >>>> the loop than the code that you're following. >>>> >>>> Perhaps that will help. >>>> >>>> Stuart. >>>> >>>> On Thu, Mar 10, 2011 at 4:33 PM, Kevin Veroneau>>>> wrote: >>>> >>>> Hello, >>>>> >>>>> I am in the process of learning the basics of 3D math and programming, >>>>> and thought using Python and Pygame would be a good choice to prototype >>>>> in. >>>>> The 2D example works great, the isometric 3D example also works. But in >>>>> the >>>>> 3rd example, when I press Space to enter into full 3D, it uses a flow >>>>> control statement to change a calculation. Even though the calculation >>>>> is >>>>> very similar in both isometric and full 3D, it just does not work and I >>>>> am >>>>> very confused why. >>>>> >>>>> You can view the source code online in my public Subversion >>>>> Repository: >>>>> http://django.kveroneau.info/svn/node1/python/pygame/3danim2.py/cat >>>>> >>>>> I am following the tutorial step-by-step on this website: >>>>> http://skytopia.com/project/cube/cube.html >>>>> >>>>> That website explains 3D using pseudo-code, the author made it >>>>> resemble >>>>> BASIC-like syntax for clarity. As I read through the tutorial, I coded >>>>> it >>>>> in Python, and thus is why there is three python files, one for each >>>>> phase >>>>> of the example. >>>>> >>>>> I thought I would ask here, as I noticed many of you on this mailing >>>>> list using Python for mathematical purposes, and this exception is >>>>> related >>>>> to a math operation in a calculation. This is my first time going in >>>>> depth >>>>> with 3D programming and how the math behind it works. I would of course >>>>> move to OpenGL once I understand the fundamentals. >>>>> >>>>> On the topic of OpenGL, which OpenGL Python library would you >>>>> recommend >>>>> someone who is just diving into GL. I feel my Python skills are pretty >>>>> strong at this point. I understand that Blender can be scripted using >>>>> Python, would this be a good place to start or should I use a >>>>> stand-alone >>>>> python module? >>>>> >>>>> Thanks, >>>>> Kevin Veroneau >>>>> >>>>> >>>>> _______________________________________________ >>>>> Winnipeg Python Users Group mailing list >>>>> http://WinniPUG.ca >>>>> Winnipeg at python.org >>>>> http://mail.python.org/mailman/listinfo/winnipeg >>>>> >>>>> >>>>> >>>> >>> >>> >>> _______________________________________________ >>> Winnipeg Python Users Group mailing list >>> http://WinniPUG.ca >>> Winnipeg at python.org >>> http://mail.python.org/mailman/listinfo/winnipeg >>> >> >> _______________________________________________ >> Winnipeg Python Users Group mailing list >> http://WinniPUG.ca >> Winnipeg at python.org >> http://mail.python.org/mailman/listinfo/winnipeg >> > From high.res.mike at gmail.com Sat Mar 12 00:30:07 2011 From: high.res.mike at gmail.com (Mike pfaiffer) Date: Fri, 11 Mar 2011 23:30:07 -0600 Subject: [Python Wpg] Fwd: Cannot figure out this ZeroDivisionError exception In-Reply-To: References: <4D7AC091.8040009@gmail.com> Message-ID: <4D7B04DF.8000102@gmail.com> On 11-03-11 7:22 PM, Chris Macksey wrote: > On 11 March 2011 18:38, Mike pfaiffer wrote: > >> >> Just a thought. Would scale = 1/300 not produce 0 instead of the >> floating point 0.00333? It looks like you may have a data type conversion >> issue. If the numerator is an integer then the result of the division will >> be an integer. I was caught by this a couple of times (and will no doubt be >> caught by it again in the future). >> >> Later >> Mike >> >> > > Yes, it would, depending on your Python version - unless you either use from > __future__ import division to get the new division semantics, or use > 1.0/300 (or equivalent) to force it to be a float. > > Cheers, > > Chris. That's the way it worked out on my Mac. I couldn't test it on my Linux box because of hardware issues. Later Mike From kveroneau at gmail.com Sat Mar 12 15:54:53 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Sat, 12 Mar 2011 14:54:53 -0600 Subject: [Python Wpg] Fwd: Cannot figure out this ZeroDivisionError exception In-Reply-To: <4D7B04DF.8000102@gmail.com> References: <4D7AC091.8040009@gmail.com> <4D7B04DF.8000102@gmail.com> Message-ID: Thank you all for your help. I do believe that is what is causing the problem. It runs now without throwing the exception. On Fri, Mar 11, 2011 at 11:30 PM, Mike pfaiffer wrote: > On 11-03-11 7:22 PM, Chris Macksey wrote: > >> On 11 March 2011 18:38, Mike pfaiffer wrote: >> >> >>> Just a thought. Would scale = 1/300 not produce 0 instead of the >>> floating point 0.00333? It looks like you may have a data type conversion >>> issue. If the numerator is an integer then the result of the division >>> will >>> be an integer. I was caught by this a couple of times (and will no doubt >>> be >>> caught by it again in the future). >>> >>> Later >>> Mike >>> >>> >>> >> Yes, it would, depending on your Python version - unless you either use >> from >> __future__ import division to get the new division semantics, or use >> 1.0/300 (or equivalent) to force it to be a float. >> >> Cheers, >> >> Chris. >> > > That's the way it worked out on my Mac. I couldn't test it on my > Linux box because of hardware issues. > > Later > Mike > > > _______________________________________________ > Winnipeg Python Users Group mailing list > http://WinniPUG.ca > Winnipeg at python.org > http://mail.python.org/mailman/listinfo/winnipeg > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at swilliams.ca Tue Mar 22 09:25:27 2011 From: stuart at swilliams.ca (Stuart Williams) Date: Tue, 22 Mar 2011 08:25:27 -0500 Subject: [Python Wpg] Offer to present on Bo-Keep In-Reply-To: References: <4D62B928.9020203@parit.ca> Message-ID: Don't forget tomorrow (Wednesday) night's meeting. Stuart. On Fri, Mar 4, 2011 at 7:22 AM, Stuart Williams wrote: > Our next meeting will be March 23rd at 7:30 p.m. at Epic, > http://WinniPUG.ca updated to reflect this. > For meetings at Epic, the address is 167 Sherbrook, parking on the street > or in the lot at the back, website http://Epic.ca . > > I hope to see many of you there. I expect an interesting talk. > > Stuart. > > > On Mon, Feb 21, 2011 at 1:12 PM, Mark Jenkins wrote: > >> Hey WinniPUG, >> >> Scratching my head trying to figure out from the archives and wiki if >> there was a user-group meeting between November and today... >> >> I'm willing to offer a presentation on Bo-Keep, http://bokeep.org/, >> which I recently did an online 1.0 launch of (as a public project). >> (more recently then the launch party we had a few months back) >> >> http://bokeep.org/ >> >> I'll try to go beyond just the regular user-demo and show some of the >> ways in which I used python in the code. >> >> If there isn't a regular meeting schedule that I could fit in to >> anymore, I could arrange a meeting on my own if there's interest. >> >> >> Mark >> _______________________________________________ >> Winnipeg Python Users Group mailing list >> http://WinniPUG.ca >> Winnipeg at python.org >> http://mail.python.org/mailman/listinfo/winnipeg >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kveroneau at gmail.com Wed Mar 23 12:49:24 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Wed, 23 Mar 2011 11:49:24 -0500 Subject: [Python Wpg] Django 1.3 released! Message-ID: For those here who use Django, Django has now released into version 1.3, and the project is in the process of removing outdated features. One of these features is mod_python support for project deployment. There are also other incompatibilities with Django 1.2 and lower one may need to watch out for when upgrading an existing project. Full release information can be located here: http://docs.djangoproject.com/en/dev/releases/1.3/ One of the most interesting features, which I plan to check out is the ability to have Class-based views. This further increases the DRY(Don't repeat yourself) principle of Django. Kevin Veroneau -------------- next part -------------- An HTML attachment was scrubbed... URL: From kveroneau at gmail.com Sat Mar 26 13:02:17 2011 From: kveroneau at gmail.com (Kevin Veroneau) Date: Sat, 26 Mar 2011 12:02:17 -0500 Subject: [Python Wpg] Looking for employment opportunities Message-ID: Hello everyone, I have been looking into employment with Python, and unfortunately I seem to find more ASP/.NET and even PHP. I find it very unfortunate that a companies I.T. department does not see the benefits of developing application and web application using Python. Compared to PHP, Python is much more cleaner, even compared to the likes of .NET. I find this very disturbing. Ever since moving from PHP to Python for my web development, I am finding that the code is much more easier to maintain and read. Further I find myself creating application more rapidly and in less time when using Python over other technologies. Python can save businesses a lot of money in the long run, if only they embrace Python first. Does anybody here know of any local Winnipeg businesses who would take on a very enthusiastic and willing to learn more Python developer? I know all the main modules in Python and can easily navigate through the Python documentation website for method which I am not completely familiar with. I am very familiar with the UNIX command-line(Bash shell to be exact) and have been using UNIX-like systems for over 7 years now. My Python experience is just about a year, and am still continuing to learn more and as much as I can about Python programming. I am proficient in MVC programming methods, mainly with the help of Django. Since my years in Python are not great, I am more looking for a junior position where I can learn more and as much as can to better my skills in the field. I am definitely open to other programming languages, if the job requires it. I tend to learn programming languages at incredible speeds(considering the Internet is a wonderful research resource). I have mild skills in ANSI C, I am able to program console-based UNIX applications. With the help of an IDE, I am able to create Qt3 applications and bind the widgets to C code. I have also created Python GUI applications in Tk, GTK+, and Qt3. If there is anybody here interested or perhaps a local Winnipeg business, I would glad to display my current skills. Most of which are Django web applications, however I can quickly create an application to a specific spec to display my skills. My lastest achievement is a Django web application which has all the standard Customer Management Datasets. Since I have worked at an I.T. Help Desk in the past, I built this web application from the experience I gained. The result, a fully functional web-based customer management system for both customer facing and support teams to use. It includes a contact manager, asset manager, trouble ticket manager, billing and invoice manager integrated with the PayPal APIs. All of this was coded in basically 2 and a half days. Also note before I began, I knew nothing about the PayPal NVP APIs, my research and testing was also done in this period. I recently had a client of mine(I do Linux server consulting for a local Winnipeg ISP), entered into the system and their payment through PayPal worked flawlessly. Well, the first time they made the payment, there was an exception thrown, but was quickly resolved. I forgot to a copy a variable from my development server to my production server, which confused the PayPal API and it threw an exception as the variable was a NoneType. For those curious, the website can be located here: https://www.veroneau.net/ The website is fully done in Django in just 2 days time, unfortunately the large portion of the work can only be seen if one logs into an account with access to the system. I am by far now a web designer, the website template was done by a third party. Although in most web application development, usually there is a separate team for the templates. Hope to hear back from someone, Kevin Veroneau -------------- next part -------------- An HTML attachment was scrubbed... URL: