Re: Hello World

2014-12-20 Thread CM
On Sunday, December 21, 2014 2:44:50 AM UTC-5, CM wrote: > On Sunday, December 21, 2014 1:45:02 AM UTC-5, Chris Angelico wrote: > > On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote: > > > Just to be clear, writing to sys.stdout works fine in Idle. > > import sys; sys.stdout.write('hello ') >

Re: Hello World

2014-12-20 Thread Chris Angelico
On Sun, Dec 21, 2014 at 6:44 PM, CM wrote: > Yes, just tested it on the same machine in the terminal and it prints: > > Hello, world! > 13 > > Not sure what the 13 is all about. Thanks. Number of bytes output. It's the return value from the output call - common with low-level APIs. ChrisA -- ht

Re: Hello World

2014-12-20 Thread CM
On Sunday, December 21, 2014 1:45:02 AM UTC-5, Chris Angelico wrote: > On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote: > > Just to be clear, writing to sys.stdout works fine in Idle. > import sys; sys.stdout.write('hello ') > > hello #2.7 > > > > In 3.4, the number of chars? bytes? is ret

Re: Hello World

2014-12-20 Thread Chris Angelico
On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy wrote: > Just to be clear, writing to sys.stdout works fine in Idle. import sys; sys.stdout.write('hello ') > hello #2.7 > > In 3.4, the number of chars? bytes? is returned and written also. > > Whether you mean something different by 'stdout' or

Re: Hello World

2014-12-20 Thread Terry Reedy
On 12/21/2014 12:31 AM, Chris Angelico wrote: On Sun, Dec 21, 2014 at 4:14 PM, CM wrote: I ran it in IDLE with Python 2.7.8 and got: Traceback (most recent call last): File "C:/Python27/helloworld.py", line 39, in lambda _, __, ___, , _, __, ___, : _ File "C

Re: Hello World

2014-12-20 Thread Chris Angelico
On Sun, Dec 21, 2014 at 4:14 PM, CM wrote: > I ran it in IDLE with Python 2.7.8 and got: > > Traceback (most recent call last): > File "C:/Python27/helloworld.py", line 39, in > lambda _, __, ___, , _, __, ___, : _ > File "C:/Python27/helloworld.py", line 21, in >

Re: Hello World

2014-12-20 Thread Steven D'Aprano
CM wrote: > On Saturday, December 20, 2014 7:57:19 AM UTC-5, Steven D'Aprano wrote: >> Taken from Ben Kurtovic's blog: >> >> http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html [...] > I ran it in IDLE with Python 2.7.8 and got: > > Traceback (most recent call last): > File "C:/Pyth

Re: Hello World

