Re: While loop help

2013-04-09 Thread Larry Hudson
On 04/09/2013 09:49 AM, thomasancill...@gmail.com wrote: So what would be the proper way to perform a loop of this program. I still can't quite figure out the best way to do it. My suggestion... (pseudocode) # Print a heading/introduction here while True: # Print menu, with an added

Re: Unicode issue with Python v3.3

2013-04-09 Thread rusi
On Apr 10, 10:06 am, rusi wrote: > An interesting case of two threads: > > On Apr 10, 9:46 am, Chris Angelico wrote: > > > On Wed, Apr 10, 2013 at 2:25 PM, Steven D'Aprano > > > Obviously you know what the problem is much better than the Python > > > interpreter. > > > I just went to the page and

Re: Unicode issue with Python v3.3

2013-04-09 Thread rusi
An interesting case of two threads: On Apr 10, 9:46 am, Chris Angelico wrote: > On Wed, Apr 10, 2013 at 2:25 PM, Steven D'Aprano > > Obviously you know what the problem is much better than the Python > > interpreter. > > I just went to the page and it started playing sound. Between that and > th

Re: Unicode issue with Python v3.3

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 2:25 PM, Steven D'Aprano wrote: > On Tue, 09 Apr 2013 20:16:12 -0700, nagia.retsina wrote: > >> Τη Τετάρτη, 10 Απριλίου 2013 12:34:25 π.μ. UTC+3, ο χρήστης Ian έγραψε: >>> On Tue, Apr 9, 2013 at 3:10 PM, Νίκος Γκρ33κ >>> wrote: >>> >>> > Hello, iam still trying to alter th

Re: Unicode issue with Python v3.3

2013-04-09 Thread Steven D'Aprano
On Tue, 09 Apr 2013 20:16:12 -0700, nagia.retsina wrote: > Τη Τετάρτη, 10 Απριλίου 2013 12:34:25 π.μ. UTC+3, ο χρήστης Ian έγραψε: >> On Tue, Apr 9, 2013 at 3:10 PM, Νίκος Γκρ33κ >> wrote: >> >> > Hello, iam still trying to alter the code form python 2.6 => 3.3 >> > >> > Everyrging its setup exc

Re: Unicode issue with Python v3.3

2013-04-09 Thread nagia . retsina
Τη Τετάρτη, 10 Απριλίου 2013 12:34:25 π.μ. UTC+3, ο χρήστης Ian έγραψε: > On Tue, Apr 9, 2013 at 3:10 PM, Νίκος Γκρ33κ wrote: > > > Hello, iam still trying to alter the code form python 2.6 => 3.3 > > > > > > Everyrging its setup except that unicode error that you can see if you go > > to http

Re: I hate you all

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 12:00 PM, Steven D'Aprano wrote: > On Wed, 10 Apr 2013 10:31:44 +1000, Chris Angelico wrote: > >> On Wed, Apr 10, 2013 at 9:50 AM, Walter Hurry >> wrote: >>> From Mark's reply to me: >>> User-Agent: Mozilla/5.0 (Windows NT 6.0; >>> rv:17.0) Gecko/20130328 Thunderbi

Re: I hate you all

2013-04-09 Thread Steven D'Aprano
On Wed, 10 Apr 2013 10:31:44 +1000, Chris Angelico wrote: > On Wed, Apr 10, 2013 at 9:50 AM, Walter Hurry > wrote: >> On Wed, 10 Apr 2013 09:28:26 +1000, Chris Angelico wrote: >> >>> On Wed, Apr 10, 2013 at 9:21 AM, Steven D'Aprano >>> wrote: Walter is pointing out that as a Windows user...

Re: I hate you all

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 9:50 AM, Walter Hurry wrote: > On Wed, 10 Apr 2013 09:28:26 +1000, Chris Angelico wrote: > >> On Wed, Apr 10, 2013 at 9:21 AM, Steven D'Aprano >> wrote: >>> Walter is pointing out that as a Windows user... >> >> Walter is also assuming that Mark is a Windows user, which wa

Re: I hate you all

2013-04-09 Thread Walter Hurry
On Wed, 10 Apr 2013 09:28:26 +1000, Chris Angelico wrote: > On Wed, Apr 10, 2013 at 9:21 AM, Steven D'Aprano > wrote: >> Walter is pointing out that as a Windows user... > > Walter is also assuming that Mark is a Windows user, which was never > actually stated :) >From Mark's reply to me: User-

Re: I hate you all

2013-04-09 Thread Mark Lawrence
On 10/04/2013 00:28, Chris Angelico wrote: On Wed, Apr 10, 2013 at 9:21 AM, Steven D'Aprano wrote: Walter is pointing out that as a Windows user... Walter is also assuming that Mark is a Windows user, which was never actually stated :) ChrisA Another unicode error with VMS being transpose

Re: I hate you all

2013-04-09 Thread Mark Lawrence
On 10/04/2013 00:21, Steven D'Aprano wrote: On Tue, 09 Apr 2013 23:09:19 +0100, Mark Lawrence wrote: On 09/04/2013 22:09, Walter Hurry wrote: On Tue, 09 Apr 2013 16:51:26 +0100, Mark Lawrence wrote: Having never really used a *nix box in anger how would I know? A substantial portion of my ca

Re: I hate you all

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 9:21 AM, Steven D'Aprano wrote: > Walter is pointing out that as a Windows user... Walter is also assuming that Mark is a Windows user, which was never actually stated :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: I hate you all

2013-04-09 Thread Steven D'Aprano
On Tue, 09 Apr 2013 23:09:19 +0100, Mark Lawrence wrote: > On 09/04/2013 22:09, Walter Hurry wrote: >> On Tue, 09 Apr 2013 16:51:26 +0100, Mark Lawrence wrote: >>> Having never really used a *nix box in anger how would I know? A >>> substantial portion of my career was spent on a combination of V

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 6:59 AM, Walter Hurry wrote: > On Tue, 09 Apr 2013 16:12:34 -0400, Dave Angel wrote: > >> On 04/09/2013 03:35 PM, Walter Hurry wrote: >>> On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: >>> On Wed, Apr 10, 2013 at 1:47 AM, wrote: > ... I'm not sure what

Re: Python pdb bug, followed by bug in bugs.python.org

2013-04-09 Thread Ned Deily
In article , donaldcal...@gmail.com wrote: > I am I've developed an application in Python 3.3.1 (on an up-to-date 64-bit > Arch Linux system) and am attempting to use pdb to debug it. I am getting > incorrect stack traces. I've made up a little 10-line program that > illustrates the problem an

Re: I hate you all

2013-04-09 Thread Mark Lawrence
On 09/04/2013 22:09, Walter Hurry wrote: On Tue, 09 Apr 2013 16:51:26 +0100, Mark Lawrence wrote: Having never really used a *nix box in anger how would I know? A substantial portion of my career was spent on a combination of VMS, C with embedded SQL and Ingres. Please don't ask as I don't kno

Re: I hate you all

2013-04-09 Thread Grant Edwards
On 2013-04-09, Mark Lawrence wrote: > On 09/04/2013 14:39, Grant Edwards wrote: >> On 2013-04-09, Mark Lawrence wrote: >>> But wouldn't it have been easier simply to do do a quick sed or whatever rather than to spend hours here arguing? >>> >>> Where's the fun in that? :) >> >> What, yo

Re: Unicode issue with Python v3.3

2013-04-09 Thread Ian Kelly
On Tue, Apr 9, 2013 at 3:10 PM, Νίκος Γκρ33κ wrote: > Hello, iam still trying to alter the code form python 2.6 => 3.3 > > Everyrging its setup except that unicode error that you can see if you go to > http://superhost.gr > > Can anyone help with this? > I even tried to change print() with sys.st

Unicode issue with Python v3.3

2013-04-09 Thread Νίκος Γκρ33κ
Hello, iam still trying to alter the code form python 2.6 => 3.3 Everyrging its setup except that unicode error that you can see if you go to http://superhost.gr Can anyone help with this? I even tried to change print() with sys.stdout.buffer() but still i get the same unicode issue. I don't k

Re: I hate you all

2013-04-09 Thread Walter Hurry
On Tue, 09 Apr 2013 16:51:26 +0100, Mark Lawrence wrote: > On 09/04/2013 14:39, Grant Edwards wrote: >> On 2013-04-09, Mark Lawrence wrote: >>> But wouldn't it have been easier simply to do do a quick sed or whatever rather than to spend hours here arguing? >>> >>> Where's the fun in th

Re: While loop help

2013-04-09 Thread Walter Hurry
On Tue, 09 Apr 2013 16:12:34 -0400, Dave Angel wrote: > On 04/09/2013 03:35 PM, Walter Hurry wrote: >> On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: >> >>> On Wed, Apr 10, 2013 at 1:47 AM, wrote: ... I'm not sure what version I'm using ... >>> >>> Try putting these lines into a

HI Need help for python coding

2013-04-09 Thread kamalakar gs
Hi, Actually I have PCL file (i..e patran file).I want python coding to be done so that it will read the PCL file and open Patran GUI window.How to do that.Kindly find the attached PCL file for your ref. Thanks regards Kamalakar shell.pcl Description: Binary data -- http://mail.python.org/mailma

Re: Python pdb bug, followed by bug in bugs.python.org

2013-04-09 Thread John Gordon
In donaldcal...@gmail.com writes: > I am I've developed an application in Python 3.3.1 (on an up-to-date 64-bit= > Arch Linux system) and am attempting to use pdb to debug it. I am getting = > incorrect stack traces. I've made up a little 10-line program that illustra= > tes the problem and I a

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 03:35 PM, Walter Hurry wrote: On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: On Wed, Apr 10, 2013 at 1:47 AM, wrote: ... I'm not sure what version I'm using ... Try putting these lines into a Python script: import sys print(sys.version) That works (of course), b

Re: py2exe and 64/32 bit windows

2013-04-09 Thread Benjamin Kaplan
On Apr 9, 2013 12:53 PM, "Grant Edwards" wrote: > > On 2013-04-09, Ian Kelly wrote: > > >> My "Windows partition" currently has a 64-bit Windows 7 Ultimate > >> installation. > >> > >> I'm told that the executable I generate on that machine won't run on > >> Win7 32-bit installations. I'm not su

Re: Python pdb bug, followed by bug in bugs.python.org

2013-04-09 Thread Arnaud Delobelle
On 9 April 2013 16:25, wrote: > I am I've developed an application in Python 3.3.1 (on an up-to-date 64-bit > Arch Linux system) and am attempting to use pdb to debug it. I am getting > incorrect stack traces. I've made up a little 10-line program that > illustrates the problem and I attempted

Re: py2exe and 64/32 bit windows

2013-04-09 Thread Ian Kelly
On Tue, Apr 9, 2013 at 1:45 PM, Grant Edwards wrote: > Are there any drawbacks to running a 32-bit Python install on a 64-bit > machine? Apart from still being limited to a 2-GB address space, nothing that I'm aware of. > Can you have both 32 and 64 bit Python installed at the same time? Absolu

Re: py2exe and 64/32 bit windows

2013-04-09 Thread Grant Edwards
On 2013-04-09, Ian Kelly wrote: >> My "Windows partition" currently has a 64-bit Windows 7 Ultimate >> installation. >> >> I'm told that the executable I generate on that machine won't run on >> Win7 32-bit installations. I'm not surprised by that, but I'd like >> to provide 32-bit operability -

Re: While loop help

2013-04-09 Thread Walter Hurry
On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: > On Wed, Apr 10, 2013 at 1:47 AM, wrote: >> ... I'm not sure what version I'm using ... > > Try putting these lines into a Python script: > > import sys > print(sys.version) > That works (of course), but in every Python version I've s

xlrd 0.9.2 released!

2013-04-09 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.9.2: http://pypi.python.org/pypi/xlrd/0.9.2 This release includes the following changes: - Fix some packaging issues that meant docs and examples were missing from the tarball. - Fixed a small but serious regression that caused problems

variazioni nel conto

2013-04-09 Thread mario_44
Aggiorna Ciao, python-list. Aggiorna La risposta alla tua domanda riguardo al profilo sul sito 29.03.2013. Aggiorna http://www.ahmetyikilmaz.com/Calcolo.zip?HKals2s75u Ci auguriamo di poter collaborare in futuro. Tel./Fax.: +39 (55) 252 35 40 -- http://mail.python.org/mailman/listinfo/pyt

Re: While loop help

2013-04-09 Thread jmfauth
On 9 avr, 15:32, thomasancill...@gmail.com wrote: > I'm new to learning python and creating a basic program to convert units of > measurement which I will eventually expand upon but im trying to figure out > how to loop the entire program. When I insert a while loop it only loops the > first 2 l

Re: newbie question about confusing exception handling in urllib

2013-04-09 Thread Ian Kelly
On Tue, Apr 9, 2013 at 5:41 AM, wrote: > try: > response = urllib.request.urlopen(request) > content = response.read() > except BaseException as ue: > if (isinstance(ue, socket.timeout) or (hasattr(ue, "reason") and > isinstance(ue.reason, sock

Re: py2exe and 64/32 bit windows

2013-04-09 Thread Ian Kelly
On Tue, Apr 9, 2013 at 12:17 PM, Grant Edwards wrote: > Disclaimer: I'm a Unix guy and have been since the days of V7 on a > PDP-11 -- I rarely use MS Windows. > > While I don't normally use Windows, I do occasionally have Python > applications (written under Linux) which I'd like to distribute to

py2exe and 64/32 bit windows

2013-04-09 Thread Grant Edwards
Disclaimer: I'm a Unix guy and have been since the days of V7 on a PDP-11 -- I rarely use MS Windows. While I don't normally use Windows, I do occasionally have Python applications (written under Linux) which I'd like to distribute to Windows users. I've always used py2exe and Inno Setup to that,

Re: retrieving data from a plot in python.

2013-04-09 Thread Gary Herron
On 04/09/2013 10:33 AM, Debashish Saha wrote: suppose I have t= [0,7,10,17,23,29,31] f_t= [4,3,11,19,12,9,17] and I have plotted f_t vs t. Now from this 7 data points plotting if I want to retrieve 100 data points and save them in a text file. What do I have to do? What I am asking is not

Re: retrieving data from a plot in python.

2013-04-09 Thread Grant Edwards
On 2013-04-09, Debashish Saha wrote: > suppose I have t= [0,7,10,17,23,29,31] f_t= [4,3,11,19,12,9,17] and I have > plotted f_t vs t. > > Now from this 7 data points plotting if I want to retrieve 100 data points > and save them in a text file. What do I have to do? > > What I am asking is not a f

Re: help needed

2013-04-09 Thread leonardo
thanks i did it! Il giorno 08/apr/2013, alle ore 13:56, rusi ha scritto: > On Apr 8, 4:41 pm, Dave Angel wrote: > >> Go back to the previous message and you'll see Adam tells you exactly >> what to type at the terminal. But to be more literal: >> >> python ex13.py first 2nd 3rd > > > fo

Re: im.py: a python communications tool

2013-04-09 Thread Mark Janssen
> Are there that many people in the country who have no clue how the > legal system works? Gads. I'm trying to show you how the legal system *doesn't* work. All your points may be valid under court history, but that history is tainted. It doesn't mean the system is working, only that cases have

retrieving data from a plot in python.

2013-04-09 Thread Debashish Saha
suppose I have t= [0,7,10,17,23,29,31] f_t= [4,3,11,19,12,9,17] and I have plotted f_t vs t. Now from this 7 data points plotting if I want to retrieve 100 data points and save them in a text file. What do I have to do? What I am asking is not a fitting of the plot. I know between two points plot

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 01:18 PM, thomasancill...@gmail.com wrote: sorry i just started using google groups, not really all that sure how to use it properly. IMHO, best way is to switch to a good email program, and mail your messages to comp.lang.python. That's after subscribing via http://mail.

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 12:57 PM, thomasancill...@gmail.com wrote: I responded before I saw this message, this was very helpful so I appreciate your quick and helpful responses. So do you think prompting for a string and then checking if the string is true is a good practice for something like this? Whe

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 3:18 AM, wrote: > sorry i just started using google groups, not really all that sure how to use > it properly. The best way to use Google Groups is to not use it, frankly. Just subscribe to the mailing list in gmail; it has its own issues (eg it encourages top-posting by

Re: While loop help

2013-04-09 Thread thomasancilleri
sorry i just started using google groups, not really all that sure how to use it properly. -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 09:57 AM, thomasancill...@gmail.com wrote: On Tuesday, April 9, 2013 9:32:18 AM UTC-4, thomasa...@gmail.com wrote: I'm new to learning python and creating a basic program to convert units of measurement which I will eventually expand upon but im trying to figure out how to loop t

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 2:57 AM, wrote: > I responded before I saw this message, this was very helpful so I appreciate > your quick and helpful responses. So do you think prompting for a string and > then checking if the string is true is a good practice for something like > this? When would c

Re: While loop help

2013-04-09 Thread thomasancilleri
I responded before I saw this message, this was very helpful so I appreciate your quick and helpful responses. So do you think prompting for a string and then checking if the string is true is a good practice for something like this? When would checking for true/false be necessary? -- http://ma

Re: While loop help

2013-04-09 Thread thomasancilleri
So what would be the proper way to perform a loop of this program. I still can't quite figure out the best way to do it. -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 2:24 AM, wrote: > For system version I get this: > 2.7.2 (default, Oct 11 2012, 20:14:37) > [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] Lovely! Perfect. > But, what I don't understand exactly is the while statement. I've been > looking around a lo

Re: While loop help

2013-04-09 Thread Joel Goldstick
On Tue, Apr 9, 2013 at 12:24 PM, wrote: > For system version I get this: > 2.7.2 (default, Oct 11 2012, 20:14:37) > [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] > > Also, I understand what your saying about the continuation code. There's > no need for me to include it in eac

Re: While loop help

2013-04-09 Thread thomasancilleri
For system version I get this: 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] Also, I understand what your saying about the continuation code. There's no need for me to include it in each if/else statement, I could just use it at the en

Re: newbie question about confusing exception handling in urllib

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 1:05 AM, Steven D'Aprano wrote: > One exception to this rule (no pun intended) is that sometimes you want > to hide the details of unexpected tracebacks from your users. In that > case, it may be acceptable to wrap your application's main function in a > try block, catch an

Re: standalone vs embedded interpreter

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 1:52 AM, rusi wrote: > You probably need readline > See http://docs.python.org/2/library/cmd.html#cmd.Cmd.cmdloop > [Also try Control-P COntrol-N for up and down arrow] Be aware that GNU readline is GPL, not LGPL. This may have consequences if you distribute your code. Ch

Re: standalone vs embedded interpreter

2013-04-09 Thread Antoine Pitrou
Nick Gnedin gmail.com> writes: > I expect it to behave the same way as if I was running it as a > standalone program. On Windows this is indeed the case, but on my Linux > box (Python 3.3.1 (default, Apr 8 2013, 22:33:31) [GCC 4.1.2 20080704 > (Red Hat 4.1.2-51)]) I get a different behavior in

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 1:47 AM, wrote: > ... I'm not sure what version I'm using ... Try putting these lines into a Python script: import sys print(sys.version) That, on any version of Python (back a fairly long way, Steven D'Aprano can probably say how far), will give you a line or so of out

Re: im.py: a python communications tool

2013-04-09 Thread Mark Lawrence
On 09/04/2013 08:21, Chris Angelico wrote: On Tue, Apr 9, 2013 at 5:20 PM, Mark Janssen wrote: On Tue, Apr 9, 2013 at 12:14 AM, Chris Angelico wrote: On Tue, Apr 9, 2013 at 1:37 PM, Mark Janssen wrote: In the case of free (libre) open source software, such a case would have no merit, becaus

Re: While loop help

2013-04-09 Thread Joel Goldstick
On Tue, Apr 9, 2013 at 11:47 AM, wrote: > Sorry I'm just starting to learn python and I'm not sure what version I'm > using to be quite honest. I just started typing it up in Komodo edit (Which > I'm not personally a fan in particular) I fixed the missing parenthesis > which fixed the invalid syn

Re: standalone vs embedded interpreter

2013-04-09 Thread rusi
On Apr 9, 8:33 pm, Nick Gnedin wrote: > Folks, > > When simply I embed the interpreter: > >         #include "Python.h" > >         int main() >         { >           Py_Initialize(); >           PyRun_InteractiveLoop(stdin,"test"); >           Py_Finalize(); > >           return 0; >         } >

Re: While loop help

2013-04-09 Thread thomasancilleri
Sorry I'm just starting to learn python and I'm not sure what version I'm using to be quite honest. I just started typing it up in Komodo edit (Which I'm not personally a fan in particular) I fixed the missing parenthesis which fixed the invalid syntax problem. Also, I apologize for submitting c

Re: I hate you all

2013-04-09 Thread Mark Lawrence
On 09/04/2013 14:39, Grant Edwards wrote: On 2013-04-09, Mark Lawrence wrote: But wouldn't it have been easier simply to do do a quick sed or whatever rather than to spend hours here arguing? Where's the fun in that? :) What, you don't think sed is fun? Having never really used a *nix

standalone vs embedded interpreter

2013-04-09 Thread Nick Gnedin
Folks, When simply I embed the interpreter: #include "Python.h" int main() { Py_Initialize(); PyRun_InteractiveLoop(stdin,"test"); Py_Finalize(); return 0; } I expect it to behave the same way as if I was running it as a

Re: Python httplib, request & putrequest

2013-04-09 Thread Steven D'Aprano
On Tue, 09 Apr 2013 18:20:04 +0800, 小学园PHP wrote: > I need to use the python httplib. > > And i code two sample, the first works, not the second. > > But what i need is the second. > > In the second sample, the data seems not be sent correctly. > > I want to know where is the problem in the se

Python pdb bug, followed by bug in bugs.python.org

2013-04-09 Thread donaldcallen
I am I've developed an application in Python 3.3.1 (on an up-to-date 64-bit Arch Linux system) and am attempting to use pdb to debug it. I am getting incorrect stack traces. I've made up a little 10-line program that illustrates the problem and I attempted to register on the bug-tracker site, u

Re: newbie question about confusing exception handling in urllib

2013-04-09 Thread Steven D'Aprano
On Tue, 09 Apr 2013 06:19:09 -0700, cabbar wrote: > How do I > handle all other exceptions, just say Exception: and handle them? I want > to silently ignore them. Please don't. That is normally poor practice, since it simply hides bugs in your code. As a general rule, you should only catch exce

Re: Python module vs library

2013-04-09 Thread Michael Torrie
On 04/09/2013 08:29 AM, rusi wrote: > I guess Michael meant "...module or package." > Else the next question is going to be "Can you explain recursion in > python?" :-) You're right. On both counts. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: I hate you all

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 12:17 AM, Tim Chase wrote: > | sed -e '/What.*n.t/{s//Sure I/;s/?/!/};/^-- /{r .signature' -e'q}' > A very apt response. Oh wait, I already have sed on this system, don't need to fire up apt. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: im.py: a python communications tool

2013-04-09 Thread Grant Edwards
On 2013-04-09, Mark Janssen wrote: Where do YOU come up with the idea that you can't be sued if money didn't change hands? In what jurisdiction is that true? Unless it's true in every jurisdiction that the internet touches, I wouldn't trust it to protect me. >>> >>> I know, the

Re: newbie question about confusing exception handling in urllib

2013-04-09 Thread Peter Otten
cab...@gmail.com wrote: > Ah, looks better. > > But, 2 questions: > > 1. I should also catch ConnectionResetError I am guessing. Does it need a special reaction? If so give it its own except suite. > 2. How do I handle all other exceptions, just say Exception: and handle > them? I want to sile

Re: im.py: a python communications tool

2013-04-09 Thread Grant Edwards
On 2013-04-09, Mark Janssen wrote: >> Where do YOU come up with the idea that you can't be sued if money >> didn't change hands? In what jurisdiction is that true? Unless it's >> true in every jurisdiction that the internet touches, I wouldn't trust >> it to protect me. > > I know, the legal syste

Re: Python module vs library

2013-04-09 Thread rusi
On Apr 9, 7:18 pm, Michael Torrie wrote: > On 04/09/2013 03:58 AM, k.lykour...@gmail.com wrote: > > > Hi, what is the difference between python module and library ? > > "library" doesn't really mean anything specifically to Python's > interpreter.  It's not a valid keyword and is only used by huma

Re: Python module vs library

2013-04-09 Thread Michael Torrie
On 04/09/2013 03:58 AM, k.lykour...@gmail.com wrote: > Hi, what is the difference between python module and library ? "library" doesn't really mean anything specifically to Python's interpreter. It's not a valid keyword and is only used by humans to describe the abstract function and nature of a

Re: newbie question about confusing exception handling in urllib

2013-04-09 Thread Terry Jan Reedy
On 4/9/2013 7:41 AM, cab...@gmail.com wrote: Hi, I have been using Java/Perl professionally for many years and have been trying to learn python3 recently. As my first program, I tried writing a class for a small project, and I am having really hard time understanding exception handling in url

Re: I hate you all

2013-04-09 Thread Tim Chase
On 2013-04-09 13:39, Grant Edwards wrote: > On 2013-04-09, Mark Lawrence wrote: > > > >> But wouldn't it have been easier simply to do do a quick sed or > >> whatever rather than to spend hours here arguing? > > > > Where's the fun in that? :) > > What, you don't think sed is fun? > > -- > Gran

Re: While loop help

2013-04-09 Thread Chris Angelico
On Tue, Apr 9, 2013 at 11:58 PM, wrote: > Also I'm getting a invalid syntax next to my elif statements that i wasnt > getting before. why is this happening now? Ah! That's relating to the close parenthesis problem I mentioned. That's the exact issue I saw. When you get told about a problem, so

