Re: Lightwight socket IO wrapper

2015-09-20 Thread Cameron Simpson
On 21Sep2015 12:40, Chris Angelico wrote: On Mon, Sep 21, 2015 at 11:55 AM, 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?

Re: Lightwight socket IO wrapper

2015-09-20 Thread Gregory Ewing
Dennis Lee Bieber wrote: worst case: each TCP packet is broken up to fit Hollerith cards; Or printed on strips of paper and tied to pigeons: https://en.wikipedia.org/wiki/IP_over_Avian_Carriers -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Lightwight socket IO wrapper

2015-09-20 Thread Chris Angelico
On Mon, Sep 21, 2015 at 2:39 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Mon, Sep 21, 2015 at 11:55 AM, Cameron Simpson wrote: >>> Another nice thing about TCP is that wil a little effort you get to >>> pack multiple data packets (or partial data packets) into a network >>> packet, etc.

Re: Lightwight socket IO wrapper

2015-09-20 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Sep 21, 2015 at 11:55 AM, Cameron Simpson wrote: >> Another nice thing about TCP is that wil a little effort you get to >> pack multiple data packets (or partial data packets) into a network >> packet, etc. > > Emphatically - a little effort sometimes, and other times n

Re: Postscript to pdf

2015-09-20 Thread Terry Reedy
On 9/20/2015 12:20 PM, Bala Ji wrote: Hello, I'm doing a software to make an id card for a school club so i used TKINTER to make this software. So i can enter details like name, student number etc.. So finally i got a Postscript file the problem is that i want to make a pdf file do you have any

Re: Lightwight socket IO wrapper

2015-09-20 Thread Akira Li
"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 one to read bytes until reaching a certain > delimiter such as newline or zero or space etc. The answer

Re: Fixing Python install on the Mac after running 'CleanMyMac' (fwd)

2015-09-20 Thread kacyjones
On Friday, May 29, 2015 at 12:56:49 PM UTC-7, Laura Creighton wrote: > Good news, we are getting closer to understanding what to do. > This in from Ned. I will continue after the message: > > --- Forwarded Message > > Return-Path: > From: Ned Deily > Subject: Re: Fixing Python install on t

Re: Lightwight socket IO wrapper

2015-09-20 Thread Chris Angelico
On Mon, Sep 21, 2015 at 11:55 AM, 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

Re: Lightwight socket IO wrapper

2015-09-20 Thread Cameron Simpson
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 length encoding, but otherwise...) UDP's neat if

Re: Lightwight socket IO wrapper

2015-09-20 Thread Chris Angelico
On Mon, Sep 21, 2015 at 10:19 AM, Dennis Lee Bieber wrote: > Even if the IP layer has to fragment a UDP packet to meet limits of > the > transport media, it should put them back together on the other end before > passing it up to the UDP layer. To my knowledge, UDP does not have a size >

Re: Postscript to pdf