2014-12-20 Thread CM
On Saturday, December 20, 2014 7:57:19 AM UTC-5, Steven D'Aprano wrote: > Taken from Ben Kurtovic's blog: > > http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html > > > > (lambda _, __, ___, , _, __, ___, : > getattr( > __import__(True.__class__.__n

Re: very weird pandas behavior

2014-12-20 Thread Steven D'Aprano
ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the > C-prompt, I ran this: "pip install pandas" C-prompt? Are you maybe running Windows? I'll assume so. > It looks like everything downloaded and installed fine. Great. Did pip print any output? What did it

Re: Hello World

2014-12-20 Thread alister
On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: > Taken from Ben Kurtovic's blog: > > http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html > > > > (lambda _, __, ___, , _, __, ___, : > getattr( > __import__(True.__class__.__name__[_] + >

Re: Hello World

2014-12-20 Thread Steve Hayes
On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: >Taken from Ben Kurtovic's blog: > >http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html > > > >(lambda _, __, ___, , _, __, ___, : >getattr( >__import__(True.__class__.__name__[_] + [].__clas

SQLObject 2.0

2014-12-20 Thread Oleg Broytman
Hello! I'm pleased to announce version 2.0.0, the first stable release of branch 2.0 of SQLObject. What's new in SQLObject === Features & Interface * DateTimeCol and TimeCol can read and write values with microseconds. WARNING: microseconds are suppo

Re: Hello World

2014-12-20 Thread Rustom Mody
On Saturday, December 20, 2014 6:27:19 PM UTC+5:30, Steven D'Aprano wrote: > Taken from Ben Kurtovic's blog: > > http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html > > > > (lambda _, __, ___, , _, __, ___, : > getattr( > __import__(True.__class__.

Re: Old newbie needs help.

2014-12-20 Thread Larry Martell
On Sat, Dec 20, 2014 at 11:34 AM, John Culleton wrote: > This week I wrote my first Python program, a script callable from Scribus, a > DTP program. It ran! Now I want to spread my wings a little. How do I call a > C language executable subprogram from Python and pass information back and > for

Old newbie needs help.

2014-12-20 Thread John Culleton
This week I wrote my first Python program, a script callable from Scribus, a DTP program. It ran! Now I want to spread my wings a little. How do I call a C language executable subprogram from Python and pass information back and forth? I am of the old school, meaning that object oriented progra

Re: Hello World

2014-12-20 Thread Mark Lawrence
On 20/12/2014 12:57, Steven D'Aprano wrote: Taken from Ben Kurtovic's blog: http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html (lambda _, __, ___, , _, __, ___, : getattr( __import__(True.__class__.__name__[_] + [].__class__.__name__[__]),

very weird pandas behavior

2014-12-20 Thread ryguy7272
I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: "pip install pandas" It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import pandas as pd I get this error. Traceback (most recent call last): File ""

RE: Simple background sound effect playback

2014-12-20 Thread Jacob Kruger
Ok, thanks - the following seemed to work perfectly: #start code import pygame, time pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=4096) song = pygame.mixer.Sound("bird.ogg") channel = pygame.mixer.Sound.play(song) channel.set_volume(0, 1) time.sleep(1) channel.set_volume(1, 0) c

Re: Bug? Feature? setattr(foo, '3', 4) works!

2014-12-20 Thread Cem Karan
On Dec 19, 2014, at 10:33 AM, random...@fastmail.us wrote: > On Fri, Dec 19, 2014, at 07:23, Ben Finney wrote: >> Cem Karan writes: >>> I'd like to suggest that getattr(), setattr(), and hasattr() all be >>> modified so that syntactically invalid statements raise SyntaxErrors. >> >> What syntac

Re: resource based job queue manager

2014-12-20 Thread Cem Karan
On Dec 19, 2014, at 11:53 AM, Parthiban Ramachandran wrote: > can someone suggest a resource based job queue manager. for eg i have 3 > resources and 10 jobs based on the resource busy/free we should start running > the jobs. I can write the code but want to know if there is any established

Re: Hello World

2014-12-20 Thread Chris Angelico
On Sat, Dec 20, 2014 at 11:57 PM, Steven D'Aprano wrote: > Taken from Ben Kurtovic's blog: > > http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html Introduction to Functional Programming in Python. Sadly, it doesn't work on Python 3. Someone needs to port it, otherwise Py3 adoption wil

Hello World

2014-12-20 Thread Steven D'Aprano
Taken from Ben Kurtovic's blog: http://benkurtovic.com/2014/06/01/obfuscating-hello-world.html (lambda _, __, ___, , _, __, ___, : getattr( __import__(True.__class__.__name__[_] + [].__class__.__name__[__]), ().__class__.__eq__.__class__.__name__[:__]

Re: Changing script's search path at install time

2014-12-20 Thread Steven D'Aprano
Mitko Haralanov wrote: > Hi all, > > I have a question regarding installation of Python scripts and modules > using distutils that I can't find an answer to by searching through Google > and the Python website. Hopefully, someone on this list might have ideas? > > I am writing a Python app, whic

Re: Simple background sound effect playback

2014-12-20 Thread catalinf...@gmail.com
See this : >>> pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=4096) >>> song = pygame.mixer.Sound("bird.ogg") >>> pygame.mixer.Sound.play(song) and then use the >>> channel.set_volume(0, 1) >>> time.sleep(1) On Wednesday, December 17, 2014 10:02:30 PM UTC+2, Jacob Kruger wrote: