Re: Using asyncio for serial port

2014-02-11 Thread Phil Connell
On 8 Feb 2014 23:45, james.time4...@gmail.com wrote: Hiya I'm looking at using asyncio for creating an socket - serial protocol bridge, but looking at the current implementation of asyncio it looks to be quite socket specific. I can't see any way to get it to support a simple serial device.

Re: Drawing polygons in python turtle

2014-02-11 Thread Terry Reedy
On 2/10/2014 10:01 PM, genius...@gmail.com wrote: Is there a better way of drawing such as another modules Logo is a drawing language designed for kids who do not know geometry but can imagine walking around on a dirt field and occasionally turning while dragging a stick or dripping paint.

Re: Error getting while running python function

2014-02-11 Thread Mark Lawrence
On 11/02/2014 04:26, Jaydeep Patil wrote: On Tuesday, 11 February 2014 09:37:23 UTC+5:30, Jaydeep Patil wrote: I have defined one function as below. def InfoDir(msg): msg1 = wx.MessageDialog(msg) msg1.ShowModal() msg1.Destroy() InfoDir(Testing) It gives

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Terry Reedy
On 2/11/2014 2:43 AM, Larry Hastings wrote: On behalf of the Python development team, I'm delighted to announce the first release candidate of Python 3.4. To download Python 3.4.0rc1 visit: http://www.python.org/download/releases/3.4.0/ I installed 64 bit 3.3.4 yesterday with no

Re: [Python-Dev] [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Victor Stinner
Hi, It would be nice to give also the link to the whole changelog in your emails and on the website: http://docs.python.org/3.4/whatsnew/changelog.html Congrats for your RC1 release :-) It's always hard to make developers stop addings new minor changes before the final version :-) Victor

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Terry Reedy
On 2/11/2014 5:13 AM, Terry Reedy wrote: On 2/11/2014 2:43 AM, Larry Hastings wrote: On behalf of the Python development team, I'm delighted to announce the first release candidate of Python 3.4. To download Python 3.4.0rc1 visit: http://www.python.org/download/releases/3.4.0/ I

Re: Get a datetime with nanoseconds

2014-02-11 Thread Vlastimil Brom
2014-02-11 6:42 GMT+01:00 Igor Korot ikoro...@gmail.com: Hi, ALL, I am woking on an application for digital forensic. In this application I am getting this 2 pieces of information: atime - long representing the time stamp atime_nano - long representing the nanoseconds. What I'd like to do

Re:Get a datetime with nanoseconds

2014-02-11 Thread Dave Angel
Igor Korot ikoro...@gmail.com Wrote in message: Construct a datetime. timedelta object, and add it to your datetime. mytime += datetime. timedelta (microseconds=nano//1000) -- DaveA -- https://mail.python.org/mailman/listinfo/python-list

Re: Get a datetime with nanoseconds

2014-02-11 Thread Asaf Las
On Tuesday, February 11, 2014 7:42:16 AM UTC+2, Igor Korot wrote: Hi, ALL, I am woking on an application for digital forensic. In this application I am getting this 2 pieces of information:   atime - long representing the time stamp atime_nano - long representing the nanoseconds.

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread David Robinow
On Tue, Feb 11, 2014 at 5:45 AM, Terry Reedy tjre...@udel.edu wrote: On 2/11/2014 5:13 AM, Terry Reedy wrote: ... I installed 64 bit 3.3.4 yesterday with no problem. I reran it today in repair mode and again, no problem. With 64 bit 3.4.0, I get There is a problem with this Windows

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread MRAB
On 2014-02-11 13:06, David Robinow wrote: On Tue, Feb 11, 2014 at 5:45 AM, Terry Reedy tjre...@udel.edu wrote: On 2/11/2014 5:13 AM, Terry Reedy wrote: ... I installed 64 bit 3.3.4 yesterday with no problem. I reran it today in repair mode and again, no problem. With 64 bit 3.4.0, I get There

pip3.x error using LIST instead of list

2014-02-11 Thread Mark Lawrence
As the subject line says, details below. c:\Python34\Scriptspip3.4 LIST Traceback (most recent call last): File C:\Python34\lib\runpy.py, line 189, in _run_module_as_main __main__, mod_spec) File C:\Python34\lib\runpy.py, line 87, in _run_code exec(code, run_globals) File

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 1:10 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: File C:\Python34\lib\site-packages\pip\__init__.py, line 156, in parseopts cmd_args.remove(args_else[0].lower()) ValueError: list.remove(x): x not in list Is this a known problem, should I raise a bug against

Re: What are the kinds of software that are not advisable to be developed using Python?

2014-02-11 Thread Roy Smith
In article 52f9b6af$0$11128$c3e8...@news.astraweb.com, Steven D'Aprano st...@pearwood.info wrote: On Mon, 10 Feb 2014 22:40:48 -0600, Tim Daneliuk wrote: On 02/08/2014 05:54 PM, Sam wrote: I got to know about Python a few months ago and today, I want to develop only using Python because

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Johannes Findeisen
On Tue, 11 Feb 2014 14:10:32 + Mark Lawrence wrote: As the subject line says, details below. c:\Python34\Scriptspip3.4 LIST Traceback (most recent call last): File C:\Python34\lib\runpy.py, line 189, in _run_module_as_main __main__, mod_spec) File C:\Python34\lib\runpy.py,

Re: Finding size of Variable

2014-02-11 Thread Neil Cerutti
On 2014-02-10, Ned Batchelder n...@nedbatchelder.com wrote: On 2/10/14 9:43 AM, Tim Chase wrote: The opposite of what the utf8/utf16 do! sys.getsizeof(('a' * 100 + 'oe' + '\U0001').encode('utf-8')) 123 sys.getsizeof(('a' * 100 + 'oe' + '\U0001').encode('utf-16'))

Re: What are the kinds of software that are not advisable to be developed using Python?

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 1:24 AM, Roy Smith r...@panix.com wrote: Whether I mind shipping my source, or you mind shipping your source isn't really what matters here. What matters is that there *are* people/companies who don't want to expose their source. Perhaps for reasons we don't agree

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 1:27 AM, Johannes Findeisen mail...@hanez.org wrote: Hi, I get the same error with an older release of pip. But, I get that error regardless which uppercase argument I am passing to pip. Look below: Correct. The exception is thrown before it's looked at what the

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Mark Lawrence
On 11/02/2014 14:41, Chris Angelico wrote: On Wed, Feb 12, 2014 at 1:27 AM, Johannes Findeisen mail...@hanez.org wrote: Hi, I get the same error with an older release of pip. But, I get that error regardless which uppercase argument I am passing to pip. Look below: Correct. The exception is

Re: New to Py 3.3.3 having prob. with large integer div. float.

2014-02-11 Thread hlauk . h . bogart
On Tuesday, February 11, 2014 2:24:01 AM UTC-5, cas...@gmail.com wrote: On Monday, February 10, 2014 6:40:03 PM UTC-8, hlauk.h...@gmail.com wrote: I am coming off Python 2.6.6 32 bite platform and now in win 8.1 64 bite. I had no problems with gmpy in 2.6.6 and large integer floating

Re: New to Py 3.3.3 having prob. with large integer div. float.

2014-02-11 Thread Mark Lawrence
On 11/02/2014 14:50, hlauk.h.bog...@gmail.com wrote: Thanks a lot, I will give it a go. Dan I'm pleased to see that you have answers. In return would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the double line spacing that I've

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 1:50 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 11/02/2014 14:41, Chris Angelico wrote: On Wed, Feb 12, 2014 at 1:27 AM, Johannes Findeisen mail...@hanez.org wrote: Hi, I get the same error with an older release of pip. But, I get that error regardless which

Re: PyWart: More surpises via implict conversion to boolean (and other steaming piles!)

2014-02-11 Thread Tim Chase
On 2014-02-11 06:30, Steven D'Aprano wrote: You need to understand the difference between syntax and semantics. This is invalid English syntax: Cat mat on sat the. This is valid syntax, but semantically wrong: The mat sat on the cat. This is both syntactically and semantically

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Asaf Las
On Tuesday, February 11, 2014 4:10:32 PM UTC+2, Mark Lawrence wrote: As the subject line says, details below. c:\Python34\Scriptspip3.4 LIST Traceback (most recent call last): File C:\Python34\lib\runpy.py, line 189, in _run_module_as_main __main__, mod_spec) File

Re: PyWart: More surpises via implict conversion to boolean (and other steaming piles!)

2014-02-11 Thread Travis Griggs
On Feb 10, 2014, at 10:30 PM, Steven D'Aprano st...@pearwood.info wrote: 1. Parenthesis should not be required for parameter- less functions. Of course they should. Firstly, parameter-less functions are a code- smell, and ought to be discouraged. Secondly, even if you have a good

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Duncan Booth
Terry Reedy tjre...@udel.edu wrote: On 2/11/2014 2:43 AM, Larry Hastings wrote: On behalf of the Python development team, I'm delighted to announce the first release candidate of Python 3.4. To download Python 3.4.0rc1 visit: http://www.python.org/download/releases/3.4.0/ I

Re: PyWart: More surpises via implict conversion to boolean (and other steaming piles!)

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 2:36 AM, Travis Griggs travisgri...@gmail.com wrote: OTOH, I’m not sure I’ve heard the parameters-less functions are a code one? Is it just loose functions that you’re referring to? As opposed to methods (which are just bound functions)? I could maybe accept that. But

Re: PyWart: More surpises via implict conversion to boolean (and other steaming piles!)

2014-02-11 Thread Jussi Piitulainen
Travis Griggs writes: in fact, methods with long parameter lists are generally seen as If you have a predicate with ten arguments, you probably forgot some (heard long time ago over in the Prolog world). -- https://mail.python.org/mailman/listinfo/python-list

Re: PyWart: More surpises via implict conversion to boolean (and other steaming piles!)

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 3:07 AM, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: Travis Griggs writes: in fact, methods with long parameter lists are generally seen as If you have a predicate with ten arguments, you probably forgot some (heard long time ago over in the Prolog world).

ANN: PSF Python Marketing Brochure - Last call for Ad Sponsors

2014-02-11 Thread M.-A. Lemburg
[Please help spread the word by forwarding to other relevant mailing lists, user groups, etc. world-wide; thanks :-)] ANNOUNCING PSF Python Marketing Brochure - Last call for Ad Sponsors Please support the

Re: PyWart: More surpises via implict conversion to boolean (and other steaming piles!)

2014-02-11 Thread Travis Griggs
On Feb 11, 2014, at 7:52 AM, Chris Angelico ros...@gmail.com wrote: On Wed, Feb 12, 2014 at 2:36 AM, Travis Griggs travisgri...@gmail.com wrote: OTOH, I’m not sure I’ve heard the parameters-less functions are a code one? Is it just loose functions that you’re referring to? As opposed to

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Terry Reedy
On 2/11/2014 8:06 AM, David Robinow wrote: On Tue, Feb 11, 2014 at 5:45 AM, Terry Reedy tjre...@udel.edu wrote: On 2/11/2014 5:13 AM, Terry Reedy wrote: ... I installed 64 bit 3.3.4 yesterday with no problem. I reran it today in repair mode and again, no problem. With 64 bit 3.4.0, I get

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Dave Angel
Mark Lawrence breamore...@yahoo.co.uk Wrote in message: No matter what I try I can't get the subcommands in lower-case when I have caps lock on, is there a simple work-around for this as well? :) You could do what I've done for my own DOS, Windows, and Linux computers for years:

Re: Using asyncio for serial port

2014-02-11 Thread Marko Rauhamaa
james.time4...@gmail.com: I'm looking at using asyncio for creating an socket - serial protocol bridge, but looking at the current implementation of asyncio it looks to be quite socket specific. I can't see any way to get it to support a simple serial device. Never tried it, but if you can

Re: Newcomer Help

2014-02-11 Thread Walter Hughey
No, Gisle Vanem - I do NOT get the picture. First of all you did NOT answer my question. And this is the way I always have - and the people I typically respond to - respond to emails. Check the end - if that is where you expect me to enter any additional info. - Original Message -

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Terry Reedy
On 2/11/2014 10:42 AM, Duncan Booth wrote: Terry Reedy tjre...@udel.edu wrote: On 2/11/2014 2:43 AM, Larry Hastings wrote: On behalf of the Python development team, I'm delighted to announce the first release candidate of Python 3.4. To download Python 3.4.0rc1 visit:

