Re: Hello World

2014-12-21 Thread Marko Rauhamaa
CM cmpyt...@gmail.com: On Sunday, December 21, 2014 2:44:50 AM UTC-5, CM wrote: Hello, world! 13 Actually, there is no comma after Hello. Do you have a patch? Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: how to generate a wsdl file for a web service in python

2014-12-21 Thread Burak Arslan
On 12/19/14 12:45, brice DORA wrote: i have already my python file which contains all methods of my web service. so do you give a example or tell me how i can do it... No, all you need is there in that example. You need to decorate your functions using Spyne's @rpc, denote input/output types

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import

Re: very weird pandas behavior

2014-12-21 Thread Dave Angel
On 12/21/2014 07:44 AM, ryguy7272 wrote: On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas Thanks Steven. I just tried what you recommended, and got this. import

Re: Hello World

2014-12-21 Thread Marko Rauhamaa
Tony the Tiger tony@tiger.invalid: On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: I am in total awe. I'm not. It has no real value. It is, of course, a joke, and there are whole tongue-in-cheek languages like Brainfuck. However, some similar exercises carry deep meaning. Take,

problems with Methods in Python 3.4.2

2014-12-21 Thread Marcus Lütolf
Hello Dears, I solved the problem: There are two underscore key strokes required. Marcus. Hello Dears, 1)I am trying to do this: dir(_builtins_) I am getting this: Traceback (most recent call last): File pyshell#0, line 1, in module dir(_builtins_) NameError: name '_builtins_'

Re: Simple background sound effect playback

2014-12-21 Thread Akira Li
Jacob Kruger ja...@blindza.co.za writes: Would prefer to use something free, that could work somewhat cross-platform, but, my primary target is for windows OS, and would primarily just want to be able to easily trigger playback of either .wav or .mp3 background sound effects, but, yes, would

Re: Simple background sound effect playback

2014-12-21 Thread Jacob Kruger
Will have a look at it as well, but, also already tested generating a console/command line app using the pygame code to play an .ogg file, panning it left and right, and the compilation worked alright, and am now still busy reloading primary machine, so haven't taken it too much further, but

Re: Hello World

2014-12-21 Thread Steven D'Aprano
Tony the Tiger wrote: On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: I am in total awe. I'm not. It has no real value. Write your code like that and you'll soon be looking for a new job. Awww, did da widdle puddy tat get up on the wrong side of the bed this morning? :-)

Re: Hello World

2014-12-21 Thread Roy Smith
In article 54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Obviously you don't write obfuscated code like this for production use, except in such cases where you deliberately want to write obfuscated code for production use.

Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith r...@panix.com wrote: Heh. I once worked on a C++ project that included its own crypo code (i.e. custom implementations of things like AES and SHA-1). The person who wrote some particular bit of the code had decided that deliberately obfuscating

Re: Hello World