2015-09-20 Thread Laura Creighton
In a message of Sun, 20 Sep 2015 23:11:20 +0200, Baladjy KICHENASSAMY writes: >well one more question :/ > >i tried this > >def save(): > Canevas.update() > Canevas.postscript(file=tkFileDialog.asksaveasfilename(), >colormode='color') > subprocess.call(["ps2pdf", "-dEPSCrop", "test.ps",

Re: Lightwight socket IO wrapper

2015-09-20 Thread James Harris
"Akira Li" <4kir4...@gmail.com> wrote in message news:mailman.37.1442754893.21674.python-l...@python.org... "James Harris" writes: I guess there have been many attempts to make socket IO easier to handle and a good number of those have been in Python. The trouble with trying to improve someth

Re: error while installing using pip.

2015-09-20 Thread Chris Angelico
On Mon, Sep 21, 2015 at 5:30 AM, OmPs wrote: > It says no matching distribution, but at pypi repo I am able to see it. > > https://pypi.python.org/pypi/atfork/0.1.2 That has a version number of zero. I think that might count as a pre-release version, so you need the --pre option to pip or it won'

Re: error while installing using pip.

2015-09-20 Thread Laura Creighton
There is an atfork patch supplied as part of this issue https://bugs.python.org/issue16500 Maybe it can do what you want? Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: error while installing using pip.

2015-09-20 Thread Mark Lawrence
On 20/09/2015 20:30, OmPs wrote: Hi all, I am getting the below error while I am trying to install atfork package from pip repositories. I have done a thorough google search but am not able to find and appropriate solution for it.Installation of SSL packages and ssl package from python too do no

Re: Postscript to pdf

2015-09-20 Thread Laura Creighton
In a message of Sun, 20 Sep 2015 21:32:34 +0200, Baladjy KICHENASSAMY writes: >o ok i got it >actually it's very easy the commande is : >ps2pdf -dEPSCrop image.ps > >sorry but i'm new to python my last question is how to integrate this >to python... i want that the output file must be a pdf ?

Python 2.7 Configuration

2015-09-20 Thread Ward Kingkade
Hello All, I'm new to Python. I downloaded the 64-bit build of Python 2.7.10 from www.python.org/downloads/release/python-2710. I run Windows 7 Pro on a Dell PC. I find that the installation package creates a folder called "Python 2.7" in my Start menu, with both a command prompt and IDLE GUI o

Re: Postscript to pdf

2015-09-20 Thread Baladjy KICHENASSAMY
Hello, I'm using macosx, ps2pdf version i don't know :/ sorry ok actually i found what is the problem... There is no problem with the ps file every thing is fine =) Can u please just tell me how to change paper settings ? i want to go from portait to landscape ? 2015-09-20 20:12 GMT+02:00

Re: Postscript to pdf

2015-09-20 Thread Baladjy KICHENASSAMY
o ok i got it actually it's very easy the commande is : ps2pdf -dEPSCrop image.ps sorry but i'm new to python my last question is how to integrate this to python... i want that the output file must be a pdf ? 1) i created a button which i'll save my id card as "ps" file def save(): Cane

Re: error while installing using pip.

2015-09-20 Thread Laura Creighton
In a message of Mon, 21 Sep 2015 01:00:01 +0530, OmPs writes: >Hi all, > >I am getting the below error while I am trying to install atfork package >from pip repositories. I have done a thorough google search but am not able >to find and appropriate solution for it.Installation of SSL packages and >

error while installing using pip.

2015-09-20 Thread OmPs
Hi all, I am getting the below error while I am trying to install atfork package from pip repositories. I have done a thorough google search but am not able to find and appropriate solution for it.Installation of SSL packages and ssl package from python too do not solve the mystry. # pip install

Re: Started to work with SQLite3 in Python3

2015-09-20 Thread Cecil Westerhof
On Sunday 20 Sep 2015 17:49 CEST, Cecil Westerhof wrote: > I started a little project in Python3 with SQLite3: > https://github.com/CecilWesterhof/CarApplication > > I do not mind to get some feedback on it. > > I was wondering about two things: > - Would it be better to split the code into severa

Re: Postscript to pdf

2015-09-20 Thread Laura Creighton
In a message of Sun, 20 Sep 2015 20:27:48 +0200, Baladjy KICHENASSAMY writes: >Hello, > >I'm using macosx, ps2pdf version i don't know :/ sorry >ok actually i found what is the problem... > >There is no problem with the ps file every thing is fine =) > >Can u please just tell me how to change p

Re: Started to work with SQLite3 in Python3

2015-09-20 Thread Cecil Westerhof
On Sunday 20 Sep 2015 17:49 CEST, Cecil Westerhof wrote: > I started a little project in Python3 with SQLite3: > https://github.com/CecilWesterhof/CarApplication > > I do not mind to get some feedback on it. I think I found a bug. In init I should put a: conn.commit() after: fill_tables()

Re: Started to work with SQLite3 in Python3

2015-09-20 Thread Cecil Westerhof
On Sunday 20 Sep 2015 18:44 CEST, Chris Angelico wrote: > On Mon, Sep 21, 2015 at 1:49 AM, Cecil Westerhof wrote: >> - I understood that with for fuel in fuel_cursor: a fetchall will >> be executed. At the moment I do not see this as a problem, but if >> the table would become very big it could.

Re: Postscript to pdf