Flag control variable

2014-02-11 Thread luke . geelen
hello, i'd like to know how to set up a flag to change a variable, for example, i want a simple script to combine 2 numbers, sum = num + another_num print Now the sum of the numbers equals : , sum how could i make it so that if i type python ./script.py 21 41 that i get the sum of 21 and 41 ?

Re: Flag control variable

2014-02-11 Thread Larry Martell
On Tuesday, February 11, 2014, luke.gee...@gmail.com wrote: hello, i'd like to know how to set up a flag to change a variable, for example, i want a simple script to combine 2 numbers, sum = num + another_num print Now the sum of the numbers equals : , sum how could i make it so that if

Re: Flag control variable

2014-02-11 Thread Peter Otten
luke.gee...@gmail.com wrote: i'd like to know how to set up a flag to change a variable, for example, i want a simple script to combine 2 numbers, sum = num + another_num print Now the sum of the numbers equals : , sum how could i make it so that if i type python ./script.py 21 41

Re: PyWart: More surpises via implict conversion to boolean (and other steaming piles!)

2014-02-11 Thread Terry Reedy
On 2/11/2014 11:19 AM, Travis Griggs wrote: On Feb 11, 2014, at 7:52 AM, Chris Angelico ros...@gmail.com wrote: So in that situation, the no-args call does make sense. Of course, this is a call to a function that does take args, but it's accepting all the defaults and providing no additional

Re: Flag control variable

2014-02-11 Thread luke . geelen
Thanks a lot -- https://mail.python.org/mailman/listinfo/python-list

Metaprogramming question

2014-02-11 Thread Travis Griggs
The discussion about niladic functions, made me want to follow a segue and do some reflection/introspective programming in Python. I’ve not done a lot of that yet, and it seemed like an educational (well, at least entertaining) goose chase. If I run the following code: import datetime

Re: Flag control variable

2014-02-11 Thread luke . geelen
when expandig the script to multiple calcs i got a problem a = 32 c = 51 sign = * File stdin, line 1 sign = * ^ SyntaxError: invalid syntax is there a way of adding * without quoting marks, because if you do it just soms the arguments --

Re: Metaprogramming question

2014-02-11 Thread Zachary Ware
On Tue, Feb 11, 2014 at 12:13 PM, Travis Griggs travisgri...@gmail.com wrote: So here’s my basic question. Is there anyway to programatically query that information in python code? inspect.signature(datetime.datetime.now) just gives a ValueError. inspect must only be good for the python

Re: Flag control variable

2014-02-11 Thread Tim Chase
On 2014-02-11 10:16, luke.gee...@gmail.com wrote: when expandig the script to multiple calcs i got a problem a = 32 c = 51 sign = * File stdin, line 1 sign = * ^ SyntaxError: invalid syntax is there a way of adding * without quoting marks, because if you do it just

Re: Flag control variable

2014-02-11 Thread luke . geelen
well i'm trying something else but no luck : #!bin/bash/python import sys import os a = int(sys.argv[1]) sign = (sys.argv[2]) b = int(sys.argv[3]) if sign == '+': sum = a + b print a, sign, b, =, a + b command1 = sudo mpg321

Re: Flag control variable

2014-02-11 Thread Tim Chase
On 2014-02-11 10:37, luke.gee...@gmail.com wrote: command1 = sudo mpg321 'http://translate.google.com/translate_tts?tl=enq=%s_times%s_equals%s' % (a, b, sum) when using * i get Traceback (most recent call last): File ./math+.py, line 6, in module b = int(sys.argv[3])

Re: Flag control variable

2014-02-11 Thread Peter Otten
luke.gee...@gmail.com wrote: well i'm trying something else but no luck : #!bin/bash/python Hm. import sys import os For debugging purposes put the line print sys.argv here to see what arguments are passed to the script. When you type $ python script.py 2 * 2 in the shell the * sign

Re: pip3.x error using LIST instead of list

2014-02-11 Thread Asaf Las
https://groups.google.com/forum/#!topic/python-virtualenv/8wzQfjQW2i8 -- https://mail.python.org/mailman/listinfo/python-list

Re: Finding size of Variable