2014-12-21 Thread Roy Smith
In article mailman.17098.1419207020.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith r...@panix.com wrote: Heh. I once worked on a C++ project that included its own crypo code (i.e. custom implementations of things like AES

Re: Hello World

2014-12-21 Thread mm0fmf
On 22/12/2014 00:10, Chris Angelico wrote: Level 0: Why implement your own crypto?!? Because people who don't understand the concepts behind cryptography don't understand that the crypto algorithm can be open whilst the results of applying the algorithm are secure. There again I always use

Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 11:12 AM, Roy Smith r...@panix.com wrote: In article mailman.17098.1419207020.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith r...@panix.com wrote: Heh. I once worked on a C++ project that included its

Re: Hello World

2014-12-21 Thread Tim Chase
On 2014-12-22 00:20, mm0fmf wrote: On 22/12/2014 00:10, Chris Angelico wrote: Level 0: Why implement your own crypto?!? Because people who don't understand the concepts behind cryptography don't understand that the crypto algorithm can be open whilst the results of applying the algorithm

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import

Re: very weird pandas behavior

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 12:01 PM, ryguy7272 ryanshu...@gmail.com wrote: Part of the problem is, I don't know why in 2014 we're entering commands in the C-prompt to run a Windows program. I thought all of that stuff was over in the very early 1990s. Also, I can't understand why Python can't

Re: very weird pandas behavior

2014-12-21 Thread oldknackers
On Saturday, December 20, 2014 3:46:40 PM UTC, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import pandas

Re: very weird pandas behavior

2014-12-21 Thread Dave Angel
On 12/21/2014 08:01 PM, ryguy7272 wrote: On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import

Re: Hello World

2014-12-21 Thread Cameron Simpson
On 21Dec2014 01:31, Terry Reedy tjre...@udel.edu wrote: On 12/21/2014 12:31 AM, Chris Angelico wrote: On Sun, Dec 21, 2014 at 4:14 PM, CM cmpyt...@gmail.com wrote: I ran it in IDLE with Python 2.7.8 and got: Traceback (most recent call last): File C:/Python27/helloworld.py, line 39, in

Re: Hello World

2014-12-21 Thread Rustom Mody
On Monday, December 22, 2014 4:21:13 AM UTC+5:30, Steven D'Aprano wrote: Awww, did da widdle puddy tat get up on the wrong side of the bed this morning? :-) Obviously you don't write obfuscated code like this for production use, except in such cases where you deliberately want to write

Re: very weird pandas behavior

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 1:25 PM, ryguy7272 ryanshu...@gmail.com wrote: I just ran these two commands in the c-prompt: pip install --upgrade numpy pip install --upgrade pandas It seemed like everything was being downloaded and installed. Seems ok. Then I go back to the Python Shell and

Re: very weird pandas behavior

2014-12-21 Thread Mark Lawrence
On 22/12/2014 02:07, ryguy7272 wrote: On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python

Re: very weird pandas behavior

2014-12-21 Thread Rustom Mody
On Monday, December 22, 2014 7:55:50 AM UTC+5:30, ryguy7272 wrote: Sorry, but that's what drives me nuts. I install a few packages, and the messages that I get says the package is installed...then it says it's NOT installed...I don't know what to think... Its nice to bang the head against

Re: Hello World

2014-12-21 Thread Mark Lawrence
On 22/12/2014 00:20, mm0fmf wrote: On 22/12/2014 00:10, Chris Angelico wrote: Level 0: Why implement your own crypto?!? Because people who don't understand the concepts behind cryptography don't understand that the crypto algorithm can be open whilst the results of applying the algorithm are

Why my ; continuator idea is better for debugging too.

2014-12-21 Thread Skybuck Flying
Hello, In the past I wrote about pascal's ; mistake. ; should be used as a continuator. I just made a programming mistake which solidifies/merits my idea: The programming mistake was this: vBattlefieldLosingWarrior := // modified warrior and brain vSimulatorWinningWarrior :=

Re: Why my ; continuator idea is better for debugging too.

2014-12-21 Thread Steven D'Aprano
On Mon, 22 Dec 2014 04:28:33 +0100, Skybuck Flying wrote: I don't like inconsistencies, it's frikking annoying.). I don't like cross-posting trolls, they're frikking annoying. Bye, Oh, if only that were true. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Why my ; continuator idea is better for debugging too.

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 2:53 PM, Steven D'Aprano st...@pearwood.info wrote: On Mon, 22 Dec 2014 04:28:33 +0100, Skybuck Flying wrote: I don't like inconsistencies, it's frikking annoying.). I don't like cross-posting trolls, they're frikking annoying. My first thought was that it had been

Re: code python

2014-12-21 Thread Rustom Mody
On Saturday, December 20, 2014 7:30:20 AM UTC+5:30, Khetam Yassen wrote: Hello all I Have problem about , How i can compute accuracy to unigram,bigram and trigram and how i can change the size to iteration separate from 1 to 10 in each stage from iteration train take 90% and training 10%.

Re: very weird pandas behavior

