Re: Postscript to pdf

2015-09-22 Thread Christian Gollwitzer
Am 21.09.15 um 17:20 schrieb Baladjy KICHENASSAMY: Hello, This is my programe : on mac i was able to output ps file but i didn't got the pdf file :/ Maybe ps2pdf is not installed? I think it doesn't come with the Mac. You need to get it via fink, homebrew, macports or an official ghostscript

Re: A little test for you Guys😜

2015-09-22 Thread Christian Gollwitzer
You've got a lot of sensible answers, but let me add to this one: Am 22.09.15 um 20:43 schrieb Python_Teacher: input = { 'foo1': 'bar1', 'chose': 'truc', 'foo2': 'bar2', } output = { 'bar1': 'foo1', 'truc': 'chose', 'bar2': 'foo2' } This one can be done as a dict

Line by Line Debug Python Scripts In GDB

2015-09-22 Thread Jondy Zhao
There is a gdb extension "libpython.py" within Python sources, it could print Python frame, locals/globals variable, Python sources in GDB. But it couldn't set breakpoints in Python scripts directly. Finally, I decided to write a debugger to extend GDB could debug Python scripts line by line, ju

Re: Successfully send sms with python

2015-09-22 Thread Michael Torrie
On 09/22/2015 05:19 AM, Timon Rhynix wrote: > When run it, the "message sent!" is printed but no message is sent/delivered. > Please assist on what I am missing. Thank you Is this "message sent!" from your code or is it a message you get back on the serial port from the gsm modem? Oh nevermind I s

Re: sort help