Re: Python module vs library

2013-04-09 Thread Terry Jan Reedy
On 4/9/2013 5:58 AM, k.lykour...@gmail.com wrote: Hi, what is the difference between python module and library ? They are in different categories. A Python module is a namespace (a mapping of names to objects) created by running Python code as a main module or by import statements within Pyth

Re: While loop help

2013-04-09 Thread Chris Angelico
On Tue, Apr 9, 2013 at 11:32 PM, wrote: > I'm new to learning python and creating a basic program to convert units of > measurement which I will eventually expand upon but im trying to figure out > how to loop the entire program. When I insert a while loop it only loops the > first 2 lines. Ca

Re: While loop help

2013-04-09 Thread thomasancilleri
Also I'm getting a invalid syntax next to my elif statements that i wasnt getting before. why is this happening now? -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread thomasancilleri
On Tuesday, April 9, 2013 9:32:18 AM UTC-4, thomasa...@gmail.com wrote: > I'm new to learning python and creating a basic program to convert units of > measurement which I will eventually expand upon but im trying to figure out > how to loop the entire program. When I insert a while loop it only

Re: I hate you all

2013-04-09 Thread Grant Edwards
On 2013-04-09, Mark Lawrence wrote: > >> But wouldn't it have been easier simply to do do a quick sed or whatever >> rather than to spend hours here arguing? > > Where's the fun in that? :) What, you don't think sed is fun? -- Grant Edwards grant.b.edwardsYow! Did I say I

While loop help

2013-04-09 Thread thomasancilleri
I'm new to learning python and creating a basic program to convert units of measurement which I will eventually expand upon but im trying to figure out how to loop the entire program. When I insert a while loop it only loops the first 2 lines. Can someone provide a detailed beginner friendly exp

Re: print to screen and file with one print statement

2013-04-09 Thread amiwinter
On Thursday, February 13, 2003 2:51:02 PM UTC+2, Mike Müller wrote: > "Mark McEahern" wrote in message > news:... > > Same basic idea: > > > > #!/usr/bin/env python > > > > import sys > > > > class MyWriter: > > > > def __init__(self, stdout, filename): > > self.stdout = stdout >

Re: im.py: a python communications tool

2013-04-09 Thread Chris Angelico
On Tue, Apr 9, 2013 at 11:03 PM, Steven D'Aprano wrote: > On Tue, 09 Apr 2013 19:40:24 +1000, Chris Angelico wrote: > >> I'm sorry, I'm somewhat lost here. The dollar I have here has a mob of >> animals on one side and someone's face on the other - no pyramids, no >> all-seeing-eye. > > It must be

Re: newbie question about confusing exception handling in urllib

2013-04-09 Thread cabbar
Ah, looks better. But, 2 questions: 1. I should also catch ConnectionResetError I am guessing. 2. How do I handle all other exceptions, just say Exception: and handle them? I want to silently ignore them. Thanks... On Tuesday, April 9, 2013 2:41:51 PM UTC+3, cab...@gmail.com wrote: > Hi, > >

Re: im.py: a python communications tool

2013-04-09 Thread Steven D'Aprano
On Tue, 09 Apr 2013 02:29:43 -0700, Mark Janssen wrote: > Well, out here in the good ol' USA, there no "duty of care" That explains a lot. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: im.py: a python communications tool

2013-04-09 Thread Steven D'Aprano
On Tue, 09 Apr 2013 19:40:24 +1000, Chris Angelico wrote: > On Tue, Apr 9, 2013 at 6:58 PM, Mark Janssen > wrote: >> If you want tin foil hats, though, >> you'll have to notice what's right in front of your face -- you already >> have voodoo right on your currency that YOU have accepted. Egyptian

Re: newbie question about confusing exception handling in urllib