2014-02-11 Thread wxjmfauth
Le lundi 10 février 2014 15:43:08 UTC+1, Tim Chase a écrit : On 2014-02-10 06:07, wxjmfa...@gmail.com wrote: Python does not save memory at all. A str (unicode string) uses less memory only - and only - because and when one uses explicitly characters which are consuming less memory.

Re: Flag control variable

2014-02-11 Thread luke . geelen
Op dinsdag 11 februari 2014 19:55:59 UTC+1 schreef Gary Herron: On 02/11/2014 10:37 AM, luke.gee...@gmail.com wrote: well i'm trying something else but no luck : #!bin/bash/python import sys import os a = int(sys.argv[1]) sign = (sys.argv[2]) b = int(sys.argv[3])

Re: Flag control variable

2014-02-11 Thread Gary Herron
On 02/11/2014 10:37 AM, luke.gee...@gmail.com wrote: well i'm trying something else but no luck : #!bin/bash/python import sys import os a = int(sys.argv[1]) sign = (sys.argv[2]) b = int(sys.argv[3]) if sign == '+': sum = a + b print a, sign, b, =, a + b command1 = sudo mpg321

Re: Finding size of Variable

2014-02-11 Thread Mark Lawrence
On 11/02/2014 18:53, wxjmfa...@gmail.com wrote: Le lundi 10 février 2014 15:43:08 UTC+1, Tim Chase a écrit : On 2014-02-10 06:07, wxjmfa...@gmail.com wrote: Python does not save memory at all. A str (unicode string) uses less memory only - and only - because and when one uses explicitly

Re: Flag control variable

2014-02-11 Thread luke . geelen
Op dinsdag 11 februari 2014 19:51:40 UTC+1 schreef Peter Otten: luke.gee...@gmail.com wrote: well i'm trying something else but no luck : #!bin/bash/python Hm. import sys import os For debugging purposes put the line print sys.argv here to

Re: Flag control variable

2014-02-11 Thread Gary Herron
On 02/11/2014 10:59 AM, luke.gee...@gmail.com wrote: Look at the error message. Carefully! It says, quite clearly, the call to int is being passed a string Adafruit-Raspberry-Pi-Python-Code, which of course can't be converted to an integer. Now the question is how you ran the program in

Re: Flag control variable

2014-02-11 Thread Mark Lawrence
On 11/02/2014 18:59, luke.gee...@gmail.com wrote: Would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the double line spaced text that I've snipped, thanks. -- My fellow Pythonistas, ask not what our language can do for you, ask what

Re: Flag control variable

2014-02-11 Thread luke . geelen
Op dinsdag 11 februari 2014 20:01:05 UTC+1 schreef luke@gmail.com: Op dinsdag 11 februari 2014 19:51:40 UTC+1 schreef Peter Otten: luke.gee...@gmail.com wrote: well i'm trying something else but no luck : #!bin/bash/python Hm.

Re: Flag control variable

2014-02-11 Thread Jussi Piitulainen
luke.gee...@gmail.com writes: when using python script.py 2 \* 2 i get Traceback (most recent call last): File math2.py, line 5, in module sign = int(sys.argv[2]) ValueError: invalid literal for int() with base 10: '*' You've mis-spelt sigh. This is not the code that you posted.

Re: Flag control variable

2014-02-11 Thread Gary Herron
On 02/11/2014 11:01 AM, luke.gee...@gmail.com wrote: when using python script.py 2 \* 2 i get Traceback (most recent call last): File math2.py, line 5, in module sign = int(sys.argv[2]) ValueError: invalid literal for int() with base 10: '*' Stop trying to guess what is going on. Print out

Re: Flag control variable

2014-02-11 Thread Gary Herron
On 02/11/2014 11:06 AM, luke.gee...@gmail.com wrote: i found it int(sys.argv[2]) should be sys.argv[2] is there a way i can do python ./script.py 3 * 3 instead of python ./script 3 \* 3 ? That's not really a Python question. The shell (as it's called) which interprets your typed command

Re: Flag control variable

2014-02-11 Thread Tim Chase
On 2014-02-11 11:06, luke.gee...@gmail.com wrote: command1 = sudo mpg321 'http://translate.google.com/translate_tts?tl=enq=%s_times%s_equals%s' 1) PLEASE either stop using Google Groups or take the time to remove the superfluous white-space you keep

