Regarding Jython support in IBM and HP platforms

2012-12-26 Thread Naresh Kumar
Hello, I am trying to use the Jython in IBM AIX and HP machines to test our framework which is based on JAVA. when trying to run our python and jython based testcases using system test framework we are getting below errors in jython.err file Error: could not find libjava.so Error: could n

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-26 Thread Steven D'Aprano
On Tue, 25 Dec 2012 16:19:21 -0800, Rick Johnson wrote: > On Tuesday, December 25, 2012 4:56:44 PM UTC-6, Steven D'Aprano wrote: > >> Rick, what makes you think that this is logically inconsistent? >> "Method" is the accepted name for functions attached to classes. They >> report themselves as "m

need a url that its http response header that cotain 401 status code

2012-12-26 Thread iMath
I am going to do a Basic Authentication , so I need a url that its http response header that cotain 401 status code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Command Line Progress Bar

2012-12-26 Thread peter
On 12/26/2012 03:17 AM, Kevin Anthony wrote: Hello, I'm writing a file processing script(Linux), and i would like to have a progress bar. But i would also like to be able to print messages. Is there a simple way of doing this without implementing something like ncurses? -- Thanks Kevin Ant

Re: I am facing an issue while decoding json string using json.loads

2012-12-26 Thread alex23
On Dec 26, 5:14 pm, sajuptpm wrote: > I am facing an issue while decoding json string using json.loads(jstring). > Its working, if i do json.dumps(eval(jstring)) before json.loads(jstring). I cannot reproduce your problem using the original string: >>> s = u'{"selected_objects":{"datacenter-2":{

Re: need a url that its http response header that cotain 401 status code

2012-12-26 Thread Hans Mulder
On 26/12/12 10:08:41, iMath wrote: > I am going to do a Basic Authentication , > so I need a url > that its http response header that cotain 401 status code. Isn't that backwards? I mean, what's the point of implementing Basic Authentication, unless you already know a site that uses it? if yo

Re: need a url that its http response header that cotain 401 status code

2012-12-26 Thread Chris Angelico
On Wed, Dec 26, 2012 at 8:08 PM, iMath wrote: > I am going to do a Basic Authentication , > so I need a url > that its http response header that cotain 401 status code. Looking into my binocular crystal ball, I see two things: Left eye: You're trying to write a basic auth client, and want some

Re: EOFError why print(e) cannot print out any information ?

2012-12-26 Thread Peter Otten
iMath wrote: > f = open('UsersInfo.bin','rb') > while True: > try: > usrobj = pickle.load(f) > except EOFError as e: > print(e) > break > else: > usrobj.dispuser() > f.close() > why print(e) cannot print out

Twisted 12.3.0 released

2012-12-26 Thread Thomas Hervé
On behalf of Twisted Matrix Laboratories, I am pleased to announce, in extremis, the release of Twisted 12.3. 161 tickets are closed by this release, with the following highlights: * Support for local parallel testing in trial * A new "react" function to easily run a single asynchronous functi

3.2 can't extract tarfile produced by 2.7

2012-12-26 Thread Antoon Pardon
I am converting some programs to python 3. These programs manipulate tarfiles. In order for the python3 programs to be really useful they need to be able to process the tarfiles produced by python2 that however seems to be a problem. This is testcode that produces a tarfile. #! /usr/bin/python

Re: Command Line Progress Bar

2012-12-26 Thread Irmen de Jong
On 26-12-2012 7:17, Kevin Anthony wrote: > Hello, > I'm writing a file processing script(Linux), and i would like to have a > progress bar. > But i would also like to be able to print messages. Is there a simple way > of doing > this without implementing something like ncurses? This little li

Re: 3.2 can't extract tarfile produced by 2.7

2012-12-26 Thread Xavier Combelle
You probably want to write of = open("DUMP.tbz", "wb") and gf =open("DUMP.tbz", "rb") -- http://mail.python.org/mailman/listinfo/python-list