2014-12-21 Thread Steven D'Aprano
On Sun, 21 Dec 2014 18:25:38 -0800, ryguy7272 wrote: I just ran these two commands in the c-prompt: pip install --upgrade numpy pip install --upgrade pandas What is the purpose of the --upgrade switch? Just run `pip install numpy`, and COPY and PASTE the entire output of pip into your

List Comprehensions

2014-12-21 Thread Ganesh Pal
Hi , (a) I was trying to reduce the below piece of code using List comprehension ? Any suggestion please let me know for opt in options: opt['result'] = Queue.Queue() tmp_thread = pause.Thread(opt) threads.append(tmp_thread) tmp_thread.start()

Re: List Comprehensions

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 4:42 PM, Ganesh Pal ganesh1...@gmail.com wrote: (a) I was trying to reduce the below piece of code using List comprehension ? Any suggestion please let me know for opt in options: opt['result'] = Queue.Queue() tmp_thread = pause.Thread(opt)

Re: Hello World

2014-12-21 Thread Steve Hayes
On Mon, 22 Dec 2014 09:51:02 +1100, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Tony the Tiger wrote: On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: I am in total awe. I'm not. It has no real value. Write your code like that and you'll soon be looking for a

Re: very weird pandas behavior

2014-12-21 Thread oldknackers
On Saturday, December 20, 2014 3:46:40 PM UTC, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: pip install pandas It looks like everything downloaded and installed fine. Great. Now, in Python Shell, I enter this: import pandas

Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 5:21 PM, Steve Hayes hayes...@telkomsa.net wrote: Yes, my initial reaction was that's awesome. And my second thought was that it was scary. I ran it. It worked, and printed Hello world. I was awed. But what if I had run it and it reformatted my hard disk? How would

Re: Hello World

2014-12-21 Thread Steve Hayes
On Mon, 22 Dec 2014 17:33:10 +1100, Chris Angelico ros...@gmail.com wrote: On Mon, Dec 22, 2014 at 5:21 PM, Steve Hayes hayes...@telkomsa.net wrote: Yes, my initial reaction was that's awesome. And my second thought was that it was scary. I ran it. It worked, and printed Hello world. I was

Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 6:46 PM, Steve Hayes hayes...@telkomsa.net wrote: But a hacker who can write that kind of stuff can probably bypass any safeguards built into the OS. This isn't magic. You can't just do more of it to get past the firewalls, like in sci fi. It's much MUCH easier to attack

[issue23096] Implementation-depended pickling floats with protocol 0

2014-12-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Python and C implementations of pickle produce different results when pickle floats with protocol 0. pickle.dumps(4.2, 0) b'F4.2002\n.' pickle._dumps(4.2, 0) b'F4.2\n.' -- components: Library (Lib) messages: 232992 nosy:

[issue23097] unittest can unnecessarily modify sys.path (and with the wrong case)

2014-12-21 Thread Chris Jerdonek
New submission from Chris Jerdonek: I have observed that when running unit tests using unittest's test discovery, unittest can simultaneously (1) modify sys.path unnecessarily (by adding a path that is already in sys.path with a different case), and (2) modify sys.path by adding a path of the

