Calendar module question

2013-02-16 Thread Phil
Thank you for reading this. My adventures with Python have just begun and during the few weeks I have tried many IDEs. The following piece of code fails under all IDEs, and the interpreter, except under the Wing IDE. Why would this code work under the Wing IDE and nowhere else? Could there b

Re: call from pthon to shell

2013-02-16 Thread Jason Friedman
import os os.system("i=3") > 0 os.system("echo $i") > > 0 > > why i can not get the value of i? Each call to os.system starts a new shell. Think about what would happen if you opened a terminal and typed: $ i=3 Then, close that terminal and open a new one. You would not be surpr

Comparing types

2013-02-16 Thread Jason Friedman
I want to tell whether an object is a regular expression pattern. Python 3.2.3 (default, Oct 19 2012, 20:10:41) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> s = "hello" >>> type(s) >>> isinstance(s, str) True >>> my_pattern = re.co

Re: python on windows

2013-02-16 Thread David Robinow
On Sat, Feb 16, 2013 at 4:40 PM, babatunde akerele wrote: > hello, i'm having problem coding and running python on my pc...i just > started learning python last month in codeacademy.com but i've not > been able to code offline 'cos i don't knw how to go abt installing > the compiler and all that.

Re: python on windows

2013-02-16 Thread Michael Herman
http://www.youtube.com/watch?v=dFnuK9dlWdk On Sat, Feb 16, 2013 at 1:40 PM, babatunde akerele wrote: > hello, i'm having problem coding and running python on my pc...i just > started learning python last month in codeacademy.com but i've not > been able to code offline 'cos i don't knw how to go

python on windows

2013-02-16 Thread babatunde akerele
hello, i'm having problem coding and running python on my pc...i just started learning python last month in codeacademy.com but i've not been able to code offline 'cos i don't knw how to go abt installing the compiler and all that. Any help please? -- http://mail.python.org/mailman/listinfo/python

ANN: Python 3 enum package

2013-02-16 Thread Ethan Furman
Greetings! There was a recent thread on Python-Ideas about adding an enumeration package to the stdlib. One idea that seemed to be fairly popular (at least I like it a lot ;) was the use of a metaclass to automatically assign values when a name lookup failed. It was also fairly unpopular and

Re: python math problem

2013-02-16 Thread Dave Angel
On 02/16/2013 08:55 AM, Nobody wrote: On Fri, 15 Feb 2013 11:47:33 -0800, Gary Herron wrote: Floating point calculations on a computer (ANY computer, and ANY programming language) can *never* be expected to be exact! "never" is incorrect. There are many floating-point calculations which can r

Re: Small program ideas

2013-02-16 Thread Mark R Rivet
On Fri, 15 Feb 2013 19:57:35 -0800 (PST), eli m wrote: >On Friday, February 15, 2013 7:52:57 PM UTC-8, Mitya Sirenef wrote: >> On 02/15/2013 10:22 PM, eli m wrote: >> >> > Any small program ideas? I would prefer to stick to command line ones. >> > Thanks. >> >> >> >> How about these two: >>

Re: Small program ideas

2013-02-16 Thread Mark R Rivet
On Fri, 15 Feb 2013 22:52:57 -0500, Mitya Sirenef wrote: >On 02/15/2013 10:22 PM, eli m wrote: >> Any small program ideas? I would prefer to stick to command line ones. >> Thanks. > >How about these two: > > - simulation of a street crossing with green/red lights allowing cars >and pedestrians

Re: Exception running GNU module "op25_grc.py" : AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'

2013-02-16 Thread matt . doolittle33
> > I know nothing about this gnuradio thingie, and you didn't supply a > > website url. I was wondering if the module is even intended to be run > > standalone, but I suppose the if __name__ == "__main__" thing is a clue > > that it's supposed to. > > > > I found the mixture of trace li

Re: First attempt at a Python prog (Chess)

2013-02-16 Thread Oscar Benjamin
On 15 February 2013 15:49, Chris Angelico wrote: > On Sat, Feb 16, 2013 at 2:36 AM, Tim Golden wrote: >> How true. This last time, my team split into two: one half >> to handle the display, the other working on the algorithm. We >> ended up having to draw a really simple diagram on the back of >>

Re: python math problem

2013-02-16 Thread Roy Smith
In article , Nobody wrote: > IOW: floating-point arithmetic is deterministic. It follows rules. Not the > same rules as real arithmetic, but rules nonetheless. Contrary to > common superstition, the least-significant bits are *not* taken from > /dev/random. Unless you're using a Pentium :-) --

Re: python math problem

2013-02-16 Thread Chris Angelico
On Sun, Feb 17, 2013 at 12:55 AM, Nobody wrote: > Furthermore, any such calculation for which the correct answer isn't > exactly representable should produce the same result as if the correct > answer had been calculated to an infinite number of digits then rounded to > the nearest representable v

Re: python math problem

2013-02-16 Thread Nobody
On Fri, 15 Feb 2013 11:47:33 -0800, Gary Herron wrote: > Floating point calculations on a computer (ANY computer, and ANY > programming language) can *never* be expected to be exact! "never" is incorrect. There are many floating-point calculations which can reasonably be expected be exact[2].

Re: Python trademark - A request for civility

2013-02-16 Thread Michael Poeltl
hi, there are also ruby.co.uk lua.co.uk in my opinion someone who is on the ruby-/lua-malinglist too should warn these guys * Steven D'Aprano [2013-02-16 06:50]: > Folks, > > It seems that people have been sending threats and abuse to the company > claiming a trademark on the name "Python".