Re: Command Line Progress Bar

2012-12-26 Thread Alec Taylor
On Thu, Dec 27, 2012 at 3:05 AM, Irmen de Jong wrote: > On 26-12-2012 7:17, Kevin Anthony wrote: >> Hello, >> I'm writing a file processing script(Linux), and i would like to have a >> progress bar. >> But i would also like to be able to print messages. Is there a simple way >> of doing >> thi

Re: 3.2 can't extract tarfile produced by 2.7

2012-12-26 Thread Benjamin Kaplan
On Dec 26, 2012 11:00 AM, "Antoon Pardon" wrote: > > I am converting some programs to python 3. These programs manipulate tarfiles. In order for the python3 programs to be really useful > they need to be able to process the tarfiles produced by python2 that however seems to be a problem. > > This

How to get time.strptime()?

2012-12-26 Thread Gnarlodious
Error: AttributeError: 'module' object has no attribute '_strptime' This problem is driving me crazy. It only happens in Python 3.3.0, while on my server running 3.1.3 it behaves as expected. When I try to access time.strptime() it errors with AttributeError: 'module' object has no attribute '_

Re: How to get time.strptime()?

2012-12-26 Thread Chris Rebert
On Wednesday, December 26, 2012, Gnarlodious wrote: > Error: AttributeError: 'module' object has no attribute '_strptime' > Please include the full Traceback, not just the final error message. This problem is driving me crazy. It only happens in Python 3.3.0, while on > my server running 3.1.3

Re: How to get time.strptime()?

2012-12-26 Thread Steven D'Aprano
On Wed, 26 Dec 2012 08:33:42 -0800, Gnarlodious wrote: > Error: AttributeError: 'module' object has no attribute '_strptime' > > This problem is driving me crazy. It only happens in Python 3.3.0, while > on my server running 3.1.3 it behaves as expected. When I try to access > time.strptime() it

Re: Command Line Progress Bar

2012-12-26 Thread xDog Walker
On Tuesday 2012 December 25 22:17, Kevin Anthony wrote: > Hello, > I'm writing a file processing script(Linux), and i would like to have a > progress bar. But i would also like to be able to print messages. Is > there a simple way of doing this without implementing something like > ncurses? http:

Re: [Twisted-Python] Twisted 12.3.0 released

2012-12-26 Thread Laurens Van Houtven
Yay! Thanks for an awesome Christmas present Thomas :) On Wed, Dec 26, 2012 at 2:21 PM, Thomas Hervé wrote: > On behalf of Twisted Matrix Laboratories, I am pleased to announce, in > extremis, the release of Twisted 12.3. > > 161 tickets are closed by this release, with the following highlights

Re: How to get time.strptime()?

2012-12-26 Thread Gnarlodious
Thanks for the help. This error only occurs on my devbox which is running Py 3.3.0: print(time.__file__, file=sys.stderr) /usr/local/python-3.3.0/frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/time.so which looks normal to me. The server box, which is running Py 3.1.3, says t

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-26 Thread Michael Torrie
On 12/25/2012 04:42 PM, Rick Johnson wrote: > What IS a variable Dennis? > # > > #Variable (ComputerScience)# > Found the reference you are quot

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-26 Thread Michael Torrie
On 12/25/2012 04:42 PM, Rick Johnson wrote: > With that accurate definition in mind you can now understand how > Python classes CAN and DO have variables, just as Python modules have > variables; psst: they're called "global variables"! Nice ascii graphic, but citation needed. What CS text book a

Re: Password hash

2012-12-26 Thread Ian Kelly
On Tue, Dec 25, 2012 at 8:40 PM, Ramchandra Apte wrote: > On Monday, 24 December 2012 08:08:12 UTC+5:30, Robert Montgomery wrote: >> I am writing a script that will send an email using an account I set up >> >> in gmail. It is an smtp server using tls on port 587, and I would like >> >> to use a

Why is pexpect acting funny with sendline() and expect()?

