Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
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, copyright, credits or license for more

Re: Network/multi-user program

2014-07-22 Thread Lele Gaifax
Monte Milanuk memila...@invalid.com writes: On 2014-07-21, Lele Gaifax l...@metapensiero.it wrote: Monte Milanuk memila...@invalid.com writes: How hard was it to migrate from a desktop app to what you have now? Well, basically I rewrote everything, there's nothing in common. The original

Re: Network/multi-user program

2014-07-22 Thread CHIN Dihedral
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. -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
Frank Millman fr...@chagford.com 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 = '\u2119' x # this uses stderr '\u2119' print(x) # this uses stdout Traceback

Re: Top online steroid pharmacies - 2009 Best Site!

2014-07-22 Thread stuffstorehouse2014
GET A GOOD LOOKING AND SEXY BODY HERE We are suppliers and whole sellers chemical supplements. BEFORE WE SUPPLY TO YOU MAKE SURE YOU ARE NOT UNDER 18. we supply chemical supplements such as HIGH QUALITY STEROID HORMONES, HGH ,SEX PILLS, HIGH QUALITY PAIN KILLERS, MEDICAL KUSH AND HIGH QUALITY

Re: Network/multi-user program

2014-07-22 Thread Lele Gaifax
CHIN Dihedral dihedral88...@gmail.com 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

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 bit (In

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
Lele Gaifax l...@metapensiero.it wrote in message news:87lhrl28ie.fsf@nautilus.nautilus... Frank Millman fr...@chagford.com 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

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
Steven D'Aprano st...@pearwood.info 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

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 fr...@chagford.com 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

Re: Unicode, stdout, and stderr

2014-07-22 Thread Lele Gaifax
Frank Millman fr...@chagford.com writes: Steven D'Aprano st...@pearwood.info 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)

Re: Unicode, stdout, and stderr

2014-07-22 Thread Frank Millman
Lele Gaifax l...@metapensiero.it wrote in message news:87d2cx271o.fsf@nautilus.nautilus... Frank Millman fr...@chagford.com 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

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 (v3.4.1:c0e311e010fc,

Re: Network/multi-user program

2014-07-22 Thread Monte Milanuk
On 2014-07-22, Lele Gaifax l...@metapensiero.it 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

Re: Network/multi-user program

2014-07-22 Thread Lele Gaifax
Monte Milanuk memila...@invalid.com writes: On 2014-07-22, Lele Gaifax l...@metapensiero.it 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

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 - C:\python Python

Re: Network/multi-user program

2014-07-22 Thread Chris Angelico
On Tue, Jul 22, 2014 at 5:54 PM, Monte Milanuk memila...@invalid.com 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

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 interactive

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

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: ?xml version=1.0 encoding=UTF-8? testNode nodeInfo nodePeriod nodeTime=6/ nodeBase base=0 / /nodeInfo

Re: Removing xml element and strip extra space

2014-07-22 Thread Monte Milanuk
On 2014-07-22, varun bhatnagar varun292...@gmail.com wrote: I want to strip the space between *nodePeriod* and */nodeInfo* Can anyone suggest a way out to do that? Look at str.rstrip() - by default it removes trailing whitespace including carriage returns. --

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 *nodePeriod* and */nodeInfo *as mentioned in the above output xml file: *nodePeriod nodeTime=6/* * /nodeInfo* Is there any other way through which

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 nodePeriod and /nodeInfo as mentioned in the above output xml file: nodePeriod

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 nodeBase base=0 / 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: *?xml version=1.0

Re: OT: usenet reader software

2014-07-22 Thread Anssi Saari
memilanuk memila...@gmail.com 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

Re: OT: usenet reader software

2014-07-22 Thread Anssi Saari
Marko Rauhamaa ma...@pacujo.net writes: Martin S shieldf...@gmail.com: 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 URL: news:comp.lang.python, in the middle of all that noise. Besides,

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

Re: Network/multi-user program

2014-07-22 Thread Grant Edwards
On 2014-07-21, Roy Smith r...@panix.com 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!

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(stdin

Re: Fastest I/O on Python ?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 2:06 AM, Orochi kartikjagdal...@gmail.com 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

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 up

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 khame...@gmail.com: 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 a...@sci.fi wrote: Marko Rauhamaa ma...@pacujo.net writes: Martin S

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

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

Re: Removing xml element and strip extra space

2014-07-22 Thread Monte Milanuk
On 2014-07-22, varun bhatnagar varun292...@gmail.com wrote: I just want to scrape out nodeBase base=0 / 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

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

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,

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

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

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.

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 doesn't

Re: Removing xml elemient and strip extra space

2014-07-22 Thread Joel Goldstick
On Jul 22, 2014 1:41 PM, Monte Milanuk memila...@invalid.com wrote: On 2014-07-22, varun bhatnagar varun292...@gmail.com wrote: I just want to scrape out nodeBase base=0 / 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

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

2014-07-22 Thread Peter Pearson
On Tue, 22 Jul 2014 12:34:51 -0700 (PDT), fl rxjw...@gmail.com 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 to which

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 rxjw...@gmail.com 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

Re: OT: usenet reader software

2014-07-22 Thread Monte Milanuk
On 2014-07-22, ismeal shanshi stuffstorehouse2...@gmail.com 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

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

Re: OT: usenet reader software

2014-07-22 Thread Grant Edwards
On 2014-07-22, Monte Milanuk memila...@gmail.com wrote: On 2014-07-22, ismeal shanshi stuffstorehouse2...@gmail.com 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: 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

Re: OT: usenet reader software

2014-07-22 Thread Monte Milanuk
On 2014-07-22, Grant Edwards invalid@invalid.invalid wrote: On 2014-07-22, Monte Milanuk memila...@gmail.com wrote: On 2014-07-22, ismeal shanshi stuffstorehouse2...@gmail.com wrote: [drugs for sale] Aaaannnd here we have a good example of why it would be really nice to be able to

Re: OT: usenet reader software

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 7:21 AM, Monte Milanuk memila...@gmail.com 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

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

Re: Why does not pprint work?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 7:42 AM, fl rxjw...@gmail.com 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

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

Re: OT: usenet reader software

2014-07-22 Thread Grant Edwards
On 2014-07-22, Monte Milanuk memila...@gmail.com wrote: On 2014-07-22, Grant Edwards invalid@invalid.invalid wrote: On 2014-07-22, Monte Milanuk memila...@gmail.com wrote: On 2014-07-22, ismeal shanshi stuffstorehouse2...@gmail.com wrote: [drugs for sale] Aaaannnd here we have a good example

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 the

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

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 of

Re: Why does not pprint work?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 8:05 AM, fl rxjw...@gmail.com 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

Re: Why does not pprint work?

2014-07-22 Thread Chris Kaynor
On Tue, Jul 22, 2014 at 3:17 PM, emile em...@fenx.com 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',

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 rxjw...@gmail.com 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]

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

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 in a

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

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 r...@gmail.com 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

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

2014-07-22 Thread Jerry Hill
On Tue, Jul 22, 2014 at 6:17 PM, fl rxjw...@gmail.com 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

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 r...@gmail.com 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

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

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 mailman.12182.1406042260.18130.python-l...@python.org, Chris Withers ch...@simplistix.co.uk 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? --

Re: Unicode, stdout, and stderr

2014-07-22 Thread Akira Li
Frank Millman fr...@chagford.com writes: Steven D'Aprano st...@pearwood.info 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

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, 'x'

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

2014-07-22 Thread Ben Finney
fl rxjw...@gmail.com 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

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. Here

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 rxjw...@gmail.com 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

Re: A Pythonista Meets JavaScript™

2014-07-22 Thread Ben Finney
Ben Finney ben+pyt...@benfinney.id.au writes: Monte Milanuk memila...@invalid.com writes: I know literally almost nothing about JS. At the Melbourne Python Users's Group this year, I gave a presentation URL:http://vimeo.com/album/2855296/video/93691338 on my initial learnings of

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 roys2...@gmail.com 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

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

2014-07-22 Thread Ben Finney
roys2005 roys2...@gmail.com 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

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

Re: Why does not pprint work?

2014-07-22 Thread Chris Angelico
On Wed, Jul 23, 2014 at 12:26 PM, Ned Batchelder n...@nedbatchelder.com 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

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 rxjw...@gmail.com 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

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, 'x'

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 st...@pearwood.info 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

[issue21597] Allow turtledemo code pane to get wider.

2014-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: For me, FLAT is about as mushy as the default, while SOLID actually looks like a divider. I find the sash easier to 'grab' and move. I plan to go with that. If it looks substantially worse on some other system, we could make the argument conditional on

[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: I plan to commit the sash patch before reviewing this. I would wait until then to do a separate patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21933

[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: MOUSEWHEEL should continue to scroll. CONTROL+MOUSEWHEEL should change font size, as you said at the beginning. At least on Windows, this seems pretty standard: Internet Explorer, Firefox, Notepad++, LibreOffice (and, I imagin, OpenOffice, and Word),

[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-22 Thread Lita Cho
Lita Cho added the comment: Sounds good. I can wait till the sash code gets incorporated in order to add in the font code. I would have to generate a MOUSEWHEEL event and see if it fails. I have generated mouse clicks before. I'll try to see if I can generate a MOUSEWHEEL event and if it

[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-22 Thread Ned Deily
Ned Deily added the comment: Lita, I tried the patch. From the perspective of an OS X user, while I might expect that using the zoom gesture on a mousepad or using a mousewheel (the equivalent) to increase or decrease the font size, I would even more expect scrolling to work especially if

[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-22 Thread Lita Cho
Lita Cho added the comment: I completely agree about the mousewheel. However, would it make sense for OS X to combine command with mousewheel? I have never seen that before. I am not sure if I can bind the zoom gesture with tkinter, but I can find out. I also think the shortcuts are not

[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-07-22 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +steve.dower, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22028 ___ ___ Python-bugs-list

[issue22003] BytesIO copy-on-write

2014-07-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue15381. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22003 ___ ___ Python-bugs-list mailing

[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-22 Thread Ned Deily
Ned Deily added the comment: On OS X, the actions associated with trackpad gestures are controlled by the Trackpad panel of System Preferences. The default settings map the pinch with two fingers gesture to Zoom in or out which Tk apps see as Mousewheel events: no programming needed!

[issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open

2014-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b98961748f1 by Senthil Kumaran in branch '3.4': Fix localhost checking in FileHandler. Raised in #21970. http://hg.python.org/cpython/rev/4b98961748f1 New changeset 2c660948bb41 by Senthil Kumaran in branch 'default': Merge 3.4

[issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open

2014-07-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: I have addressed the mistake where req.host is self.get_names() was done instead of req.host in self.get_names() in the first commit as it was an obvious problem. I will come up with patch/solution addressing the other behavior mentioned in this report.

[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-22 Thread Lita Cho
Lita Cho added the comment: What really? That is so awesome! I will check that out! However, I figure I still need to create separate bindings for Linux, Windows and Mac, right? Or does Tkinter unify all the mousewheel events? Lita On Tue, Jul 22, 2014 at 12:18 AM, Ned Deily

  1   2   3   >