2015-09-20 Thread Laura Creighton
In a message of Sun, 20 Sep 2015 09:50:02 -0700, Bala Ji writes: >Thank u laura, >I tired it but the problem when i use it there is only half of the image >its like the software cut the image >-- >https://mail.python.org/mailman/listinfo/python-list Ok. We need more information. What OS are you

Re: Dummy Decoder Example (was Re: Parallel decoding lesson for you.)

2015-09-20 Thread Skybuck Flying
Or point your newsgroup reader to newsgroup: comp.arch Then see thread/topic: "Parallel decoding lesson for you" by Skybuck. Bye, Skybuck. -- https://mail.python.org/mailman/listinfo/python-list

Re: Postscript to pdf

2015-09-20 Thread Bala Ji
Thank u laura, I tired it but the problem when i use it there is only half of the image its like the software cut the image -- https://mail.python.org/mailman/listinfo/python-list

Re: Started to work with SQLite3 in Python3

2015-09-20 Thread Chris Angelico
On Mon, Sep 21, 2015 at 1:49 AM, Cecil Westerhof wrote: > - I understood that with > for fuel in fuel_cursor: > a fetchall will be executed. > At the moment I do not see this as a problem, but if the table would > become very big it could. Would it be better to rewrite it with a > fetc

Re: Postscript to pdf

2015-09-20 Thread Laura Creighton
In a message of Sun, 20 Sep 2015 09:20:10 -0700, Bala Ji writes: >Hello, > >I'm doing a software to make an id card for a school club so i used TKINTER to >make this software. >So i can enter details like name, student number etc.. > >So finally i got a Postscript file the problem is that i want t

Postscript to pdf

2015-09-20 Thread Bala Ji
Hello, I'm doing a software to make an id card for a school club so i used TKINTER to make this software. So i can enter details like name, student number etc.. So finally i got a Postscript file the problem is that i want to make a pdf file do you have any ideas? "convert ps to pdf" Thank u r

Started to work with SQLite3 in Python3

2015-09-20 Thread Cecil Westerhof
I started a little project in Python3 with SQLite3: https://github.com/CecilWesterhof/CarApplication I do not mind to get some feedback on it. I was wondering about two things: - Would it be better to split the code into several parts. (For example the SQL statements.) - I understood that w

Re: .bat file trouble.

2015-09-20 Thread Ian Kelly
On Fri, Sep 18, 2015 at 7:45 AM, Christian Gollwitzer wrote: > The first error indicates, that you are running Python 3, and the script was > made for Python 2. In Python 3, print is a function so you need parentheses > around that print("Initializing...") - either fix that > or install Python 2.

Re: Dummy Decoder Example (was Re: Parallel decoding lesson for you.)

2015-09-20 Thread Skybuck Flying
Since more people might be interested in this I will re-post this a second time to include more newsgroups... those two threads will need to be followed if all responses are to be seen ;) Here is your dummy decoder example: Let's turn this into a somewhat of a contest and ofcourse also teachin

Re: .bat file trouble.

2015-09-20 Thread eryksun
On 9/18/15, Christian Gollwitzer wrote: > Am 18.09.15 um 11:06 schrieb bobert...@googlemail.com: > >> We originally thought that it was because it was missing the files: >> process_init.py and process_global_variables.py however they are >> right there in the same directory. > > Concerning that, w

Re: ConnectionError handling problem

2015-09-20 Thread Laura Creighton
The discussion about why or why not to use a bare except has gotten us away from the problem reported, which is "why is my script hanging?" In a message of Sat, 19 Sep 2015 17:18:12 +0100, Mark Lawrence writes: >> I am learning python. I wrote a script using requests module. >> The scripts runs fi

Re: ConnectionError handling problem

2015-09-20 Thread Jon Ribbens
On 2015-09-20, Chris Angelico wrote: > On Sun, Sep 20, 2015 at 10:45 PM, Jon Ribbens > wrote: >> On 2015-09-19, Mark Lawrence wrote: >>> On 19/09/2015 07:13, shiva upreti wrote: try: r=requests.post(url, data=query_args) except:

Re: ConnectionError handling problem

2015-09-20 Thread Jon Ribbens
On 2015-09-20, Mark Lawrence wrote: > On 20/09/2015 13:45, Jon Ribbens wrote: >> On 2015-09-19, Mark Lawrence wrote: >>> On 19/09/2015 07:13, shiva upreti wrote: try: r=requests.post(url, data=query_args) except: prin