2015-09-22 Thread Paul Rubin
Larry Martell writes: > def GetObjKey(a): > return a[2] This function is called operator.itemgetter: from operator import itemgetter sorted(a + b + c, key=itemgetter(2)) > So for example, if my initial data was this (I'll only show the fields > involved with the sort

Re: A little test for you Guys😜

2015-09-22 Thread Ray Cote
On Tue, Sep 22, 2015 at 7:32 PM, Mark Lawrence wrote: > >> 2 Lists >> > > Tut, tut, tut. That is not a list, that is a tutple. -- https://mail.python.org/mailman/listinfo/python-list

Re: Lightwight socket IO wrapper

2015-09-22 Thread Gregory Ewing
Random832 wrote: Isn't this technically the same problem as pressing ctrl-d at a terminal - it's not _really_ the end of the input (you can continue reading after), but it sends the program something it will interpret as such? Yes. There's no concept of "closing the connection" with UDP, becau

Re: A little test for you Guys😜

2015-09-22 Thread MRAB
On 2015-09-23 00:32, Mark Lawrence wrote: On 22/09/2015 19:43, Python_Teacher via Python-list wrote: you have 10 minutes😂 Good luck!! 1. What is PEP8 ? It's the one between PEP7 and PEP9. 2. What are the different ways to distribute some python source code ? Write on sheet of paper, fol

Re: Lightwight socket IO wrapper

2015-09-22 Thread Random832
On Tue, Sep 22, 2015, at 15:45, James Harris wrote: > "Dennis Lee Bieber" wrote in message > news:mailman.12.1442794762.28679.python-l...@python.org... > > On Sun, 20 Sep 2015 23:36:30 +0100, "James Harris" > > declaimed the following: > >>Receiving no bytes is taken as indicating the end of the

Re: Successfully send sms with python

2015-09-22 Thread Cameron Simpson
On 22Sep2015 04:19, Timon Rhynix wrote: Hello, I have used pyserial, sms0.4 and other libraries to send sms via huawei E1750 modem. The code runs well and no error is thrown but the text message is not sent/delivered to the number. One of my code is as follows: import serial import time clas

Re: A little test for you Guys😜

2015-09-22 Thread Chris Angelico
On Wed, Sep 23, 2015 at 9:32 AM, Mark Lawrence wrote: >> >> 1. What is the type of g ? >> 2. What is the value of a ? >> 3. What is the value of b ? >> 4. What is the value of c ? > > > How the hell would I know? Basic schooling, Mark, basic schooling. 1. Newton meters squared per kilogram squar

Re: A little test for you Guys😜

2015-09-22 Thread Igor Korot
Hi, On Tue, Sep 22, 2015 at 7:32 PM, Mark Lawrence wrote: > On 22/09/2015 19:43, Python_Teacher via Python-list wrote: > >> you have 10 minutes😂 Good luck!! >> >> >> 1. What is PEP8 ? >> > > It's the one between PEP7 and PEP9. > > >> 2. What are the different ways to distribute some python source

Re: A little test for you Guys😜

2015-09-22 Thread Mark Lawrence
On 22/09/2015 19:43, Python_Teacher via Python-list wrote: you have 10 minutes😂 Good luck!! 1. What is PEP8 ? It's the one between PEP7 and PEP9. 2. What are the different ways to distribute some python source code ? Write on sheet of paper, fold into paper dart, throw from window. 2

Re: Python, convert an integer into an index?

2015-09-22 Thread MRAB
On 2015-09-22 23:21, Laura Creighton wrote: In a message of Tue, 22 Sep 2015 14:43:55 -0700, Chris Roberts writes: (How do I make it into an index? ) Preferably something fairly easy to understand as I am new at this. results = 134523 #(Integer) Desired: results = [1, 2, 3, 4, 5, 2, 3]

Re: Python, convert an integer into an index?

2015-09-22 Thread Mark Lawrence
On 22/09/2015 22:43, Chris Roberts wrote: (How do I make it into an index? ) Preferably something fairly easy to understand as I am new at this. results = 134523 #(Integer) Desired: results = [1, 2, 3, 4, 5, 2, 3] #(INDEX) Somehow I see ways to convert index to list to int, but not bac

Re: sort help

2015-09-22 Thread Chris Angelico
On Wed, Sep 23, 2015 at 9:02 AM, Ian Kelly wrote: > On Tue, Sep 22, 2015 at 4:55 PM, Chris Angelico wrote: >> The Python list.sort() method is guaranteed to be >> stable. I can't find a comparable guarantee for sorted() > > https://docs.python.org/3.5/library/functions.html#sorted Right, sorry.

Re: sort help

2015-09-22 Thread Ian Kelly
On Tue, Sep 22, 2015 at 4:55 PM, Chris Angelico wrote: > The Python list.sort() method is guaranteed to be > stable. I can't find a comparable guarantee for sorted() https://docs.python.org/3.5/library/functions.html#sorted -- https://mail.python.org/mailman/listinfo/python-list

Re: sort help

2015-09-22 Thread Chris Angelico
On Wed, Sep 23, 2015 at 8:42 AM, Larry Martell wrote: > I currently have 3 lists of lists and I sort them based on a common > field into a single list like this: > > def GetObjKey(a): > return a[2] > > sorted(a + b + c, key=GetObjKey) > > Which works just fine. > > But

sort help

2015-09-22 Thread Larry Martell
I currently have 3 lists of lists and I sort them based on a common field into a single list like this: def GetObjKey(a): return a[2] sorted(a + b + c, key=GetObjKey) Which works just fine. But now, I need to have just the first list (a) also sub sorted by another fi

Re: A little test for you Guys😜

2015-09-22 Thread Lj Fc via Python-list
On Tuesday, September 22, 2015 at 11:19:00 PM UTC+2, sohca...@gmail.com wrote: > On Tuesday, September 22, 2015 at 11:45:00 AM UTC-7, Lj Fc wrote: > > you have 10 minutes😂 Good luck!! > > > > > > 1. What is PEP8 ? > > > > 2. What are the different ways to distribute some python source code ? > >

Re: Python, convert an integer into an index?

2015-09-22 Thread Laura Creighton
In a message of Tue, 22 Sep 2015 14:43:55 -0700, Chris Roberts writes: > > >(How do I make it into an index? ) >Preferably something fairly easy to understand as I am new at this. > >results = 134523 #(Integer) > >Desired: >results = [1, 2, 3, 4, 5, 2, 3] #(INDEX) > >Somehow I see ways to

Re: Python, convert an integer into an index?

2015-09-22 Thread Ian Kelly
On Sep 22, 2015 3:46 PM, "Chris Roberts" wrote: > > > (How do I make it into an index? ) > Preferably something fairly easy to understand as I am new at this. > > results = 134523 #(Integer) > > Desired: > results = [1, 2, 3, 4, 5, 2, 3] #(INDEX) > > Somehow I see ways to convert index to l

Python, convert an integer into an index?

2015-09-22 Thread Chris Roberts
(How do I make it into an index? ) Preferably something fairly easy to understand as I am new at this. results = 134523 #(Integer) Desired: results = [1, 2, 3, 4, 5, 2, 3] #(INDEX) Somehow I see ways to convert index to list to int, but not back again. Thanks, crzzy1 -- https://mail

Re: problem building python 3.5 extensions for windows

2015-09-22 Thread cjgohlke
On Tuesday, September 22, 2015 at 1:49:16 PM UTC-7, Terry Reedy wrote: > On 9/22/2015 9:35 AM, Robin Becker wrote: > > On 22/09/2015 11:14, Robin Becker wrote: > >> On 22/09/2015 01:36, CG wrote: > > .t > >>> . > >>> > >> Thanks for the pointer C

Re: A little test for you Guys😜

2015-09-22 Thread James Harris
wrote in message news:5218c7f9-74ea-4ca0-abd1-46a9bcd3d...@googlegroups.com... ... Pretty sure this guy is asking us to do his homework. :-P Maybe (and I hope not) but asking what PEP8 is could be easily found on the internet and asking what the values would be at the end of the program

Re: A little test for you Guys😜

2015-09-22 Thread Ian Kelly
On Tue, Sep 22, 2015 at 3:18 PM, wrote: > On Tuesday, September 22, 2015 at 11:45:00 AM UTC-7, Lj Fc wrote: >> you have 10 minutes😂 Good luck!! > > Pretty sure this guy is asking us to do his homework. :-P Well, looks like it was due 2 hours ago. -- https://mail.python.org/mailman/listinfo/pyt

Re: Lightwight socket IO wrapper

2015-09-22 Thread James Harris
"Marko Rauhamaa" wrote in message news:8737y6cgp6@elektro.pacujo.net... "James Harris" : I agree with what you say. A zero-length UDP datagram should be possible and not indicate end of input but is that guaranteed and portable? The zero-length payload size shouldn't be an issue, but UDP

Re: A little test for you Guys😜

2015-09-22 Thread sohcahtoa82
On Tuesday, September 22, 2015 at 11:45:00 AM UTC-7, Lj Fc wrote: > you have 10 minutes😂 Good luck!! > > > 1. What is PEP8 ? > > 2. What are the different ways to distribute some python source code ? > > 2 Lists > > Let's define the function plural : > > def plural(words): > plurals = []

Re: Lightwight socket IO wrapper

2015-09-22 Thread Marko Rauhamaa
"James Harris" : > I agree with what you say. A zero-length UDP datagram should be > possible and not indicate end of input but is that guaranteed and > portable? The zero-length payload size shouldn't be an issue, but UDP doesn't make any guarantees about delivering the message. Your UDP applica

Re: problem building python 3.5 extensions for windows

2015-09-22 Thread Terry Reedy
On 9/22/2015 9:35 AM, Robin Becker wrote: On 22/09/2015 11:14, Robin Becker wrote: On 22/09/2015 01:36, cjgoh...@gmail.com wrote: .t . Thanks for the pointer Christoph. I certainly didn't let it run for 30 minutes. When I build with 2.7,

Re: A little test for you Guys😜

2015-09-22 Thread James Harris
On Tuesday, September 22, 2015 at 7:45:00 PM UTC+1, Lj Fc wrote: > you have 10 minutes😂 Good luck!! A good set of questions, IMO. Am answering as someone coming back to Python after a few years. > 1. What is PEP8 ? Coding guidelines, I think. > 2. What are the different ways to distribute some

Re: Lightwight socket IO wrapper

2015-09-22 Thread James Harris
"Akira Li" <4kir4...@gmail.com> wrote in message news:mailman.18.1442804862.28679.python-l...@python.org... "James Harris" writes: ... There are a few things and more crop up as time goes on. For example, over TCP it would be helpful to have a function to receive a specific number of bytes or o

Re: Lightwight socket IO wrapper

2015-09-22 Thread James Harris
"Dennis Lee Bieber" wrote in message news:mailman.12.1442794762.28679.python-l...@python.org... On Sun, 20 Sep 2015 23:36:30 +0100, "James Harris" declaimed the following: There are a few things and more crop up as time goes on. For example, over TCP it would be helpful to have a function t

Re: A little test for you Guys😜

2015-09-22 Thread Akira Li
Python_Teacher via Python-list writes: ... > Let's define the function plural : > > def plural(words): > plurals = [] > for word in words: >plurals.append(word + 's') > return plurals > > for word in plural(['cabagge','owl','toy']): > print word plural() should accept a s

Re: A little test for you Guys😜

2015-09-22 Thread Sven R. Kunze
Hmm, why not. :D On 22.09.2015 20:43, Python_Teacher via Python-list wrote: you have 10 minutes😂 Good luck!! 1. What is PEP8 ? A PEP. 2. What are the different ways to distribute some python source code ? unison, rsync, scp, ftp, sftp, samba, http, https, mail, git, 2 Lists Let's

Re: A little test for you Guys😜

2015-09-22 Thread Ian Kelly
On Tue, Sep 22, 2015 at 12:43 PM, Python_Teacher via Python-list wrote: > you have 10 minutes😂 Good luck!! Sorry, I'm more interested in critiquing the questions than answering them. > Let's define the function plural : > > def plural(words): > plurals = [] > for word in words: >

A little test for you Guys😜

2015-09-22 Thread Python_Teacher via Python-list
you have 10 minutes😂 Good luck!! 1. What is PEP8 ? 2. What are the different ways to distribute some python source code ? 2 Lists Let's define the function plural : def plural(words): plurals = [] for word in words: plurals.append(word + 's') return plurals for word in plu

Re: Successfully send sms with python

2015-09-22 Thread mm0fmf via Python-list
On 22/09/2015 12:19, Timon Rhynix wrote: Hello, I have used pyserial, sms0.4 and other libraries to send sms via huawei E1750 modem. The code runs well and no error is thrown but the text message is not sent/delivered to the number. One of my code is as follows: import serial import time clas

Re: problem building python 3.5 extensions for windows

2015-09-22 Thread Robin Becker
On 22/09/2015 11:14, Robin Becker wrote: On 22/09/2015 01:36, cjgoh...@gmail.com wrote: .t . Thanks for the pointer Christoph. I certainly didn't let it run for 30 minutes. When I build with 2.7, 3.3 or 3.4 the whole build including report

Re: Successfully send sms with python

2015-09-22 Thread Pavel S
On Tuesday, September 22, 2015 at 1:20:07 PM UTC+2, Timon Rhynix wrote: > Hello, I have used pyserial, sms0.4 and other libraries to send sms via > huawei E1750 modem. > The code runs well and no error is thrown but the text message is not > sent/delivered to the number. > One of my code is as fo

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-22 Thread Ryan Stuart
On Tue, Sep 22, 2015 at 5:12 PM, Sol T wrote: > I know I can do this per connection, however how can I have it set to > default? Does this need to be compiled into python? > If you need to compile sqlite you might want to look at apsw: https://github.com/rogerbinns/apsw Cheers > > On Tue, Sep

Successfully send sms with python

2015-09-22 Thread Timon Rhynix
Hello, I have used pyserial, sms0.4 and other libraries to send sms via huawei E1750 modem. The code runs well and no error is thrown but the text message is not sent/delivered to the number. One of my code is as follows: import serial import time class TextMessage: def __init__(self, recip

Installing pip and django

2015-09-22 Thread Cai Gengyang
So these are my results when I type these commands into "Terminal" in an attempt to install pip and django --- From the output, it seems that I have successfully installed pip and django CaiGengYangs-MacBook-Pro:~ CaiGengYang$ pip Usage: pip [options] Commands: install

Re: A photo/image/video sharing app in Python

2015-09-22 Thread Cai Gengyang
On Tuesday, September 22, 2015 at 5:48:26 PM UTC+8, Cai Gengyang wrote: > On Tuesday, September 22, 2015 at 2:34:20 PM UTC+8, Chris Angelico wrote: > > On Tue, Sep 22, 2015 at 3:53 PM, Cai Gengyang wrote: > > > A piece of software that would let end users easily create gorgeous > > > real-life, r

Re: problem building python 3.5 extensions for windows

2015-09-22 Thread Robin Becker
On 22/09/2015 01:36, cjgoh...@gmail.com wrote: On Monday, September 21, 2015 at 9:54:51 AM UTC-7, Robin Becker wrote: build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib and ob ject build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-

Re: A photo/image/video sharing app in Python

2015-09-22 Thread Cai Gengyang
On Tuesday, September 22, 2015 at 2:34:20 PM UTC+8, Chris Angelico wrote: > On Tue, Sep 22, 2015 at 3:53 PM, Cai Gengyang wrote: > > A piece of software that would let end users easily create gorgeous > > real-life, real-time cartoons on the web might not exist yet. But if it > > were possible t

Re: Can't Install Python 3.5.0

2015-09-22 Thread Mark Lawrence
On 22/09/2015 08:31, Ian Kelly wrote: On Mon, Sep 21, 2015 at 7:58 AM, Dave Green mailto:dave.combinat...@gmail.com>> wrote: > > Hi > I have just spent the last few hours trying to install Python 3.5 64 bit and 32 bit as I am > trying to install pygame so I can learn Python. However the only

Re: Lightwight socket IO wrapper

2015-09-22 Thread Jorgen Grahn
On Mon, 2015-09-21, Chris Angelico wrote: > On Mon, Sep 21, 2015 at 6:38 PM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> On Mon, Sep 21, 2015 at 5:59 PM, Marko Rauhamaa wrote: You can read a full buffer even if you have a variable-length length encoding. >>> >>> Not sure what you m

Re: Lightwight socket IO wrapper

2015-09-22 Thread Jorgen Grahn
On Mon, 2015-09-21, Cameron Simpson wrote: > On 21Sep2015 10:34, Chris Angelico wrote: >>If you're going to add sequencing and acknowledgements to UDP, >>wouldn't it be easier to use TCP and simply prefix every message with >>a two-byte length? > > Frankly, often yes. That's what I do. (different

Re: Can't Install Python 3.5.0

2015-09-22 Thread Ian Kelly
On Mon, Sep 21, 2015 at 7:58 AM, Dave Green wrote: > > Hi > I have just spent the last few hours trying to install Python 3.5 64 bit and 32 bit as I am > trying to install pygame so I can learn Python. However the only versions that seems to work > are Python-2.7.10 with pygame-1.91.win32-py2.7. >

Re: [ANN] floatrange - a range() for floats

2015-09-22 Thread Loïc Grobol
Heureux de voir que Python résiste encore et toujours au LIMSI! Merci pour ce travail. On 21 September 2015 at 13:15, Laurent Pointal wrote: > Hello, > > I'm please to publish a small utility module allowing to produce float based > range sequences, with I hope a complete range-like interface. B

Re: Postscript to pdf

2015-09-22 Thread Baladjy KICHENASSAMY
Hello, This is my programe : on mac i was able to output ps file but i didn't got the pdf file :/ # -*- coding: utf-8 -*- # script lecture_gif.py from Tkinter import * import tkMessageBox import Tkconstants import tkFileDialog from PIL import ImageTk import PIL.Image import os, sys import subproce

Re: Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default

2015-09-22 Thread Sol T
Hi, I know I can do this per connection, however how can I have it set to default? Does this need to be compiled into python? On Tue, Sep 22, 2015 at 2:04 PM, Ryan Stuart wrote: > On Thu, Sep 17, 2015 at 2:24 PM, sol433tt wrote: > >> I would like to have the Sqlite pragma statement "locking_mo