Re: [RELEASED] Python 3.4.0 release candidate 1

2014-02-11 Thread Jurko Gospodnetić
Hi. On 11.2.2014. 17:21, Terry Reedy wrote: The failed 64-bit installs somehow messed up the 32-bit install. With 3.4 completely removed, including the residual directories, the 32-bit install works but the 64-bit install still gives me the same message. I had a similar problem with the

Re: Flag control variable

2014-02-11 Thread luke . geelen
Op dinsdag 11 februari 2014 20:28:44 UTC+1 schreef Tim Chase: On 2014-02-11 11:06, luke.gee...@gmail.com wrote: command1 = sudo mpg321 'http://translate.google.com/translate_tts?tl=enq=%s_times%s_equals%s' 1) PLEASE either

Re: Flag control variable

2014-02-11 Thread luke . geelen
hey, i got another problem now, if i use the imterpreter to do 3 * 4 it gives twelve the script gives ? any tips -- https://mail.python.org/mailman/listinfo/python-list

Re: Flag control variable

2014-02-11 Thread Mark Lawrence
On 11/02/2014 19:54, luke.gee...@gmail.com wrote: Op dinsdag 11 februari 2014 20:28:44 UTC+1 schreef Tim Chase: 1) PLEASE either stop using Google Groups or take the time to remove the superfluous white-space you keep adding to your posts/replies For the THIRD time, would you please read

Re: Flag control variable

2014-02-11 Thread Gary Herron
On 02/11/2014 11:55 AM, luke.gee...@gmail.com wrote: hey, i got another problem now, if i use the imterpreter to do 3 * 4 it gives twelve the script gives ? any tips 3*4 12 3*4 '' Multiplying two integers produces the result you expect. Multiplying a *string* by an integer is

Re: Flag control variable

2014-02-11 Thread luke . geelen
Would it be possible to make an int(sys.argv[1]) Not needed and set value 0 ( or in another script 1) For example a = int(sys.argv[1]) b = int(sys.argv[2]) c = int(sys.argv[3]) And I run Python ./script.py 2 3 It just set c automaticly to 0 or 1 Luke (PS thanks for the quick help) --

Re: Sort one sequence by O(n) in time and O(1) in space

2014-02-11 Thread Gregory Ewing
Steven D'Aprano wrote: Secondly, O(N*log N) applies to *comparison sorts*. Non-comparison sorts such as radix-, counting- and bucket-sort have average case complexity of O(N). They require additional space, though. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Flag control variable

2014-02-11 Thread Gary Herron
On 02/11/2014 01:18 PM, luke.gee...@gmail.com wrote: Would it be possible to make an int(sys.argv[1]) Not needed and set value 0 ( or in another script 1) For example a = int(sys.argv[1]) b = int(sys.argv[2]) c = int(sys.argv[3]) And I run Python ./script.py 2 3 It just set c automaticly to 0

Re: ANN: PSF Python Marketing Brochure - Last call for Ad Sponsors

2014-02-11 Thread emile
Under Subscription Sponsors in the listing of destinations, I'm going to guess from the grouping that NE should be NL. Emile On 02/11/2014 08:18 AM, M.-A. Lemburg wrote: [Please help spread the word by forwarding to other relevant mailing lists, user groups, etc. world-wide; thanks :-)]

Python programming

2014-02-11 Thread ngangsia akumbo
Please i have a silly question to ask. How long did it take you to learn how to write programs? What is the best way i can master thinker? I know the syntax but using it to write a program is a problem -- https://mail.python.org/mailman/listinfo/python-list

Python programming

2014-02-11 Thread ngangsia akumbo
Please i have a silly question to ask. How long did it take you to learn how to write programs? What is the best way i can master thinker? I know the syntax but using it to write a program is a problem -- https://mail.python.org/mailman/listinfo/python-list

Fun with function argument counts

2014-02-11 Thread Travis Griggs
After the recent discussion about the classic error: if self.isFooBar: return 42 Among many thing, the OPs contention was that the ability to have this kind of error was a Bad Thing (tm). Which led to me asking about code smells and parameterless functions/methods. So I got curious.