Re: ConnectionError handling problem

2015-09-20 Thread Chris Angelico
On Sun, Sep 20, 2015 at 10:45 PM, Jon Ribbens wrote: > On 2015-09-19, Mark Lawrence wrote: >> On 19/09/2015 07:13, shiva upreti wrote: >>> try: >>> r=requests.post(url, data=query_args) >>> except: >>> print "Connection error" >>

Re: Lightwight socket IO wrapper

2015-09-20 Thread Akira Li
"James Harris" writes: > I guess there have been many attempts to make socket IO easier to > handle and a good number of those have been in Python. > > The trouble with trying to improve something which is already well > designed (and conciously left as is) is that the so-called improvement > can

Re: ConnectionError handling problem

2015-09-20 Thread Mark Lawrence
On 20/09/2015 13:45, Jon Ribbens wrote: On 2015-09-19, Mark Lawrence wrote: On 19/09/2015 07:13, shiva upreti wrote: try: r=requests.post(url, data=query_args) except: print "Connection error" Never use a bare ex

Re: ConnectionError handling problem

2015-09-20 Thread Jon Ribbens
On 2015-09-19, Mark Lawrence wrote: > On 19/09/2015 07:13, shiva upreti wrote: >> try: >> r=requests.post(url, data=query_args) >> except: >> print "Connection error" > > Never use a bare except in Python, always handle the bare m

Lightwight socket IO wrapper

2015-09-20 Thread James Harris
I guess there have been many attempts to make socket IO easier to handle and a good number of those have been in Python. The trouble with trying to improve something which is already well designed (and conciously left as is) is that the so-called improvement can become much more complex and ov

Re: Ordering dependent test failures

2015-09-20 Thread Peter Otten
paul.anton.let...@gmail.com wrote: > Fascinated by the concept of ordering dependent test failures [0], I've > run the python test suite [1] with 256 different random seeds (took a > little more than 12 hours). The results vary a lot - for instance, the > number of tests reported as OK varies, the

Re: for loop

2015-09-20 Thread shiva upreti
On Sunday, September 20, 2015 at 1:34:32 PM UTC+5:30, paul.ant...@gmail.com wrote: > On Sunday, September 20, 2015 at 9:56:06 AM UTC+2, shiva upreti wrote: > > https://ideone.com/BPflPk > > > > Please tell me why 'print s' statement is being executed inside loop, > > though I put it outside. > >

Re: for loop

2015-09-20 Thread shiva upreti
On Sunday, September 20, 2015 at 1:33:57 PM UTC+5:30, Chris Warrick wrote: > On 20 September 2015 at 09:55, shiva upreti wrote: > > https://ideone.com/BPflPk > > > > Please tell me why 'print s' statement is being executed inside loop, > > though I put it outside. > > Please help. I am new to pyt

Re: for loop

2015-09-20 Thread paul . anton . letnes
On Sunday, September 20, 2015 at 9:56:06 AM UTC+2, shiva upreti wrote: > https://ideone.com/BPflPk > > Please tell me why 'print s' statement is being executed inside loop, though > I put it outside. > Please help. I am new to python. Hi! Welcome to python, the most awesome programming language

Re: for loop

2015-09-20 Thread Chris Warrick
On 20 September 2015 at 09:55, shiva upreti wrote: > https://ideone.com/BPflPk > > Please tell me why 'print s' statement is being executed inside loop, though > I put it outside. > Please help. I am new to python. > -- > https://mail.python.org/mailman/listinfo/python-list You have mixed indent

for loop

2015-09-20 Thread shiva upreti
https://ideone.com/BPflPk Please tell me why 'print s' statement is being executed inside loop, though I put it outside. Please help. I am new to python. -- https://mail.python.org/mailman/listinfo/python-list

Ordering dependent test failures

2015-09-20 Thread paul . anton . letnes
Hi! Fascinated by the concept of ordering dependent test failures [0], I've run the python test suite [1] with 256 different random seeds (took a little more than 12 hours). The results vary a lot - for instance, the number of tests reported as OK varies, the number of skips varies, etc. Since