2012-12-26 Thread saqib . ali . 75
I am running Solaris 5-10, python 2.6.2 and pexpect 2.4 I have the very simple python script below which exercises the functionality of sending and receiving text from the shell. My understanding is that pexepect([pexpect.TIMEOUT, x,y,z], timeout=w) will return the index of the match that it fo

Re: Keeping a Tkinter GUI alive during a long running process

2012-12-26 Thread Russell E. Owen
In article , Kevin Walzer wrote: > I maintain a Tkinter application that's a front-end to to a package > manger, and I have never been able to find a way to keep the app from > locking up at some point during the piping in of the package manager's > build output into a text widget. At some po

RE: How to get time.strptime()?

2012-12-26 Thread Nick Cash
> Error: AttributeError: 'module' object has no attribute '_strptime' > > This problem is driving me crazy. It only happens in Python 3.3.0, > while on my server running 3.1.3 it behaves as expected. When I try to > access time.strptime() it errors with > > AttributeError: 'module' object has no

Can you please help me?

2012-12-26 Thread bobflipperdoodle
I really hope you can help! I need to create a program where the user can order any combination and quantity of 3 products. I then offer a 10% discount if the customer correctly answers a trivia question. After that, there are 3 choices for shipping. I have most of the program completed but

running gui py script

2012-12-26 Thread Verde Denim
I'm learning py in this environment - PyCrust 0.9.5 - The Flakiest Python Shell Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 When I type a tkinter program in pycrust (or pyshell), it executes as expected, but when I call it from a command line, it doesn't. What I'm gettin

Please help if you can!

2012-12-26 Thread bobflipperdoodle
I really hope you can help! I need to create a program where the user can order any combination and quantity of 3 products. I then offer a 10% discount if the customer correctly answers a trivia question. After that, there are 3 choices for shipping. I have most of the program completed

Re: Can you please help me?

2012-12-26 Thread Mitya Sirenef
On 12/26/2012 04:40 PM, bobflipperdoo...@gmail.com wrote: I really hope you can help! I need to create a program where the user can order any combination and quantity of 3 products. I then offer a 10% discount if the customer correctly answers a trivia question. After that, there are 3 choice

Re: Can you please help me?

2012-12-26 Thread bobflipperdoodle
Thank you very much for your reply. I actually just deleted this post as you were replying! I had figured out a few things and then got confused about a few others :/ If you have a chance, can you look at the other post? Thank you!! -- http://mail.python.org/mailman/listinfo/python-list

Re: running gui py script

2012-12-26 Thread Dave Angel
On 12/26/2012 03:07 PM, Verde Denim wrote: > I'm learning py in this environment - > PyCrust 0.9.5 - The Flakiest Python Shell > Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) > [GCC 4.4.5] on linux2 > > When I type a tkinter program in pycrust (or pyshell), it executes as > expected, but when I

Re: Can you please help me?

2012-12-26 Thread Mitya Sirenef
On 12/26/2012 06:21 PM, bobflipperdoo...@gmail.com wrote: Thank you very much for your reply. I actually just deleted this post as you were replying! I had figured out a few things and then got confused about a few others :/ If you have a chance, can you look at the other post? Thank you!!

Re: Please help if you can!

2012-12-26 Thread Dave Angel
On 12/26/2012 06:04 PM, bobflipperdoo...@gmail.com wrote: > I really hope you can help! > Please use the existing thread when you're continuing to ask the same question. This mailing list has no way to delete messages. So what changes are there between the two versions of the code? Are they

Re: Please help if you can!

2012-12-26 Thread Joshua Landau
THIS IS A LONG POST, BUT IF YOU WANT TO LEARN YOU SHOULD READ IT. SERIOUSLY. UNLIKE Mitya Sirenef's THIS DOES NOT ASSUME MORE KNOWLEDGE THAN IS IN YOUR POST ALREADY, ALTHOUGH HIS IS DEFINITELY BETTER OVERALL. AS SUCH, THERE ARE NO FUNCTIONS. OK. There are several small errors in here, but there's