Re: Python programming

2014-02-11 Thread Mark Lawrence
On 12/02/2014 00:21, ngangsia akumbo wrote: Please i have a silly question to ask. How long did it take you to learn how to write programs? What is the best way i can master thinker? I know the syntax but using it to write a program is a problem You *NEVER* stop learning. To become a

Re: Fun with function argument counts

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 11:34 AM, Travis Griggs travisgri...@gmail.com wrote: 1) I did not want to try load all modules at once into my environment. I suspect that would create problems. Using os.fork() to isolate the load/analysis of each module was a handy way to deal with that. The trick

Simple % question

2014-02-11 Thread Scott W Dunning
I just have a simple question. I don’t understand why 1%10 = 1? -- https://mail.python.org/mailman/listinfo/python-list

Re:Python programming

2014-02-11 Thread Dave Angel
ngangsia akumbo ngang...@gmail.com Wrote in message: Please i have a silly question to ask. No silly questions, just silly answers. How long did it take you to learn how to write programs? An hour, twenty years. It took an hour to learn how the keypunch worked, where the manuals

Re: Python programming

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 11:21 AM, ngangsia akumbo ngang...@gmail.com wrote: Please i have a silly question to ask. How long did it take you to learn how to write programs? Well, let's see. I started programming a quarter of a century ago, and I'm a lot less than a quarter of the way to knowing

Re:Python programming

2014-02-11 Thread Walter Hurry
Dave Angel wrote: What is the best way i can master thinker? Never heard of it. Is it a computer language? Socrates himself is particularly missed -- https://mail.python.org/mailman/listinfo/python-list

Re: Python programming

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 12:11 PM, Dave Angel da...@davea.name wrote: I did some of my best work before I learned that some of those problems were impossible. Sounds like something from the invention of Post-It Notes. I can't find an authoritative source, but it's all over the internet,

Re: Python programming

2014-02-11 Thread Larry Martell
On Tue, Feb 11, 2014 at 8:21 PM, Walter Hurry walterhu...@gmail.com wrote: Dave Angel wrote: What is the best way i can master thinker? Never heard of it. Is it a computer language? Socrates himself is particularly missed A lovely little thinker, but a bugger when he's pissed. --

Re: Python programming

2014-02-11 Thread ngangsia akumbo
On Wednesday, February 12, 2014 2:11:39 AM UTC+1, Dave Angel wrote: ngangsia akumbo ngang...@gmail.com Wrote in message: python GUI Tkinter -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple % question

2014-02-11 Thread Ben Finney
Scott W Dunning swdunn...@cox.net writes: I just have a simple question. I don’t understand why 1%10 = 1? Have you read the documentation for that operator? URL:http://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations The language reference

Re: Fun with function argument counts