[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37521/pickle_frame_readline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23094

[issue21279] str.translate documentation incomplete

2014-12-21 Thread Martin Panter
Martin Panter added the comment: Patch v4 with John’s doc string wording -- Added file: http://bugs.python.org/file37522/issue21279.v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21279

[issue23096] Implementation-depended pickling floats with protocol 0

2014-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python implementation uses repr(value) and C implementation uses '%.17g' % value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23096 ___

[issue23094] Unpickler failing with PicklingError at frame end on readline due to a broken comparison

2014-12-21 Thread CensoredUsername
CensoredUsername added the comment: Indeed. In my case the problem was caused a subclassed Pickler which still used GLOBAL instead of STACK_GLOBAL in protocol 4. My own minimized test case was: data = b\x80\x04\x95\x11\x00\x00\x00\x00\x00\x00\x00cpickle\nPickler\n. pickletools.dis(data)

[issue23093] repr() on detached stream objects fails

2014-12-21 Thread Martin Panter
Martin Panter added the comment: Here is patch v2, which ignores any exception derived from the Exception base class when reading the self.name etc properties. I’m interested what people think of this approach. -- Added file: http://bugs.python.org/file37523/detach-indep.v2.patch

[issue23093] repr() on detached stream objects fails

2014-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks reasonable to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23093 ___ ___ Python-bugs-list

[issue21279] str.translate documentation incomplete

2014-12-21 Thread John Posner
John Posner added the comment: Patch of 12-21 looks good, Martin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21279 ___ ___ Python-bugs-list

[issue21279] str.translate documentation incomplete

2014-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed wording looks superfluously verbose to me. Look also at description in Include/unicodeobject.h: /* Translate a string by applying a character mapping table to it and return the resulting Unicode object. The mapping table must map Unicode

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-12-21 Thread R. David Murray
R. David Murray added the comment: See also issue 6294 for a related problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22836 ___ ___

[issue21279] str.translate documentation incomplete

2014-12-21 Thread Martin Panter
Martin Panter added the comment: Serhiy can you point out which bits are too verbose? Perhaps you prefer it without the bullet list like in the earlier 2014-12-13 version of the patch. Looking at the C API, I see a couple problems there: * Omits mentioning that an ordinal can map to a

[issue6294] Improve shutdown exception ignored message

2014-12-21 Thread Martin Panter
Martin Panter added the comment: Not sure what the original method to cause this message is. I’m guessing some code was trying to call a function that was set to None by the shutdown process, causing the exception message, and that repr() was also failing, causing the broken wording. Like

[issue23098] mknod devices can be 32 bits

2014-12-21 Thread Jesús Cea Avión
New submission from Jesús Cea Avión: Dan MacDonald told me that os.mknod() should accept devices 32 bits. I wrote this code in linux 64 bits: #include sys/types.h #include sys/stat.h #include fcntl.h #include unistd.h #include stdio.h int main(void) { printf(%d, sizeof(dev_t));

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-12-21 Thread Martin Panter
Martin Panter added the comment: Patch v2 revises the unit tests so they are cleaner. Also now tests that the repr() failed placeholders are in the exception reports. -- Added file: http://bugs.python.org/file37524/unraisable-continue.v2.patch ___

[issue23093] repr() on detached stream objects fails

2014-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset f3ff3e424b6f by Benjamin Peterson in branch '3.4': allow more operations to work on detached streams (closes #23093) https://hg.python.org/cpython/rev/f3ff3e424b6f New changeset afa8d8ab0937 by Benjamin Peterson in branch '2.7': allow more

[issue19539] The 'raw_unicode_escape' codec buggy + not appropriate for Python 3.x

2014-12-21 Thread Martin Panter
Martin Panter added the comment: [Edit Error: 'utf8' codec can't decode byte 0xe2 in position 212: invalid continuation byte] Re-reading the suggested description, it struck me that for encoding, this is redundant with the “backslashreplace” error handler: test = .join(map(chr,

[issue23061] Update pep8 to specify explicitly 'module level' imports at top of file

2014-12-21 Thread Ian Lee
Ian Lee added the comment: So one concern that was brought up on GitHub was the fact that currently this is not actually followed universally in the Python standard library. In particular there are 636 errors in the standard library ``python pep8.py --select E402 --statistics

[issue23061] Update pep8 to specify explicitly 'module level' imports at top of file

2014-12-21 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23061 ___ ___

[issue23061] Update pep8 to specify explicitly 'module level' imports at top of file

2014-12-21 Thread Ian Lee
Ian Lee added the comment: I should add that I would be happy to patch the standard libraries to be compliant w.r.t. the imports at top of the files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23061

[issue21279] str.translate documentation incomplete

2014-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Serhiy can you point out which bits are too verbose? Perhaps you prefer it without the bullet list like in the earlier 2014-12-13 version of the patch. I prefer it without the bullet list and without LookupError expansion (there is a link to LookupError