Re: Can you please help me?

2012-12-26 Thread Ian Kelly
On Wed, Dec 26, 2012 at 4:21 PM, wrote: > Thank you very much for your reply. I actually just deleted this post as you > were replying! I had figured out a few things and then got confused about a > few others :/ If you have a chance, can you look at the other post? Thank > you!! You can'

Re: Please help if you can!

2012-12-26 Thread bobflipperdoodle
First, sorry for starting a new post - I didn't want anyone to have to read through the whole first one when the questions were completely different :/ Second, I honestly have no idea how to answer your questions. I am a sophomore in high school and I am trying to learn this on my own because m

Re: Please help if you can!

2012-12-26 Thread bobflipperdoodle
I cannot tell you how grateful I am that you took the time to do all of this. I have been working on it all day and you are a better teacher in a few minutes than my teacher has been in 4 months. THANK YOU! And thank you again, Mitya. I really appreciate your time and effort too! Someday I'

Re: Please help if you can!

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 11:04 AM, wrote: > Second, I honestly have no idea how to answer your questions. I am a > sophomore in high school and I am trying to learn this on my own because my > teacher is not very good at explaining things. Unfortunately, there are a great many bad programming

Re: Please help if you can!

2012-12-26 Thread Joshua Landau
On 27 December 2012 00:04, wrote: > First, sorry for starting a new post - I didn't want anyone to have to > read through the whole first one when the questions were completely > different :/ > > Second, I honestly have no idea how to answer your questions. I am a > sophomore in high school and

Re: Please help if you can!

2012-12-26 Thread Mitya Sirenef
On 12/26/2012 07:04 PM, bobflipperdoo...@gmail.com wrote: First, sorry for starting a new post - I didn't want anyone to have to read through the whole first one when the questions were completely different :/ Second, I honestly have no idea how to answer your questions. I am a sophomore in h

Re: Please help if you can!

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 11:45 AM, Joshua Landau wrote: > FINALLY: > When you use Google Groups, your quotations look to us like this: > >> This is something I said >> >> with lots of extra >> >> lines in the middle >> >> for no reason. Google >> >> Groups sucks, basically. > > So please just delet

Re: Custom alphabetical sort

2012-12-26 Thread Joshua Landau
On 25 December 2012 06:18, Dave Angel wrote: > On 12/24/2012 06:19 PM, Pander Musubi wrote: > > Thanks very much for this efficient code. > > Perhaps you missed Ian Kelly's correction of Thomas Bach's approach: > > d = { k: v for v, k in enumerate(cs) } > > > def collate(x): > return lis

Re: Please help if you can!

2012-12-26 Thread Mitya Sirenef
On 12/26/2012 08:00 PM, Chris Angelico wrote: On Thu, Dec 27, 2012 at 11:45 AM, Joshua Landau wrote: FINALLY: When you use Google Groups, your quotations look to us like this: This is something I said with lots of extra lines in the middle for no reason. Google Groups sucks, basically. S

Re: Please help if you can!