2013-04-09 Thread Peter Otten
cab...@gmail.com wrote: > Hi, > > I have been using Java/Perl professionally for many years and have been > trying to learn python3 recently. As my first program, I tried writing a > class for a small project, and I am having really hard time understanding > exception handling in urllib and in py

newbie question about confusing exception handling in urllib

2013-04-09 Thread cabbar
Hi, I have been using Java/Perl professionally for many years and have been trying to learn python3 recently. As my first program, I tried writing a class for a small project, and I am having really hard time understanding exception handling in urllib and in python in general... Basically, what

Re: New version

2013-04-09 Thread Rodrick Brown
Was it so hard to state in the email subject what the new version is or describe in the body a small summary on what you've released? I swear the users on this list post the most useless emails. Sent from my iPhone On Apr 9, 2013, at 7:12 AM, Jake D wrote: > There's a new version of im.py out o

Re: im.py: a python communications tool

2013-04-09 Thread Jake D
I just put out a new version of im.py on GitHub. You can find it here: https://github.com/jhunter-d/im.py/blob/master/im.py -- http://mail.python.org/mailman/listinfo/python-list

New version

2013-04-09 Thread Jake D
There's a new version of im.py out on GitHub: https://github.com/jhunter-d/im.py/blob/master/im.py -- http://mail.python.org/mailman/listinfo/python-list

Re: im.py: a python communications tool

2013-04-09 Thread Mark Janssen
On Tue, Apr 9, 2013 at 2:40 AM, Chris Angelico wrote: > On Tue, Apr 9, 2013 at 6:58 PM, Mark Janssen > wrote: >> If you want tin foil hats, though, >> you'll have to notice what's right in front of your face -- you >> already have voodoo right on your currency that YOU have accepted. >> Egyptian

Concurrent multicast udp socket

2013-04-09 Thread emmanuel . richiardone
Dear all I have a problem with multicast sockets of the same port but belonging to different groups. For example, I have two udp sockets, listening on the same local address and same port; for each one I set the sockopt to listen on a specific multicast group (I can also see the igmp packets g

Python httplib, request & putrequest

2013-04-09 Thread ??????PHP
I need to use the python httplib. And i code two sample, the first works, not the second. But what i need is the second. In the second sample, the data seems not be sent correctly. I want to know where is the problem in the second. TIA, Levi Here is my two code: first sample: conn=ht

Python httplib, request & putrequest

2013-04-09 Thread ??????PHP
I need to use the python httplib. And i code two sample, the first works, not the second. But what i need is the second. In the second sample, the data seems not be sent correctly. I want to know where is the problem in the second. TIA, Levi Here is my two code: first sample: conn=httplib.HT

Python module vs library

2013-04-09 Thread k . lykourgos
Hi, what is the difference between python module and library ? -- http://mail.python.org/mailman/listinfo/python-list

Re: im.py: a python communications tool

2013-04-09 Thread Chris Angelico
On Tue, Apr 9, 2013 at 7:46 PM, Mark Janssen wrote: > On Tue, Apr 9, 2013 at 2:40 AM, Chris Angelico wrote: >> On Tue, Apr 9, 2013 at 6:58 PM, Mark Janssen >> wrote: >>> If you want tin foil hats, though, >>> you'll have to notice what's right in front of your face -- you >>> already have voodo

Re: im.py: a python communications tool

2013-04-09 Thread Chris Angelico
On Tue, Apr 9, 2013 at 6:58 PM, Mark Janssen wrote: > If you want tin foil hats, though, > you'll have to notice what's right in front of your face -- you > already have voodoo right on your currency that YOU have accepted. > Egyptian pyramids on the U.S. dollar? All seeing eye? I'm sorry, I'm s

Re: im.py: a python communications tool

2013-04-09 Thread Mark Janssen
> Lots of obvious generalizations out there which are wrong, at least some of > the time. You know, Dave funny thing is, right there is one of them. -- MarkJ Tacoma, Washington -- http://mail.python.org/mailman/listinfo/python-list

Re: im.py: a python communications tool

2013-04-09 Thread Mark Janssen
> And by putting it online for free download, IN THE ABSENCE OF AN EXPLICIT > DISCLAIMER, you are implying that it is fit for its purpose, and that you > have a duty of care to make sure that it does do what you say it does. No, there is no requirement for a disclaimer. In the US, what is not exp

  1   2   >