Re: Network/multi-user program

2014-07-22 Thread Lele Gaifax
CHIN Dihedral writes: >> > almost nothing about JS. I worked thru a short generic tutorial a couple >> > Please check Pyjs and Python with flash > in http://pyjs.org/examples/Space.html > for the front end part of GUI under a > browser. > Yes, that's an option: I used Pyjamas (btw, did it surv

Re: Unicode, stdout, and stderr

2014-07-22 Thread Steven D'Aprano
On Tue, 22 Jul 2014 08:18:08 +0200, Frank Millman wrote: > Hi all > > This is not important, but I would appreciate it if someone could > explain the following, run from cmd.exe on Windows Server 2003 - > > C:\>python > Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 > b

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
"Lele Gaifax" wrote in message news:87lhrl28ie.fsf@nautilus.nautilus... > "Frank Millman" writes: > >> Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 >> bit >> (In >> tel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. > x = '\

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
"Steven D'Aprano" wrote in message news:53ce0b96$0$29897$c3e8da3$54964...@news.astraweb.com... > On Tue, 22 Jul 2014 08:18:08 +0200, Frank Millman wrote: > >> Hi all >> >> This is not important, but I would appreciate it if someone could >> explain the following, run from cmd.exe on Windows Serv

Re: Unicode, stdout, and stderr

2014-07-22 Thread Peter Otten
Frank Millman wrote: > Hi all > > This is not important, but I would appreciate it if someone could explain > the following, run from cmd.exe on Windows Server 2003 - > > C:\>python > Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 > bit (In > tel)] on win32 > Type "help

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
"Frank Millman" writes: >> No, both statements actually emit noise on the standard output, but the >> former prints the *repr* of the string, the latter tries to encode it to >> CP437, which you console seems to be using. >> > > Thanks, Lele, but I don't think that is quite right - see my separat

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
"Frank Millman" writes: > "Steven D'Aprano" wrote in message > news:53ce0b96$0$29897$c3e8da3$54964...@news.astraweb.com... >> I would be surprised if that were the case, but I don't have a Windows >> box to test it. Try this: >> >> >> import sys >> print(x, file=sys.stderr) # I expect this wil

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
"Lele Gaifax" wrote in message news:87d2cx271o.fsf@nautilus.nautilus... > "Frank Millman" writes: > >>> No, both statements actually emit noise on the standard output, but the >>> former prints the *repr* of the string, the latter tries to encode it to >>> CP437, which you console seems to be u

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
Peter Otten <__pete...@web.de> writes: > No, both print to stdout, but just > x > > is passed to the display hook of the interactive interpreter. This applies > repr() and then tries to print the result. If this fails it makes another > effort, roughly (the actual code is written in C) > >

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
"Peter Otten" <__pete...@web.de> wrote in message news:lql3am$2q7$1...@ger.gmane.org... > Frank Millman wrote: > >> Hi all >> >> This is not important, but I would appreciate it if someone could explain >> the following, run from cmd.exe on Windows Server 2003 - >> >> C:\>python >> Python 3.4.1 (

Re: Network/multi-user program

2014-07-22 Thread Monte Milanuk
On 2014-07-22, Lele Gaifax wrote: > On the other hand, it has good and extensive examples, so the learning > curve is not so steep (I'm clearly biased here, but I introduced several > young developers to that environment and that's what they said too). Any experience with angular js? Browsing th

Re: Network/multi-user program

2014-07-22 Thread Lele Gaifax
Monte Milanuk writes: > On 2014-07-22, Lele Gaifax wrote: >> On the other hand, it has good and extensive examples, so the learning >> curve is not so steep (I'm clearly biased here, but I introduced several >> young developers to that environment and that's what they said too). > > Any experien

Re: Unicode, stdout, and stderr

2014-07-22 Thread Peter Otten
Frank Millman wrote: > > "Peter Otten" <__pete...@web.de> wrote in message > news:lql3am$2q7$1...@ger.gmane.org... >> Frank Millman wrote: >> >>> Hi all >>> >>> This is not important, but I would appreciate it if someone could >>> explain the following, run from cmd.exe on Windows Server 2003 - >

Re: Network/multi-user program

2014-07-22 Thread Chris Angelico
On Tue, Jul 22, 2014 at 5:54 PM, Monte Milanuk wrote: > Well... thats part of where my lack of experience with js or complex > projects using anything other than just python is going to show: > initially I thought javascript was just for buttons/effects in the > client browser as thats all the tri

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
"Peter Otten" <__pete...@web.de> wrote in message news:lql9oi$hlt$1...@ger.gmane.org... > Frank Millman wrote: > [...] > >> Out of interest, does the same thing happen when writing to sys.stderr? > > If you are asking about the fallback mechanism, that is specific to > sys.displayhook in the inte

Re: Network/multi-user program

2014-07-22 Thread Andrea D'Amore
On 2014-07-21 16:07:22 +, Monte Milanuk said: So I guess I'm asking for advice or simplified examples of how to go about connecting a client desktop app to a parent/master desktop app, so I can get some idea of how big of a task I'm looking at here, and whether that would be more or less dif

Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
Hi, I am trying to play around with python and xslt. I have an xml and I want to transform it to another xml by deleting its one element. The xml is pasted below: I want to remove the tag and this is how my xsl file looks like: http://www.w3.org/1999/XSL/Transform";>

Re: Removing xml element and strip extra space

2014-07-22 Thread Monte Milanuk
On 2014-07-22, varun bhatnagar wrote: > I want to strip the space between ** and ** > Can anyone suggest a way out to do that? Look at str.rstrip() - by default it removes trailing whitespace including carriage returns. -- https://mail.python.org/mailman/listinfo/python-list

Re: Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
Hi, Thank you so much for the suggestion. I tried using the rstrip() function but that did not work. Still getting a blank space between ** and * *as mentioned in the above output xml file: ** * * Is there any other way through which this can be achieved? Can't this be handled by xslt itself i

Re: Removing xml element and strip extra space

2014-07-22 Thread Tim
On Tuesday, July 22, 2014 8:53:35 AM UTC-4, varun bhatnagar wrote: > Hi, > Thank you so much for the suggestion. > I tried using the rstrip() function but that did not work. Still getting a > blank space between  and  as mentioned in the above > output xml file: >                                

Re: Removing xml element and strip extra space

2014-07-22 Thread varun bhatnagar
Hi Tim, Thanks for replying. No that is not the output I am looking for. I just want to scrape out But the way I have written my xsl file it is removing it but it is also leaving a blank space there. I want my output to look like this: ** ** But in actual it is showing like this:

Re: OT: usenet reader software

2014-07-22 Thread Anssi Saari
memilanuk writes: > I'm on Ubuntu (14.04 LTS, if it matters) and I've been using > Thunderbird for a lng time... I've tinkered with slrn off and on > over the years, tried pan occasionally due to recommendations... but I > keep ending up back @ Thunderbird. About the only thing it doesn't do

Re: OT: usenet reader software

2014-07-22 Thread Anssi Saari
Marko Rauhamaa writes: > Martin S : > >> Is there a point to still use Usenet? Last time I checked noise >> overwhelmed signal by a factor of something close to 542. > > Well, here you are at news:comp.lang.python>, in the middle of all > that noise. Besides, there's been a slight resurgence in

testfixtures 4.0.0 Released!

2014-07-22 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.0.0. This is a new feature release with the following major changes: - Moved from buildout to virtualenv for development. - compare() will now work recursively on data structures for which it has registered comparers, giving more

Re: Network/multi-user program

2014-07-22 Thread Grant Edwards
On 2014-07-21, Roy Smith wrote: > The truly sucky part of this picture is that javascript is a horrible > language, I'm pretty sure that the real purpose of PHP is to make javascript look like a good programming language. -- Grant Edwards grant.b.edwardsYow! RELATIVES!!

Fastest I/O on Python ?

2014-07-22 Thread Orochi
Is there in any other input/output faster than ("raw_input","input" / "print") As I am trying to solve competitive Programs on codechef.com using python i was wondering if there is any other way to print and scan the inputs fast. I have seen other people codes and there are using sys library(std

Re: Fastest I/O on Python ?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 2:06 AM, Orochi wrote: > Is there in any other input/output faster than ("raw_input","input" / "print") > As I am trying to solve competitive Programs on codechef.com using python i > was wondering if there is any other way to print and scan the inputs fast. What do you m

Re: Fastest I/O on Python ?

2014-07-22 Thread emile
On 07/22/2014 09:06 AM, Orochi wrote: Is there in any other input/output faster than ("raw_input","input" / "print") The limitation is with the device -- either the human typing in responses or the output device rendering the output. If you have the option to read/write to disk that'd open u

Re: Anything better than asyncio.as_completed() and asyncio.wait() to manage execution of large amount of tasks?

2014-07-22 Thread CHIN Dihedral
On Thursday, July 17, 2014 7:09:02 AM UTC+8, Maxime Steisel wrote: > 2014-07-15 14:20 GMT+02:00 Valery Khamenya : > > > Hi, > > > > > > both asyncio.as_completed() and asyncio.wait() work with lists only. No > > > generators are accepted. Are there anything similar to those functions that > >

Re: OT: usenet reader software

2014-07-22 Thread Martin S
Aye I found a couple of groups that are still active. Most of it seems to be a digital ghost town though. A bit sad, I was once actively involved in setting up the se. * hierarchy. /martin s On 22 Jul 2014, Anssi Saari wrote: >Marko Rauhamaa writes: > >> Martin S : >> >>> Is there a point to

Review my asyncio code

2014-07-22 Thread Yaşar Arabacı
Hi, I am trying to learn how to utilize aysncio module. In order to do that, I wrote a class that checks http status codes for all the pages on a given domain (unless there is no internal link pointing to it of course). Since it is too long to paste here, I uploaded it to my github repo, you can

Herion, , Actavis promethazine codeine 16oz and 32oz available Ketamine Oxycontine Hydrocodone xanax and medicated marijuana US- free shipping and other related products for sell at competitive prices

2014-07-22 Thread ismeal shanshi
Herion,,Actavis promethazine codeine 16oz and 32oz available Ketamine Oxycontine Hydrocodone xanax and medicated marijuana US- free shipping and other related products for sell at competitive prices.We do world wide shipping Herion,,Actavis promethazine codeine 16oz and 32oz available Ketami

Re: Unicode, stdout, and stderr

2014-07-22 Thread Terry Reedy
On 7/22/2014 2:18 AM, Frank Millman wrote: Hi all This is not important, but I would appreciate it if someone could explain the following, run from cmd.exe on Windows Server 2003 - C:\>python Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (In tel)] on win32 Type "h

Re: Removing xml element and strip extra space

2014-07-22 Thread Monte Milanuk
On 2014-07-22, varun bhatnagar wrote: > I just want to scrape out > But the way I have written my xsl file it is removing it but it is also > leaving a blank space there. I want my output to look like this: This is the part where a certain amount of example code showing what you're doing would p

Re: OT: usenet reader software

2014-07-22 Thread ismeal shanshi
Herion,,Actavis promethazine codeine 16oz and 32oz available Ketamine Oxycontine Hydrocodone xanax and medicated marijuana US- free shipping and other related products for sell at competitive prices.We do world wide shipping to any clear address.Delivery is 100% safe due to our discreetness an

ANN: Wing IDE 5.0.8 released

2014-07-22 Thread Wingware
Hi, Wingware has released version 5.0.8 of Wing IDE, our cross-platform integrated development environment for the Python programming language. Wing IDE includes a professional quality code editor with vi, emacs, visual studio, and other key bindings, auto-completion, call tips, goto-definiti

Re: OT: usenet reader software

2014-07-22 Thread Neil D. Cerutti
On 7/22/2014 11:14 AM, Anssi Saari wrote: I don't really know about about html and slrn since I don't see much of it but links in a terminal application is usually something for the terminal to handle. I run Gnus on a remote machine and use a local terminal for display, Konsole in Linux and mintt

Question about Pass-by-object-reference?

2014-07-22 Thread fl
Hi, I learn Python function call on tutorial. There is a link on this subject. http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as-explained-by-philip-k-dick/ Although it explains clearly, the figure makes me puzzled. ""Python is different. As we know, in Python, "Object refere

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Ned Batchelder
On 7/22/14 3:04 PM, fl wrote: Hi, I learn Python function call on tutorial. There is a link on this subject. http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as-explained-by-philip-k-dick/ Although it explains clearly, the figure makes me puzzled. ""Python is different. As we

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 3:04:09 PM UTC-4, fl wrote: Hi, Excuse me. I find that the OP misses some info. I rewrite it again: I learn Python function call on tutorial. There is a link on this subject. http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as-explained-by-philip-k-di

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 3:32:19 PM UTC-4, Ned Batchelder wrote: > On 7/22/14 3:04 PM, fl wrote: > it is here: http://nedbatchelder.com/text/names.html > > When I enter the command lines on my computer: > I recommend putting the code into a .py file, and > running it all at once. Then if it does

Re: Removing xml elemient and strip extra space

2014-07-22 Thread Joel Goldstick
On Jul 22, 2014 1:41 PM, "Monte Milanuk" wrote: > > On 2014-07-22, varun bhatnagar wrote: > > I just want to scrape out > > But the way I have written my xsl file it is removing it but it is also > > leaving a blank space there. I want my output to look like this: > > This is the part where a ce

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Peter Pearson
On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: [snip] > > But I don't understand the reassign function result: > def reassign(list): > ... list=[0,1] > ... list=[0] reassign(list) print list > [0] When you say "def reassign(list)", that means "I'm defining a function t

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 01:35 PM, Peter Pearson wrote: On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: [snip] But I don't understand the reassign function result: def reassign(list): ... list=[0,1] ... list=[0] reassign(list) print list [0] When you say "def reassign(list)", that means "I

Re: OT: usenet reader software

2014-07-22 Thread Monte Milanuk
On 2014-07-22, ismeal shanshi wrote: > Herion,,Actavis promethazine codeine 16oz and 32oz available Ketamine > Oxycontine Hydrocodone xanax and medicated marijuana US- free shipping and > other related products for sell at competitive prices.We do world wide > shipping to any clear > > address

Is it possible to install Python on a network?

2014-07-22 Thread roys2005
We are using Python in a large setup. Individual users are running Debian machines. When I want to install/upgrade Python for all users, I really want to do it centrally rather than every user having to upgrade on their own. Many software packages are installed this way. However, I could not fig

Re: OT: usenet reader software

2014-07-22 Thread Grant Edwards
On 2014-07-22, Monte Milanuk wrote: > On 2014-07-22, ismeal shanshi wrote: > [drugs for sale] > Aaaannnd here we have a good example of why it would be really nice > to be able to filter/score based on the message *body*, not just the > headers. 8( slrn filtered that out just fine based on head

Re: Is it possible to install Python on a network?

2014-07-22 Thread emile
On 07/22/2014 01:49 PM, roys2...@gmail.com wrote: We are using Python in a large setup. Individual users are running Debian machines. When I want to install/upgrade Python for all users, I really want to do it centrally rather than every user having to upgrade on their own. Many software packa

Re: OT: usenet reader software

2014-07-22 Thread Monte Milanuk
On 2014-07-22, Grant Edwards wrote: > On 2014-07-22, Monte Milanuk wrote: >> On 2014-07-22, ismeal shanshi wrote: >> [drugs for sale] > >> Aaaannnd here we have a good example of why it would be really nice >> to be able to filter/score based on the message *body*, not just the >> headers. 8( >

Re: OT: usenet reader software

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 7:21 AM, Monte Milanuk wrote: > Other people > posting from google groups are not malicious/trolls/jerks/spammers - and > honestly until I started using slrn again, I didn't understand what all > the fuss was about - gui news readers like Thunderbird handle the > messages f

Why does not pprint work?

2014-07-22 Thread fl
Hi, I read web tutorial at: http://nedbatchelder.com/blog/201308/names_and_values_making_a_game_board.html I enter the example lines of that website: import pprint board = [ [0]*8 ] * 8 pprint(board) It echos error with Python 2.7: Traceback (most recent call last): File "C:\Python27\Lib

Re: Why does not pprint work?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 7:42 AM, fl wrote: > I enter the example lines of that website: > > > import pprint > board = [ [0]*8 ] * 8 > pprint(board) Flaw in the blog post: he didn't actually specify the import line. What you actually want is this: from pprint import pprint Or use pprint.pprint(b

Re: Why does not pprint work?

2014-07-22 Thread emile
On 07/22/2014 02:42 PM, fl wrote: Hi, I read web tutorial at: http://nedbatchelder.com/blog/201308/names_and_values_making_a_game_board.html I enter the example lines of that website: import pprint board = [ [0]*8 ] * 8 pprint(board) pprint is a module name -- you need to invoke the ppri

Re: OT: usenet reader software

2014-07-22 Thread Grant Edwards
On 2014-07-22, Monte Milanuk wrote: > On 2014-07-22, Grant Edwards wrote: >> On 2014-07-22, Monte Milanuk wrote: >>> On 2014-07-22, ismeal shanshi wrote: >>> [drugs for sale] >> >>> Aaaannnd here we have a good example of why it would be really nice >>> to be able to filter/score based on the m

Re: Why does not pprint work?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 5:51:07 PM UTC-4, emile wrote: > On 07/22/2014 02:42 PM, fl wrote: > pprint is a module name -- you need to invoke the pprint function from > within the pprint module: > pprint.pprint(board) Thanks. I am curious about the two pprint. Is it the first pprint the name of t

Re: Why does not pprint work?

2014-07-22 Thread emile
On 07/22/2014 03:05 PM, fl wrote: On Tuesday, July 22, 2014 5:51:07 PM UTC-4, emile wrote: On 07/22/2014 02:42 PM, fl wrote: pprint is a module name -- you need to invoke the pprint function from within the pprint module: pprint.pprint(board) Thanks. I am curious about the two pprint. Is it th

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: > On 07/22/2014 01:35 PM, Peter Pearson wrote: > def reassign(mylist): # no reason to shadow the list builtin > mylist[:] = [0,1] > mylist = [1] > reassign(mylist) > mylist > Emile Thanks for your example. I do not find the explanation

Re: Why does not pprint work?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 8:05 AM, fl wrote: > On Tuesday, July 22, 2014 5:51:07 PM UTC-4, emile wrote: >> On 07/22/2014 02:42 PM, fl wrote: >> pprint is a module name -- you need to invoke the pprint function from >> within the pprint module: >> pprint.pprint(board) > > Thanks. I am curious about t

Re: Why does not pprint work?

2014-07-22 Thread Chris Kaynor
On Tue, Jul 22, 2014 at 3:17 PM, emile wrote: > Then, how can I list all the function of pprint? >> > > use the dir builtin: > > >>> dir (pprint) > ['PrettyPrinter', '_StringIO', '__all__', '__builtins__', '__doc__', > '__file__', '__name__', '_commajoin', '_id', '_len', '_perfcheck', > '_recursi

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Joel Goldstick
it copies the list On Tue, Jul 22, 2014 at 6:17 PM, fl wrote: > On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: > > On 07/22/2014 01:35 PM, Peter Pearson wrote: > > def reassign(mylist): # no reason to shadow the list builtin > > mylist[:] = [0,1] > > mylist = [1] > > reassign(my

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 03:17 PM, fl wrote: On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: On 07/22/2014 01:35 PM, Peter Pearson wrote: def reassign(mylist): # no reason to shadow the list builtin mylist[:] = [0,1] mylist = [1] reassign(mylist) mylist Emile Thanks for your example. I do

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 4:46:25 PM UTC-4, emile wrote: > On 07/22/2014 01:35 PM, Peter Pearson wrote: > def reassign(mylist): # no reason to shadow the list builtin > mylist[:] = [0,1] > > mylist = [1] > reassign(mylist) > mylist > > Emile I have a new question on the code. When I run it

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 03:31 PM, fl wrote: I have a new question on the code. When I run it in a file on PythonWin, 'mylist' does not echo anything on the screen. While I enter the command line by line, 'mylist' shows the result: mylist [0, 1] What mechanism is involved? As a convenience, the in

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 4:35:33 PM UTC-4, Peter Pearson wrote: > On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: > When you say "def reassign(list)", that means "I'm defining a function > to which the caller will pass one object, and within this function I'm > going to refer to that object b

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Jerry Hill
On Tue, Jul 22, 2014 at 6:17 PM, fl wrote: > Thanks for your example. I do not find the explanation of [:] on line. Could > you > explain it to me, or where can I find it on line? It's pretty hard to find if you don't already know what's going on. First, you need to know that mylst[i:j] refers

Re: Question about Pass-by-object-reference?

2014-07-22 Thread emile
On 07/22/2014 04:00 PM, fl wrote: On Tuesday, July 22, 2014 4:35:33 PM UTC-4, Peter Pearson wrote: On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl wrote: When you say "def reassign(list)", that means "I'm defining a function to which the caller will pass one object, and within this function I'm go

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Terry Reedy
When you call a function, Python binds function parameter names to argument objects in the function's local namespace, the same as in name assignments. Given def f(a, b): pass a call f(1, 'x') starts by executing a, b = 1, 'x' in the local namespace. Nothing is being 'passed'. -- Terry Jan

Re: Is it possible to install Python on a network?

2014-07-22 Thread roys2005
Emile, thanks for the quick response. Does this mean Python cannot be or should not be installed at a central location? If so, what is the root cause for this? - Koushik -- https://mail.python.org/mailman/listinfo/python-list

Re: testfixtures 4.0.0 Released!

2014-07-22 Thread Roy Smith
In article , Chris Withers wrote: > - Moved from buildout to virtualenv for development. I use virtualenv (and love it). I've never used buildout. Would you be willing to give a short synopsis of why you switched? -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode, stdout, and stderr

2014-07-22 Thread Akira Li
"Frank Millman" writes: > "Steven D'Aprano" wrote in message > news:53ce0b96$0$29897$c3e8da3$54964...@news.astraweb.com... >> On Tue, 22 Jul 2014 08:18:08 +0200, Frank Millman wrote: >> >>> This is not important, but I would appreciate it if someone could >>> explain the following, run from cmd

Re: Question about Pass-by-object-reference?

2014-07-22 Thread fl
On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: > When you call a function, Python binds function parameter names to > argument objects in the function's local namespace, the same as in name > assignments. Given > def f(a, b): pass > a call f(1, 'x') starts by executing > a, b = 1,

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Ben Finney
fl writes: > On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: > > When you call a function, Python binds function parameter names to > > argument objects in the function's local namespace, the same as in > > name assignments. […] > > Nothing is being 'passed'. > > Thanks, but I don'

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Steven D'Aprano
On Tue, 22 Jul 2014 12:04:09 -0700, fl wrote: > Hi, > I learn Python function call on tutorial. There is a link on this > subject. > http://robertheaton.com/2014/02/09/pythons-pass-by-object-reference-as- explained-by-philip-k-dick/ > > Although it explains clearly, the figure makes me puzzled.

Re: Why does not pprint work?

2014-07-22 Thread Ned Batchelder
On 7/22/14 5:49 PM, Chris Angelico wrote: On Wed, Jul 23, 2014 at 7:42 AM, fl wrote: I enter the example lines of that website: import pprint board = [ [0]*8 ] * 8 pprint(board) Flaw in the blog post: he didn't actually specify the import line. What you actually want is this: from pprint i

Re: A Pythonista Meets JavaScript™

2014-07-22 Thread Ben Finney
Ben Finney writes: > Monte Milanuk writes: > > > I know literally almost nothing about JS. > > At the Melbourne Python Users's Group this year, I gave a presentation > http://vimeo.com/album/2855296/video/93691338> on my initial > learnings of JavaScript™ (and ECMAScript) from a Python programme

Re: Is it possible to install Python on a network?

2014-07-22 Thread Dan Stromberg
On Tue, Jul 22, 2014 at 5:41 PM, roys2005 wrote: > > Emile, thanks for the quick response. > > Does this mean Python cannot be or should not be installed at a central > location? > If so, what is the root cause for this? Back when I was a sysadmin, I would install CPython to a few different NFS

Re: Is it possible to install Python on a network?

2014-07-22 Thread Ben Finney
roys2005 writes: > Does this mean Python cannot be or should not be installed at a > central location? Can you explain better what you mean by this? As stated, it doesn't make much sense to me: Any machine which supports running Python can be central or distributed, but it can only be invoked o

Distributing python applications as a zip file

2014-07-22 Thread Steven D'Aprano
A little known feature of Python: you can wrap your Python application in a zip file and distribute it as a single file. The trick to make it runnable is to put your main function inside a file called __main__.py inside the zip file. Here's a basic example: steve@runes:~$ cat __main__.py print

Re: Why does not pprint work?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 12:26 PM, Ned Batchelder wrote: >> Ned, if you're reading this: Adding the import would make the post >> clearer. :) > > > Done. Thanks Ned! ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Distributing python applications as a zip file

2014-07-22 Thread Gary Herron
On 07/22/2014 09:23 PM, Steven D'Aprano wrote: A little known feature of Python: you can wrap your Python application in a zip file and distribute it as a single file. The trick to make it runnable is to put your main function inside a file called __main__.py inside the zip file. Here's a basic e

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Steven D'Aprano
On Wed, 23 Jul 2014 11:59:45 +1000, Ben Finney wrote: > fl writes: > >> On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: >> > When you call a function, Python binds function parameter names to >> > argument objects in the function's local namespace, the same as in >> > name assignm

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Steven D'Aprano
On Tue, 22 Jul 2014 20:27:15 -0400, Terry Reedy wrote: > When you call a function, Python binds function parameter names to > argument objects in the function's local namespace, the same as in name > assignments. Given > > def f(a, b): pass > > a call f(1, 'x') starts by executing > > a, b = 1,

Re: Distributing python applications as a zip file

2014-07-22 Thread Chris Rebert
On Tue, Jul 22, 2014 at 9:23 PM, Steven D'Aprano wrote: > A little known feature of Python: you can wrap your Python application in > a zip file and distribute it as a single file. The trick to make it > runnable is to put your main function inside a file called __main__.py > inside the zip file.

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 3:35 PM, Steven D'Aprano wrote: > If you say "nothing is being passed", then my response would be "Oh, you > aren't calling the function at all? Or just calling it with no arguments?" The latter. Suppose you have a class method that takes optional args, and you override it

Re: Is it possible to install Python on a network?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 2:18 PM, Ben Finney wrote: > roys2005 writes: > >> Does this mean Python cannot be or should not be installed at a >> central location? > > Can you explain better what you mean by this? > > As stated, it doesn't make much sense to me: Any machine which supports > running P

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Ben Finney
Steven D'Aprano writes: > On Wed, 23 Jul 2014 11:59:45 +1000, Ben Finney wrote: > > fl writes: > >> On Tuesday, July 22, 2014 8:27:15 PM UTC-4, Terry Reedy wrote: > >> > Nothing is being 'passed'. > >> > >> Thanks, but I don't understand your point yet. Could you give me > >> another example in

Re: What Next After Python Basics

2014-07-22 Thread Orochi
Ok Thank You Guys for the suggestions. I am starting with simple Data Structures and Algorithm studied in College,trying to code them in python. Besides I am also trying to use Python in competitive programming.(codechef.com) Its fun. Thank you all ! -- https://mail.python.org/mailman/listinfo/