2014-02-11 Thread Ethan Furman
On 02/11/2014 05:05 PM, Chris Angelico wrote: On Wed, Feb 12, 2014 at 11:34 AM, Travis Griggs wrote: 6) Who writes a function with 19 mandatory arguments anyway subprocess._execute_child() and distutils.cygwincompiler._execute_child() Hmm. Those are internal functions (leading

Re: Simple % question

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 12:06 PM, Scott W Dunning swdunn...@cox.net wrote: I just have a simple question. I don’t understand why 1%10 = 1? The real question is: What do you expect that symbol to mean? Its actual meaning is quite simple. In long division, dividing one number by another looks

Re: Simple % question

2014-02-11 Thread Christopher Welborn
On 02/11/2014 07:06 PM, Scott W Dunning wrote: I just have a simple question. I don’t understand why 1%10 = 1? I think because 1 is evenly divisible by 10 exactly 0 times with a 1 remainder. I mean int(1 / 10) == 0, with a 1 remainder. The same is true for all numbers leading up to 10.

Re: Simple % question

2014-02-11 Thread Rustom Mody
On Wednesday, February 12, 2014 6:36:17 AM UTC+5:30, Scott W Dunning wrote: I just have a simple question. I don't understand why 1%10 = 1? This is not really about python. See http://en.wikipedia.org/wiki/Euclidean_division Particularly the examples section and note that when you divide a by

Re: Python programming

2014-02-11 Thread Rustom Mody
On Wednesday, February 12, 2014 5:51:29 AM UTC+5:30, ngangsia akumbo wrote: Please i have a silly question to ask. How long did it take you to learn how to write programs? What is the best way i can master thinker? I know the syntax but using it to write a program is a problem It

Re: Newcomer Help

2014-02-11 Thread Rustom Mody
On Tuesday, February 11, 2014 10:19:53 PM UTC+5:30, Walter Hughey wrote: This newcomer apologizes for -- this crap came from you -. Firstly, on the behalf of the list, Apologies for uncalled for and unhelpful rudeness I suppose what you mean by top posting is replying to an email

Re: Python programming

2014-02-11 Thread Roy Smith
In article b2db52b0-d7f7-43dd-9ddf-86feb109e...@googlegroups.com, ngangsia akumbo ngang...@gmail.com wrote: Please i have a silly question to ask. How long did it take you to learn how to write programs? I've been working on it for 40 years. I'll let you know when I get there. --

Re: Python programming

2014-02-11 Thread Alan Meyer
On 2/11/2014 7:21 PM, ngangsia akumbo wrote: Please i have a silly question to ask. How long did it take you to learn how to write programs? What is the best way i can master thinker? I know the syntax but using it to write a program is a problem Here's one way to learn: Start with a

Re: Python programming

2014-02-11 Thread Asdrúbal Iván Suárez
2014-02-11 20:24 GMT-04:30 Mark Lawrence breamore...@yahoo.co.uk: To become a master thinker take a degree in philosophy. On the other hand to master tkinter search for a tutorial that you can follow. Or if you're feeling brave help out with tkinter or IDLE issues on the bug tracker at

Re: Python programming

2014-02-11 Thread Asdrúbal Iván Suárez
Hello! Well, I got the knowledge at college, it took me a year to know the basics (But I guess it can take less if you work hard on it). I began with C, then C++ and right now I'm with Python (I use PHP too). That said, there are some interesting resources out there that you can use to learn.

Re: Simple % question

2014-02-11 Thread Scott W Dunning
On Feb 11, 2014, at 6:51 PM, Christopher Welborn cjwelb...@live.com wrote: I think because 1 is evenly divisible by 10 exactly 0 times with a 1 remainder. I mean int(1 / 10) == 0, with a 1 remainder. The same is true for all numbers leading up to 10. Actually I think I get it now. I think I

Re: Simple % question

2014-02-11 Thread Chris Angelico
On Wed, Feb 12, 2014 at 2:30 PM, Scott W Dunning swdunn...@cox.net wrote: On Feb 11, 2014, at 6:36 PM, Chris Angelico ros...@gmail.com wrote: The real question is: What do you expect that symbol to mean? Its actual meaning is quite simple. In long division, dividing one number by another

Re: Python programming

2014-02-11 Thread Ben Finney
ngangsia akumbo ngang...@gmail.com writes: Please i have a silly question to ask. How long did it take you to learn how to write programs? Please clarify what you mean by “how to write programs”. I could write programs perhaps ten minutes after beginning to learn; but learning how to write

Re: Newcomer Help

2014-02-11 Thread Ben Finney
Rustom Mody rustompm...@gmail.com writes: On Tuesday, February 11, 2014 10:19:53 PM UTC+5:30, Walter Hughey wrote: I suppose what you mean by top posting is replying to an email by entering a reply at the top That's right. Top-posting is wasteful of the reader's time while it also omits a

Re: Simple % question

2014-02-11 Thread Scott W Dunning
On Feb 11, 2014, at 6:36 PM, Chris Angelico ros...@gmail.com wrote: The real question is: What do you expect that symbol to mean? Its actual meaning is quite simple. In long division, dividing one number by another looks like this: Yeah I understand what the % means. It just confused me

singleton ... again

2014-02-11 Thread Asaf Las
playing a bit with subject. pros and cons of this approach? did i create bicycle again? :-) class myclass(object): class_instance = None def __new__(cls, *args, **kwargs): if myclass.class_instance == None: return object.__new__(cls) return

Re: Flag control variable

2014-02-11 Thread luke . geelen
Can I make it that if C = int(sys.argv[3]) But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1 -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   >