comp.lang.python - 26 new messages in 6 topics - digest
comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en
comp.lang.python@googlegroups.com
Today's topics:
* question about input() and/or raw_input() - 17 messages, 8 authors
http://groups.google.com/group/comp.lang.python/t/310565f7979cee4c?hl=en
* What's wrong with scientific Python? - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.python/t/20a7b4de875075c0?hl=en
* Python Scalability TCP Server + Background Game - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/8234bf03949a8164?hl=en
* graphical python - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/fbe4c24dcdbb015d?hl=en
* python-daemon for Python v3 - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/f93a6aca18b45b46?hl=en
* Help with simple code that has database defined - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/b71867faf4711297?hl=en
==============================================================================
TOPIC: question about input() and/or raw_input()
http://groups.google.com/group/comp.lang.python/t/310565f7979cee4c?hl=en
==============================================================================
== 1 of 17 ==
Date: Sun, Jan 19 2014 8:38 am
From: Chris Angelico
On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
>>> --> def quux1(x): return str(x+1)
>> --> quux1(2.3)
>> '3.3'
>
> (Will be) fixed in 3.5 [1] :)
> [1] Which is to say, both will raise an exception.
Why would that raise?
ChrisA
== 2 of 17 ==
Date: Sun, Jan 19 2014 9:12 am
From: Dennis Lee Bieber
On Sun, 19 Jan 2014 16:14:48 +0000 (UTC), Grant Edwards
<invalid@invalid.invalid> declaimed the following:
>On 2014-01-18, Terry Reedy <tjreedy@udel.edu> wrote:
>> On 1/18/2014 1:30 PM, Roy Smith wrote:
>>> Pardon me for being cynical, but in the entire history of the universe,
>>> has anybody ever used input()/raw_input() for anything other than a
>>> homework problem?
>>
>> Homework problems (and 'toy' programs, such as hangman), whether in a
>> programming class or elsewhere, are one of the intended use cases of
>> Python. How else would you get interactive input without the complexity
>> of a gui?
>
>sys.stdin.readline()
At which point a simple:
nm = raw_input("Enter your name: ")
print "Hello, ", nm
turns into (to duplicate the behavior WRT line endings, and to minimize the
new features the student is exposed to)
import sys
sys.stdout.write("Enter your name: ")
nm = sys.stdin.readline()
nm.strip()
sys.stdout.write("Hello, ")
sys.stdout.write(nm)
sys.stdout.write("\n")
sys.stdout.flush()
Yes, a non-beginner would have been exposed to formatting operations
and been able to condense the three .write() calls into one... But the
assignment has gone from "learn how to do simple input and output" into
"learn about importable modules, learn how to handle line endings, and
maybe figure out simple I/O in all of that"
If that was the only route I'd rapidly end up creating a utility module
with, to start with, a simple <?>
import sys
def input(prompt=None):
if prompt:
sys.stdout.write(prompt)
return sys.stdin.readline().strip()
I rarely find a need to work at the sys.std*** level. Anything needing
that level of control is probably using a data file specified on the
command line and not interactive console...
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
== 3 of 17 ==
Date: Sun, Jan 19 2014 9:42 am
From: Grant Edwards
On 2014-01-19, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
> On Sun, 19 Jan 2014 16:14:48 +0000 (UTC), Grant Edwards
><invalid@invalid.invalid> declaimed the following:
>
>>On 2014-01-18, Terry Reedy <tjreedy@udel.edu> wrote:
>>> On 1/18/2014 1:30 PM, Roy Smith wrote:
>>>> Pardon me for being cynical, but in the entire history of the universe,
>>>> has anybody ever used input()/raw_input() for anything other than a
>>>> homework problem?
>>>
>>> Homework problems (and 'toy' programs, such as hangman), whether in a
>>> programming class or elsewhere, are one of the intended use cases of
>>> Python. How else would you get interactive input without the complexity
>>> of a gui?
>>
>>sys.stdin.readline()
>
> At which point a simple:
>
> nm = raw_input("Enter your name: ")
> print "Hello, ", nm
>
> turns into (to duplicate the behavior WRT line endings, and to minimize the
> new features the student is exposed to)
>
> import sys
>
> sys.stdout.write("Enter your name: ")
> nm = sys.stdin.readline()
> nm.strip()
> sys.stdout.write("Hello, ")
> sys.stdout.write(nm)
> sys.stdout.write("\n")
> sys.stdout.flush()
The question was how to get input without using a GUI. I presented an
answer. You then conflated "whether or not to use input" with
"whether or not to use print" and proceeded to construct and knock
down a very nice straw man. Kudos.
import sys
print "Enter your name: ",
nm = sys.stdin.readline().strip()
print "Hello, ", nm
> Yes, a non-beginner would have been exposed to formatting operations
> and been able to condense the three .write() calls into one...
1) I don't get why you jumped on the whole print vs. string formatting
thing. We're not talking about print vs write. We're talking
about whether or not people use input and raw_input. I've been
writing Python programs for 15 years, and I've never used either
input or raw_input.
2) I didn't claim that sys.stdin.readline() was as simple as using
input. I didn't claim it was preferable. I merely presented it as
a refutation to the argument that if you don't use input/raw_input
then you have to use a GUI toolkit.
--
Grant
== 4 of 17 ==
Date: Sun, Jan 19 2014 9:59 am
From: Chris Angelico
On Mon, Jan 20, 2014 at 4:42 AM, Grant Edwards <invalid@invalid.invalid> wrote:
> 2) I didn't claim that sys.stdin.readline() was as simple as using
> input. I didn't claim it was preferable. I merely presented it as
> a refutation to the argument that if you don't use input/raw_input
> then you have to use a GUI toolkit.
I'd draw a subtle distinction here, btw. With sys.stdin.readline(),
you're asking to read a line from standard input, but with
(raw_)input(), you're asking to read one line from the console. If
it's been redirected, that's going to be equivalent (modulo newline
handling), but if not, it would make sense for (raw_)input() to call
on GNU Readline, where sys.stdin.readline() shouldn't. Calling a
method on a file-like object representing stdin feels lower level than
"ask the user for input with this prompt" (which might well do more
than that, too - eg it might flush sys.stdout).
ChrisA
== 5 of 17 ==
Date: Sun, Jan 19 2014 10:07 am
From: Mark Lawrence
On 18/01/2014 18:41, Mark Lawrence wrote:
> On 18/01/2014 18:30, Roy Smith wrote:
>> Pardon me for being cynical, but in the entire history of the universe,
>> has anybody ever used input()/raw_input() for anything other than a
>> homework problem?
>>
>
> Not me personally. I guess raw_input must have been used somewhere at
> some time for something, or it would have been scrapped in Python 3, not
> renamed to input.
>
Actually, to go off at a tangent, I'm just getting into GUIs via
wxPython. I've discovered there are distinct advantages having to write
endless lines of code just to get a piece of data. For example on a
Sunday it helps pass the time between the two sessions of the Masters
Snooker final being shown on TV.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 6 of 17 ==
Date: Sun, Jan 19 2014 10:15 am
From: Grant Edwards
On 2014-01-19, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> On 18/01/2014 18:41, Mark Lawrence wrote:
>> On 18/01/2014 18:30, Roy Smith wrote:
>>> Pardon me for being cynical, but in the entire history of the universe,
>>> has anybody ever used input()/raw_input() for anything other than a
>>> homework problem?
>>
>> Not me personally. I guess raw_input must have been used somewhere at
>> some time for something, or it would have been scrapped in Python 3, not
>> renamed to input.
>
> Actually, to go off at a tangent, I'm just getting into GUIs via
> wxPython. I've discovered there are distinct advantages having to
> write endless lines of code just to get a piece of data. For example
> on a Sunday it helps pass the time between the two sessions of the
> Masters Snooker final being shown on TV.
Fair enough, but what do you do to pass the time _during_ Snooker
being shown on TV?
I can still remember the point in my first trip to the UK when I
accidentally stumbled across darts on TV. Given the endless variety
(and quantity) of pointless crap that people watch here in the US, I
can't really explain why I was so baffled and amused by darts on TV --
but I was.
--
Grant Edwards grant.b.edwards Yow! I want EARS! I want
at two ROUND BLACK EARS
gmail.com to make me feel warm
'n secure!!
== 7 of 17 ==
Date: Sun, Jan 19 2014 9:50 am
From: Ethan Furman
On 01/19/2014 08:38 AM, Chris Angelico wrote:
> On Mon, Jan 20, 2014 at 3:14 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
>>>> --> def quux1(x): return str(x+1)
>>> --> quux1(2.3)
>>> '3.3'
>>
>> (Will be) fixed in 3.5 [1] :)
>> [1] Which is to say, both will raise an exception.
>
> Why would that raise?
Sorry, should have read that closer. It will not raise.
The difference I was thinking of is:
"%h" % 3.14 # this works
vs.
hex(3.14) # this raises
In 3.5 both will raise.
Apologies for the noise.
--
~Ethan~
== 8 of 17 ==
Date: Sun, Jan 19 2014 10:37 am
From: Roy Smith
In article <lbh4oc$nqv$1@reader1.panix.com>,
Grant Edwards <invalid@invalid.invalid> wrote:
> I can still remember the point in my first trip to the UK when I
> accidentally stumbled across darts on TV. Given the endless variety
> (and quantity) of pointless crap that people watch here in the US, I
> can't really explain why I was so baffled and amused by darts on TV --
> but I was.
What's so complicated?
points = 501
for dart in throws():
if points - dart == 0 and dart.is_double():
raise YouWin
if points - dart < 0:
continue
points -= dart
beer.drink()
== 9 of 17 ==
Date: Sun, Jan 19 2014 10:41 am
From: Chris Angelico
On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
> The difference I was thinking of is:
>
> "%h" % 3.14 # this works
>
> vs.
>
> hex(3.14) # this raises
>
> In 3.5 both will raise.
Now you have me *thoroughly* intrigued. It's not %h (incomplete format
- h is a modifier), nor %H (unsupported format character). Do you mean
%x? As of 3.4.0b2, that happily truncates a float:
>>> "%x" % 3.14
'3'
Is that changing in 3.5? Seems a relatively insignificant point, tbh!
Anyway, no biggie.
ChrisA
== 10 of 17 ==
Date: Sun, Jan 19 2014 10:43 am
From: Chris Angelico
On Mon, Jan 20, 2014 at 5:37 AM, Roy Smith <roy@panix.com> wrote:
> What's so complicated?
>
> points = 501
> for dart in throws():
> if points - dart == 0 and dart.is_double():
> raise YouWin
> if points - dart < 0:
> continue
> points -= dart
> beer.drink()
assert victory
raise beer
ChrisA
== 11 of 17 ==
Date: Sun, Jan 19 2014 11:11 am
From: Grant Edwards
On 2014-01-19, Roy Smith <roy@panix.com> wrote:
> In article <lbh4oc$nqv$1@reader1.panix.com>,
> Grant Edwards <invalid@invalid.invalid> wrote:
>
>> I can still remember the point in my first trip to the UK when I
>> accidentally stumbled across darts on TV. Given the endless variety
>> (and quantity) of pointless crap that people watch here in the US, I
>> can't really explain why I was so baffled and amused by darts on TV --
>> but I was.
>
> What's so complicated?
>
> points = 501
> for dart in throws():
> if points - dart == 0 and dart.is_double():
> raise YouWin
> if points - dart < 0:
> continue
> points -= dart
> beer.drink()
That looks like an algorithm for _playing_ darts. That I understand.
I have two dartboards (one real, one electronic) and a coule decent
sets of darts. It's watching darts on TV that I don't get.
Actually, I don't really get watching any sort of sports on TV (even
the ones I play). But there was just something about darts on TV that
seemed particularly beyond the pale.
--
Grant Edwards grant.b.edwards Yow! But they went to MARS
at around 1953!!
gmail.com
== 12 of 17 ==
Date: Sun, Jan 19 2014 11:17 am
From: Mark Lawrence
On 19/01/2014 18:15, Grant Edwards wrote:
> On 2014-01-19, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>> On 18/01/2014 18:41, Mark Lawrence wrote:
>>> On 18/01/2014 18:30, Roy Smith wrote:
>>>> Pardon me for being cynical, but in the entire history of the universe,
>>>> has anybody ever used input()/raw_input() for anything other than a
>>>> homework problem?
>>>
>>> Not me personally. I guess raw_input must have been used somewhere at
>>> some time for something, or it would have been scrapped in Python 3, not
>>> renamed to input.
>>
>> Actually, to go off at a tangent, I'm just getting into GUIs via
>> wxPython. I've discovered there are distinct advantages having to
>> write endless lines of code just to get a piece of data. For example
>> on a Sunday it helps pass the time between the two sessions of the
>> Masters Snooker final being shown on TV.
>
> Fair enough, but what do you do to pass the time _during_ Snooker
> being shown on TV?
>
> I can still remember the point in my first trip to the UK when I
> accidentally stumbled across darts on TV. Given the endless variety
> (and quantity) of pointless crap that people watch here in the US, I
> can't really explain why I was so baffled and amused by darts on TV --
> but I was.
>
Just no comparison, darts and snooker. This is excellent though
http://www.youtube.com/watch?v=sHnBppccI0o
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 13 of 17 ==
Date: Sun, Jan 19 2014 11:24 am
From: Larry Martell
On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> On 19/01/2014 18:15, Grant Edwards wrote:
>>
>> On 2014-01-19, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>>> Actually, to go off at a tangent, I'm just getting into GUIs via
>>> wxPython. I've discovered there are distinct advantages having to
>>> write endless lines of code just to get a piece of data. For example
>>> on a Sunday it helps pass the time between the two sessions of the
>>> Masters Snooker final being shown on TV.
>>
>>
>> Fair enough, but what do you do to pass the time _during_ Snooker
>> being shown on TV?
>>
>> I can still remember the point in my first trip to the UK when I
>> accidentally stumbled across darts on TV. Given the endless variety
>> (and quantity) of pointless crap that people watch here in the US, I
>> can't really explain why I was so baffled and amused by darts on TV --
>> but I was.
>>
>
> Just no comparison, darts and snooker. This is excellent though
> http://www.youtube.com/watch?v=sHnBppccI0o
Now that we're way off on the tangent of what some people consider
boring and others don't, I'm really looking forward to watching
curling in the upcoming Olympics.
== 14 of 17 ==
Date: Sun, Jan 19 2014 11:29 am
From: Mark Lawrence
On 19/01/2014 19:24, Larry Martell wrote:
> On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>> On 19/01/2014 18:15, Grant Edwards wrote:
>>>
>>> On 2014-01-19, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>>>> Actually, to go off at a tangent, I'm just getting into GUIs via
>>>> wxPython. I've discovered there are distinct advantages having to
>>>> write endless lines of code just to get a piece of data. For example
>>>> on a Sunday it helps pass the time between the two sessions of the
>>>> Masters Snooker final being shown on TV.
>>>
>>>
>>> Fair enough, but what do you do to pass the time _during_ Snooker
>>> being shown on TV?
>>>
>>> I can still remember the point in my first trip to the UK when I
>>> accidentally stumbled across darts on TV. Given the endless variety
>>> (and quantity) of pointless crap that people watch here in the US, I
>>> can't really explain why I was so baffled and amused by darts on TV --
>>> but I was.
>>>
>>
>> Just no comparison, darts and snooker. This is excellent though
>> http://www.youtube.com/watch?v=sHnBppccI0o
>
> Now that we're way off on the tangent of what some people consider
> boring and others don't, I'm really looking forward to watching
> curling in the upcoming Olympics.
>
Curling, now there's another good reason to allow Scottish independance :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 15 of 17 ==
Date: Sun, Jan 19 2014 11:16 am
From: Ethan Furman
On 01/19/2014 10:41 AM, Chris Angelico wrote:
> On Mon, Jan 20, 2014 at 4:50 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
>> The difference I was thinking of is:
>>
>> "%h" % 3.14 # this works
>>
>> vs.
>>
>> hex(3.14) # this raises
>>
>> In 3.5 both will raise.
>
> Now you have me *thoroughly* intrigued. It's not %h (incomplete format
> - h is a modifier), nor %H (unsupported format character). Do you mean
> %x? As of 3.4.0b2, that happily truncates a float:
>
>>>> "%x" % 3.14
> '3'
>
> Is that changing in 3.5? Seems a relatively insignificant point, tbh!
Argh. Yes, %x or %X.
--
~Ethan~
== 16 of 17 ==
Date: Sun, Jan 19 2014 12:12 pm
From: Gene Heskett
On Sunday 19 January 2014 15:11:52 Larry Martell did opine:
> On Sun, Jan 19, 2014 at 12:17 PM, Mark Lawrence <breamoreboy@yahoo.co.uk>
wrote:
> > On 19/01/2014 18:15, Grant Edwards wrote:
> >> On 2014-01-19, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> >>> Actually, to go off at a tangent, I'm just getting into GUIs via
> >>> wxPython. I've discovered there are distinct advantages having to
> >>> write endless lines of code just to get a piece of data. For
> >>> example on a Sunday it helps pass the time between the two sessions
> >>> of the Masters Snooker final being shown on TV.
> >>
> >> Fair enough, but what do you do to pass the time _during_ Snooker
> >> being shown on TV?
> >>
> >> I can still remember the point in my first trip to the UK when I
> >> accidentally stumbled across darts on TV. Given the endless variety
> >> (and quantity) of pointless crap that people watch here in the US, I
> >> can't really explain why I was so baffled and amused by darts on TV
> >> -- but I was.
> >
> > Just no comparison, darts and snooker. This is excellent though
> > http://www.youtube.com/watch?v=sHnBppccI0o
>
> Now that we're way off on the tangent of what some people consider
> boring and others don't, I'm really looking forward to watching
> curling in the upcoming Olympics.
I have Larry, and the suspense is not good for those with high blood
pressure.
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Required reading:
<http://culturalslagheap.wordpress.com/2014/01/12/elemental/>
I've enjoyed just about as much of this as I can stand.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
== 17 of 17 ==
Date: Sun, Jan 19 2014 12:09 pm
From: Gene Heskett
On Sunday 19 January 2014 15:08:31 Roy Smith did opine:
> In article <lbh4oc$nqv$1@reader1.panix.com>,
>
> Grant Edwards <invalid@invalid.invalid> wrote:
> > I can still remember the point in my first trip to the UK when I
> > accidentally stumbled across darts on TV. Given the endless variety
> > (and quantity) of pointless crap that people watch here in the US, I
> > can't really explain why I was so baffled and amused by darts on TV --
> > but I was.
>
> What's so complicated?
>
> points = 501
> for dart in throws():
> if points - dart == 0 and dart.is_double():
> raise YouWin
> if points - dart < 0:
> continue
> points -= dart
> beer.drink()
Aren't you missing a fi there, or a next dart? ;-)
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Required reading:
<http://culturalslagheap.wordpress.com/2014/01/12/elemental/>
Baseball is a skilled game. It's America's game - it, and high taxes.
-- The Best of Will Rogers
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
==============================================================================
TOPIC: What's wrong with scientific Python?
http://groups.google.com/group/comp.lang.python/t/20a7b4de875075c0?hl=en
==============================================================================
== 1 of 3 ==
Date: Sun, Jan 19 2014 10:46 am
From: candide
http://cyrille.rossant.net/whats-wrong-with-scientific-python/
Any comments ?
== 2 of 3 ==
Date: Sun, Jan 19 2014 11:10 am
From: Mark Lawrence
On 19/01/2014 18:46, candide wrote:
>
> http://cyrille.rossant.net/whats-wrong-with-scientific-python/
>
> Any comments ?
>
Not worth reading as doesn't seem to have anything new to say. As for
Python 2 being obsolete, well I just give up :(
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 3 of 3 ==
Date: Sun, Jan 19 2014 11:23 am
From: Ben Finney
candide <pascal.ortiz@gmail.com> writes:
> http://cyrille.rossant.net/whats-wrong-with-scientific-python/
> Any comments ?
It's in need of a good summary.
--
\ "I have never imputed to Nature a purpose or a goal, or |
`\ anything that could be understood as anthropomorphic." --Albert |
_o__) Einstein, unsent letter, 1955 |
Ben Finney
==============================================================================
TOPIC: Python Scalability TCP Server + Background Game
http://groups.google.com/group/comp.lang.python/t/8234bf03949a8164?hl=en
==============================================================================
== 1 of 2 ==
Date: Sun, Jan 19 2014 10:53 am
From: Philip Werner
On Sat, 18 Jan 2014 13:19:24 +0000, Mark Lawrence wrote:
> On 18/01/2014 12:40, phiwer@gmail.com wrote:
>
> [snip the stuff I can't help with]
>
> Here's the link you need to sort the problem with double spacing from
> google groups https://wiki.python.org/moin/GoogleGroupsPython
Thanks for the link. I've, hopefully, solved the issue by switching
to Pan instead of using google groups. :)
Regards,
Philip
== 2 of 2 ==
Date: Sun, Jan 19 2014 10:58 am
From: Chris Angelico
On Mon, Jan 20, 2014 at 5:53 AM, Philip Werner <phiwer@gmail.com> wrote:
> On Sat, 18 Jan 2014 13:19:24 +0000, Mark Lawrence wrote:
>
>> On 18/01/2014 12:40, phiwer@gmail.com wrote:
>>
>> [snip the stuff I can't help with]
>>
>> Here's the link you need to sort the problem with double spacing from
>> google groups https://wiki.python.org/moin/GoogleGroupsPython
>
> Thanks for the link. I've, hopefully, solved the issue by switching
> to Pan instead of using google groups. :)
Looking a lot more normal and readable now. Thanks!
Note that some people have experienced odd issues with Pan, possibly
relating to having multiple instances running simultaneously. You may
want to take care not to let it open up a duplicate copy of itself.
ChrisA
==============================================================================
TOPIC: graphical python
http://groups.google.com/group/comp.lang.python/t/fbe4c24dcdbb015d?hl=en
==============================================================================
== 1 of 2 ==
Date: Sun, Jan 19 2014 11:30 am
From: buck
On Sunday, January 19, 2014 12:19:29 AM UTC-8, Ian wrote:
> On Sat, Jan 18, 2014 at 10:40 PM, buck <w***@gmail.com> wrote:
>
> > I'm trying to work through Skienna's algorithms handbook, and note that the author often uses graphical representations of the diagrams to help understand (and even debug) the algorithms. I'd like to reproduce this in python.
>
> >
>
> > How would you go about this? pyQt, pygame and pyglet immediately come to mind, but if I go that route the number of people that I can share my work with becomes quite limited, as compared to the portability of javascript projects.
>
> >
>
> > I guess my question really is: has anyone had success creating an interactive graphical project in the browser using python?
>
> >
>
> > Is this a dream I should give up on, and just do this project in coffeescript/d3?
>
>
>
> You should be able to do something without much fuss using HTML 5 and
>
> either Pyjamas (which compiles Python code to Javascript) or Brython
>
> (a more or less complete implementation of Python within Javascript).
>
> For example, see the clock demo on the Brython web page.
>
>
>
> Pyjamas is the more established and probably more stable of the two
>
> projects, but you should be aware that there are currently two active
>
> forks of Pyjamas and some controversy surrounding the project
>
> leadership.
Thanks Ian.
Have you personally used pyjs successfully?
It's ominous that the examples pages are broken...
I was impressed with the accuracy of the Brython implementation. I hope they're able to decrease the web weight in future versions.
== 2 of 2 ==
Date: Sun, Jan 19 2014 12:20 pm
From: Ian Kelly
On Sun, Jan 19, 2014 at 12:30 PM, buck <workitharder@gmail.com> wrote:
> Thanks Ian.
> Have you personally used pyjs successfully?
> It's ominous that the examples pages are broken...
I don't have any personal experience with either project. I don't
know what's going on with pyjs.org currently, but the examples at the
pyj.be fork seem to be in working order.
==============================================================================
TOPIC: python-daemon for Python v3
http://groups.google.com/group/comp.lang.python/t/f93a6aca18b45b46?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Jan 19 2014 11:30 am
From: Larry Martell
On Sun, Jan 19, 2014 at 3:30 AM, Asaf Las <roegltd@gmail.com> wrote:
> Hi Community
>
> Is there ported to Python v3 python-daemon package?
>
> https://pypi.python.org/pypi/python-daemon/
>
> i am afraid it is not as simple as correction of relative path input
> feature and except clauses in mentioned package.
I use this technique for demonizing:
http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
And has been ported to 3:
http://www.jejik.com/files/examples/daemon3x.py
==============================================================================
TOPIC: Help with simple code that has database defined
http://groups.google.com/group/comp.lang.python/t/b71867faf4711297?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Jan 19 2014 12:05 pm
From: Denis McMahon
On Sat, 18 Jan 2014 18:23:01 -0800, indar kumar wrote:
> I have to save students information in a database that is keeping
> continuously track of the information. Format is as follows:
You probably need to use one of the database modules.
> Note: if this name already exists there in database, just update the
> information of that(name) e.g course,grade and date. Otherwise, add it.
That sounds like an sql issue specific to your chosen database, not a
python issue.
> This is just part because this is what I know how to do, for rest have
> no idea
I suggest you get idea fast. Or ask your lecturers for advice. Or return
the advance you were paid on this coding job, because you don't seem to
have the skills to do it.
--
Denis McMahon, denismfmcmahon@gmail.com
==============================================================================
You received this message because you are subscribed to the Google Groups "comp.lang.python"
group.
To post to this group, visit http://groups.google.com/group/comp.lang.python?hl=en
To unsubscribe from this group, send email to comp.lang.python+unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.python/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home