2012-12-26 Thread Dennis
> > My *very first* thought about this code is that it's really badly spaced. > Don't put lines together so much! [https://gist.github.com/4383950] shows > how much nicer things look when they're partitioned more. You may not > agree, but it took about 10 seconds and I prefer it. > > On another st

Re: Please help if you can!

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 12:17 PM, Mitya Sirenef wrote: > I have to agree - I saw that howto as well and it occurred to me > that if we have to delete blank lines manually we might > as well use postal pigeons with tiny little papyrus scrolls - > at least those don't insert blank lines automaticall

Re: Please help if you can!

2012-12-26 Thread Mitya Sirenef
On 12/26/2012 08:23 PM, Chris Angelico wrote: On Thu, Dec 27, 2012 at 12:17 PM, Mitya Sirenef wrote: I have to agree - I saw that howto as well and it occurred to me that if we have to delete blank lines manually we might as well use postal pigeons with tiny little papyrus scrolls - at least th

Re: How to get time.strptime()?

2012-12-26 Thread Gnarlodious
Nick Cash wrote: > I was able to work around this by simply importing _strptime myself at server > startup time. THANK YOU! That fixed it, I simply put import _strptime in my *.wsgi script. It feels like a kludgy solution, but it works. I should also mention that I had a similar problem with

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-26 Thread Rick Johnson
On Wednesday, December 26, 2012 2:29:13 AM UTC-6, Steven D'Aprano wrote: > [snip] I won't reply to your last post on a line-by-line basis because i feel we are straying from my general point: which is that we should NEVER re-interpret existing words (in an illogical manner) whilst transforming t

Query re language for running videos on TV

2012-12-26 Thread mjperreau
I am new to raspberry pi and am looking at coming up with a program with a GUI menu for selecting saved videos onto HD TV. Can someone point me in the right direction please. Thanks MikePee [user name] Ph: 06 8453931 Cell: 027 2438085 mjperr...@gmail.com Skype: mike.perreau -- http://mail.

Re: How to get time.strptime()?

2012-12-26 Thread Steven D'Aprano
On Wed, 26 Dec 2012 19:09:51 -0800, Gnarlodious wrote: > This is problem that has unduly vexed me. When you start learning Python > they don't tell you about these sharp edges. "Hi, I've just started learning Python today, and I have a question. How do I print a list?" "Before I answer that qu

Re: How to get time.strptime()?

2012-12-26 Thread Roy Smith
In article <0e36e143-5103-4b4b-aaa9-b7b1b7686...@googlegroups.com>, Gnarlodious wrote: > This is problem that has unduly vexed me. When you start learning Python they > don't tell you about these sharp edges. Someone needs to explain. The same thing happens when you're born. You spend your en

Re: Finding the name of a function while defining it

2012-12-26 Thread Tim Roberts
Abhas Bhattacharya wrote: > >While I am defining a function, how can I access the name (separately as >string as well as object) of the function without explicitly naming >it(hard-coding the name)? >For eg. I am writing like: >def abc(): >#how do i access the function abc here without hard-co

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-26 Thread Steven D'Aprano
On Wed, 26 Dec 2012 20:07:53 -0800, Rick Johnson wrote: > My specific point is that the English word "variable" is unambiguous I'm sorry, do you mean "variable" the noun, or "variable" the adjective? If you mean the adjective, do you mean something which naturally changes, in the sense that the

Re: How to get time.strptime()?

2012-12-26 Thread Mitya Sirenef
On 12/26/2012 10:09 PM, Gnarlodious wrote: This is problem that has unduly vexed me. When you start learning Python they don't tell you about these sharp edges. Someone needs to explain. -- Gnarlie In fact, if there were no bugs, there would be no need to explain nor to pick the right time

Re: I am facing an issue while decoding json string using json.loads

2012-12-26 Thread Tim Roberts
sajuptpm wrote: > >I am facing an issue while decoding json string using json.loads(jstring). >Its working, if i do json.dumps(eval(jstring)) before json.loads(jstring). >I could not figure out the issue. I want to avoide use of "eval" here. The problem is that your string contains two instances

Re: How to get time.strptime()?

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 4:06 PM, Mitya Sirenef wrote: > On 12/26/2012 10:09 PM, Gnarlodious wrote: >> >> This is problem that has unduly vexed me. When you start learning Python >> they don't tell you about these sharp edges. Someone needs to explain. -- >> Gnarlie > > > In fact, if there were no

Re: Finding the name of a function while defining it

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 3:52 PM, Tim Roberts wrote: > The > compiled code in a function, for example, exists as an object without a > name. That unnamed object can be bound to one or more function names, but > the code doesn't know that. Example: > > def one(): > print( "Here's one" ) > > tw

Re: Query re language for running videos on TV

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 3:35 PM, mjperreau wrote: > I am new to raspberry pi and am looking at coming up with a program with a > GUI menu for selecting saved videos onto HD TV. > > Can someone point me in the right direction please… Huh, sounds like the Yosemite Project, one of the first non-triv

Re: How to get time.strptime()?

2012-12-26 Thread Gnarlodious
Chris Angelico wrote: > The problem here is that Python > doesn't have any magical way to deal with messy imports in > multiple threads But couldn't Py 3.3.1 at least raise an error mentioning threading as a possible cause? Because "No module named _strptime" is pretty cryptic. -- Gnarlie --

Re: How to get time.strptime()?

2012-12-26 Thread Ben Finney
Mitya Sirenef writes: > Why doesn't Python warn that it's not 100% perfect? Are people just > supposed to "know" this, magically? +1 QotW -- \ “[T]he speed of response of the internet will re-introduce us | `\to that from which our political systems have separated us for | _o__)

Re: Please help if you can!

2012-12-26 Thread alex23
On 27 Dec, 11:00, Chris Angelico wrote: > One of the regulars on the list has posted a run-down of how to post > from Google Groups without annoying everyone, and among other things, > it recommends manually deleting all the blank lines. I'm still posting via Groups and am not seeing my posts com

Re: [Twisted-Python] Twisted 12.3.0 released

2012-12-26 Thread Glyph
On Dec 26, 2012, at 5:21 AM, Thomas Hervé wrote: > On behalf of Twisted Matrix Laboratories, I am pleased to announce, in > extremis, the release of Twisted 12.3. Thanks for managing another great release, Thomas!! > 161 tickets are closed by this release, with the following highlights: > > *

Re: [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-26 Thread Ranting Rick
On Dec 26, 11:02 pm, Steven D'Aprano wrote: > On Wed, 26 Dec 2012 20:07:53 -0800, Rick Johnson wrote: > > My specific point is that the English word "variable" is unambiguous > > I'm sorry, do you mean "variable" the noun, or "variable" the adjective? > [snip: sliding down the rabbit hole of a pol

Re: Finding the name of a function while defining it

2012-12-26 Thread Abhas Bhattacharya
On Wednesday, 26 December 2012 08:41:28 UTC+5:30, Roy Smith wrote: > In article , > > Abhas Bhattacharya wrote: > > > > > While I am defining a function, how can I access the name (separately as > > > string as well as object) of the function without explicitly naming > > > it(hard-codin

Re: Finding the name of a function while defining it

2012-12-26 Thread Abhas Bhattacharya
On Thursday, 27 December 2012 11:14:36 UTC+5:30, Chris Angelico wrote: > On Thu, Dec 27, 2012 at 3:52 PM, Tim Roberts wrote: > > > The > > > compiled code in a function, for example, exists as an object without a > > > name. That unnamed object can be bound to one or more function names, but

Re: Finding the name of a function while defining it

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 6:26 PM, Abhas Bhattacharya wrote: > During run-time, I can always use: function_name.__name__ (although that's > kind of lame because it returns "function_name"). But if the function itself > contains print(__name__) and I call the function, it returns __main__ (yes, >

Re: Finding the name of a function while defining it

2012-12-26 Thread Abhas Bhattacharya
On Thursday, 27 December 2012 10:22:15 UTC+5:30, Tim Roberts wrote: > Abhas Bhattacharya wrote: > > > > > >While I am defining a function, how can I access the name (separately as > > >string as well as object) of the function without explicitly naming > > >it(hard-coding the name)? > > >Fo

Re: Finding the name of a function while defining it

2012-12-26 Thread Abhas Bhattacharya
On Thursday, 27 December 2012 13:18:19 UTC+5:30, Chris Angelico wrote: > On Thu, Dec 27, 2012 at 6:26 PM, Abhas Bhattacharya > > wrote: > > > During run-time, I can always use: function_name.__name__ (although that's > > kind of lame because it returns "function_name"). But if the function >