Re: putting JUNK at the end of a [.py] file

2023-02-24 Thread Thomas Passin
On 2/24/2023 12:37 AM, Hen Hanna wrote: On Thursday, February 23, 2023 at 9:17:05 PM UTC-8, Thomas Passin wrote: On 2/23/2023 7:21 PM, Hen Hanna wrote: in a LaTeX file, after the (1st) \end{document} line, i can put any random Junk i want (afterwards) until the end of the file. Is there a

Re: putting JUNK at the end of a [.py] file

2023-02-24 Thread Loris Bennett
Hen Hanna writes: > in a LaTeX file, after the (1st) \end{document} line, > i can put any random Junk i want(afterwards) until the end of the > file. > > > Is there a similar Method for a.py file ? > > Since i know of no such tric

Re: putting JUNK at the end of a [.py] file

2023-02-24 Thread Hen Hanna
On Thursday, February 23, 2023 at 9:17:05 PM UTC-8, Thomas Passin wrote: > On 2/23/2023 7:21 PM, Hen Hanna wrote: > > > > in a LaTeX file, after the (1st) \end{document} line, > > i can put any random Junk i want (afterwards) until the end of the file. > > > &g

Re: putting JUNK at the end of a [.py] file

2023-02-24 Thread Mats Wichmann
On 2/24/23 08:27, Mats Wichmann wrote: Indeed, I work on a project that by convention puts editor instructions at the end of each file (which some might consider junk :-) ), like this: # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth

Re: putting JUNK at the end of a [.py] file

2023-02-24 Thread Mats Wichmann
On 2/23/23 22:16, Thomas Passin wrote: On 2/23/2023 7:21 PM, Hen Hanna wrote: in a LaTeX file,   after the (1st)   \end{document} line,    i can put any random Junk i want    (afterwards)   until the end of the file. Is there a similar Method  for a    .py file ? Since

Re: putting JUNK at the end of a [.py] file

2023-02-23 Thread Thomas Passin
On 2/23/2023 7:21 PM, Hen Hanna wrote: in a LaTeX file, after the (1st) \end{document} line, i can put any random Junk i want(afterwards) until the end of the file. Is there a similar Method for a.py file ? Since i know of no such trick, i sometimes

putting JUNK at the end of a [.py] file

2023-02-23 Thread Hen Hanna
in a LaTeX file, after the (1st) \end{document} line, i can put any random Junk i want(afterwards) until the end of the file. Is there a similar Method for a.py file ? Since i know of no such trick, i sometimes put this (below) at the end of a .py file

Re: Py_TRASHCAN_SAFE_BEGIN/END in C extension?

2021-12-22 Thread Barry Scott
> On 22 Dec 2021, at 08:14, Marco Sulla wrote: > > Yes, it's deprecated, but I need it for Python 3.7, since there was > yet no Py_TRASHCAN_BEGIN / END Hopefully the bug report will makes clear what you have to do in your code to get things working. Barry > > On Tu

Re: Py_TRASHCAN_SAFE_BEGIN/END in C extension?

2021-12-22 Thread Marco Sulla
Yes, it's deprecated, but I need it for Python 3.7, since there was yet no Py_TRASHCAN_BEGIN / END On Tue, 21 Dec 2021 at 23:22, Barry wrote: > > > > On 21 Dec 2021, at 22:08, Marco Sulla wrote: > > In Python 3.7, must Py_TRASHCAN_SAFE_BEGIN - Py_TRASHCAN_SAFE_END be

Re: Py_TRASHCAN_SAFE_BEGIN/END in C extension?

2021-12-21 Thread Barry
> On 21 Dec 2021, at 22:08, Marco Sulla wrote: > > In Python 3.7, must Py_TRASHCAN_SAFE_BEGIN - Py_TRASHCAN_SAFE_END be > used in a C extension? > > I'm asking because in my C extension I use them in the deallocator > without problems, but users signalled me that they segfault in Python > 3.7

Py_TRASHCAN_SAFE_BEGIN/END in C extension?

2021-12-21 Thread Marco Sulla
In Python 3.7, must Py_TRASHCAN_SAFE_BEGIN - Py_TRASHCAN_SAFE_END be used in a C extension? I'm asking because in my C extension I use them in the deallocator without problems, but users signalled me that they segfault in Python 3.7 on Debian 10. I checked and this is true. -- https://mail.python

front end gfx for a redpitaya VNA

2021-10-23 Thread Gene Heskett
Greetings all; I have acquired the linux version of the front end for a redpitaya Vector Network Analyzer. Putting it on an rpi4b running raspbian buster, it gets to line 32 and bails out with this error: pi@rpi4:/media/pi/workspace/vna-linux-tool $ python3 ./vna.py Traceback (most recent

front end gfx for a redpitaya VNA

2021-10-23 Thread Gene Heskett
Greetings all; I have acquired the linux version of the front end for a redpitaya Vector Network Analyzer. Putting it on an rpi4b running raspbian buster, it gets to line 32 and bails out with this error: pi@rpi4:/media/pi/workspace/vna-linux-tool $ python3 ./vna.py Traceback (most recent

Re: Simple question - end a raw string with a single backslash ?

2021-04-24 Thread Peter J. Holzer
On 2020-10-19 06:24:18 -, Mladen Gogala via Python-list wrote: > On Mon, 19 Oct 2020 02:44:25 +, Stefan Ram wrote: > > Mladen Gogala writes: > >>In Perl, there are no classes. > > > > If there are no classes in Perl, then what does > > > > bless REF,CLASSNAME > > > > do? > > bles

Re: Python Mauritius Usergroup - End of Year report 2020

2021-01-03 Thread Alex Kaye
chemy.github.io/> | blog > <https://www.pythonkitchen.com> > github <https://github.com/Abdur-RahmaanJ> > Mauritius > > > On Sun, Jan 3, 2021 at 8:12 AM dn via Python-list > wrote: > > > On 1/3/21 5:01 PM, Abdur-Rahmaan Janhangeer wrote: > > > Greetings li

Re: Python Mauritius Usergroup - End of Year report 2020

2021-01-03 Thread Abdur-Rahmaan Janhangeer
:01 PM, Abdur-Rahmaan Janhangeer wrote: > > Greetings list, > > > > Here's our usergroup's end of year report for 2020: > > Happy reading! > > > > https://www.pymug.com/assets/pymug_end_of_year_2020_v2.pdf > > > Well done @A-R! > -- > R

Re: Python Mauritius Usergroup - End of Year report 2020

2021-01-02 Thread dn via Python-list
On 1/3/21 5:01 PM, Abdur-Rahmaan Janhangeer wrote: > Greetings list, > > Here's our usergroup's end of year report for 2020: > Happy reading! > > https://www.pymug.com/assets/pymug_end_of_year_2020_v2.pdf Well done @A-R! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Python Mauritius Usergroup - End of Year report 2020

2021-01-02 Thread Abdur-Rahmaan Janhangeer
Greetings list, Here's our usergroup's end of year report for 2020: Happy reading! https://www.pymug.com/assets/pymug_end_of_year_2020_v2.pdf Kind Regards, Abdur-Rahmaan Janhangeer about <https://compileralchemy.github.io/> | blog <https://www.pythonkitchen.com> gith

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Eryk Sun
On 10/19/20, Grant Edwards wrote: > On 2020-10-19, Stephen Tucker wrote: > >> For a neatish way to get a string to end with a single backslash, how >> about >>mystr = r"abc\ "[:-1] >> (Note the space at the end of the rough-quoted string.) > >

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Grant Edwards
On 2020-10-19, Stephen Tucker wrote: > For a neatish way to get a string to end with a single backslash, how about >mystr = r"abc\ "[:-1] > (Note the space at the end of the rough-quoted string.) That's the first thing I thought of, though I would probably use a non-

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Stephen Tucker
For a neatish way to get a string to end with a single backslash, how about mystr = r"abc\ "[:-1] (Note the space at the end of the rough-quoted string.) <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&g

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Antoon Pardon
:     >>> a = r'end\'       File "", line 1         a = r'end\'       ^    SyntaxError: EOL while scanning string literal I interpret this as meaning that the \' is actually being interpreted as a literal quote - is that a bug ? r

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Chris Angelico
On Mon, Oct 19, 2020 at 5:26 PM Mladen Gogala via Python-list wrote: > bless \$ref will make the given reference a reference to the class. And > classes is Perl > are called "modules". However, Perl classes are not the classes in the real > sense. There > is no inheritance. You can have a simil

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Mladen Gogala via Python-list
On Mon, 19 Oct 2020 02:44:25 +, Stefan Ram wrote: > Mladen Gogala writes: >>In Perl, there are no classes. > > If there are no classes in Perl, then what does > > bless REF,CLASSNAME > > do? bless \$ref will make the given reference a reference to the class. And classes is Perl are

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Michael Torrie
On 10/18/20 5:37 PM, Mladen Gogala via Python-list wrote: > On Sun, 18 Oct 2020 12:19:18 -0600, Michael Torrie wrote: > >> Python certainly is procedural. A script starts at the top and executes >> through to the bottom and ends, barring any flow control in the middle. >> Like Perl you can use i

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Mladen Gogala via Python-list
On Sun, 18 Oct 2020 12:19:18 -0600, Michael Torrie wrote: > Python certainly is procedural. A script starts at the top and executes > through to the bottom and ends, barring any flow control in the middle. > Like Perl you can use it in many different ways and paradigms including > OO if you desi

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Michael Torrie
On 10/18/20 11:07 AM, Mladen Gogala via Python-list wrote: > The fundamental > difference between the two languages is that Perl is procedural while > Python is a fully OO language. Discussion of Perl vs Python necessarily > devolves into the discussion of procedural vs OO paradigms. Python cert

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Mladen Gogala via Python-list
On Sun, 18 Oct 2020 16:13:16 +0200, Peter J. Holzer wrote: > > Ah, I see, that the sillyness of Perl's grammar-altering modules (which > let you write Perl in Latin (with proper declensions and conjugations, > of course) or Chinese) has found its way to Python > To tell the truth, I only instal

Re: Simple question - end a raw string with a single backslash ?

2020-10-18 Thread Peter J. Holzer
On 2020-10-17 21:03:26 -, Mladen Gogala via Python-list wrote: > On Thu, 15 Oct 2020 21:30:15 +, Stefan Ram wrote: > > Tony Flury writes: > >> >>> a = r'end' + chr(92) > > > > Or maybe, > > > > a = r''' >

Re: Simple question - end a raw string with a single backslash ?

2020-10-17 Thread Mladen Gogala via Python-list
On Thu, 15 Oct 2020 21:30:15 +, Stefan Ram wrote: > Tony Flury writes: >> >>> a = r'end' + chr(92) > > Or maybe, > > a = r''' > end\ > '''[ 1: -1 ] > > ? The first and the last line are messy, but in the

Re: Simple question - end a raw string with a single backslash ?

2020-10-15 Thread Serhiy Storchaka
15.10.20 22:16, Roland Müller via Python-list пише: > I used the triple single quotes as delimiter: > s = r'''a single quote ', a double quote "''' s > > 'a single quote \', a double quote "' It does not help if the string contains both kinds of triple quotes You have to use triple

Re: Simple question - end a raw string with a single backslash ?

2020-10-15 Thread Roland Müller via Python-list
:     >>> a = r'end\'       File "", line 1         a = r'end\'       ^    SyntaxError: EOL while scanning string literal I interpret this as meaning that the \' is actually being interpreted as a literal quote - is that a bug ? r

Re: Simple question - end a raw string with a single backslash ?

2020-10-13 Thread Serhiy Storchaka
7;end\' >       File "", line 1 >         a = r'end\' >       ^ >    SyntaxError: EOL while scanning string literal > > I interpret this as meaning that the \' is actually being interpreted as > a literal quote - is that a bug ? r

Re: Simple question - end a raw string with a single backslash ?

2020-10-13 Thread Eryk Sun
On 10/13/20, Tony Flury via Python-list wrote: > I am trying to write a simple expression to build a raw string that ends > in a single backslash. My understanding is that a raw string should > ignore attempts at escaping characters but I get this : > > >>> a = r'end\' >File "", line

Simple question - end a raw string with a single backslash ?

2020-10-13 Thread Tony Flury via Python-list
x27;   ^ SyntaxError: EOL while scanning string literal I interpret this as meaning that the \' is actually being interpreted as a literal quote - is that a bug ? If I try to escaped the backslash I get a different problem: >>> a = r'end\\' &

Re: From an existing Pandas DataFrame, how can I create a summary DataFrame based on the union of overlapping date ranges (given a start and an end date) and an additional column?

2020-06-09 Thread joseph pareti
i gave it a shot, see attached Am Mi., 3. Juni 2020 um 23:38 Uhr schrieb Aaron : > Hello, > > Given a dateframe with trips made by employees of different companies, I am > trying to generate a new dataframe with only the company names. I am > looking to combine the overlapping travel times from

From an existing Pandas DataFrame, how can I create a summary DataFrame based on the union of overlapping date ranges (given a start and an end date) and an additional column?

2020-06-03 Thread Aaron
Hello, Given a dateframe with trips made by employees of different companies, I am trying to generate a new dataframe with only the company names. I am looking to combine the overlapping travel times from employees of the SAME company into a single row. If there are no overlapping travel times,

[RELEASE] Python 2.7.18, the end of an era

2020-04-20 Thread Benjamin Peterson
I'm eudaemonic to announce the immediate availability of Python 2.7.18. Python 2.7.18 is a special release. I refer, of course, to the fact that "2.7.18" is the closest any Python version number will ever approximate e, Euler's number. Simply exquisite! A less transcendent property of Python 2.

Mauritius UG (pymug) 2019 End of Year Report

2020-02-04 Thread Abdur-Rahmaan Janhangeer
Greetings list, Today our User Group published it's first ever end-of-year report: https://www.pymug.com/assets/pymug_2019_report.pdf Feel free to ask me anything! Yours, Abdur-Rahmaan Janhangeer pythonmembers.club <http://www.pythonmembers.club/> | github <https://github.com/

Re: Front end

2020-01-01 Thread James Lu
ow to put it in usable format. I hope you understand what i mean. > > Ex: Input. > > Quote Nr: > > Client: > > Product: > > Then there will be costs and in the end a cost per product. > > In the end a save button to save quote with input from line 1 and 2. >

Re: Front end

2019-12-28 Thread Terry Reedy
do it. Have already build the program but don't know how to put it in usable format. I hope you understand what i mean. Ex: Input. Quote Nr: Client: Product: Then there will be costs and in the end a cost per product. In the end a save button to save quote with input from line 1 and 2.

Front end

2019-12-28 Thread L A Smit
don't know how to put it in usable format. I hope you understand what i mean. Ex: Input. Quote Nr: Client: Product: Then there will be costs and in the end a cost per product. In the end a save button to save quote with input from line 1 and 2. Then the template is ready for next

Re: Lists And Extra Commas at end

2019-12-24 Thread Cameron Simpson
On 25Dec2019 01:20, mail.python@marco.sulla.e4ward.com wrote: About the extra comma, it's da**ed useful: [...] The real problem is this one: a = 1, Unreadable and prone to subtle errors, because maybe you added the comma by mistake. Caution: Debugging Nightmares. Hoo, yes. Only the ot

Re: Lists And Extra Commas at end

2019-12-24 Thread Marco Sulla via Python-list
27;m not really interested). Anyway. About the extra comma, it's da**ed useful: a = ( 42, 1981, 8, 19, 23, ) If I have to comment out the last line, I can, **without having to remove the comma before**. And if I have to add another number at the end, I have not to rememb

Re: Lists And Extra Commas at end

2019-12-24 Thread Chris Angelico
l entry with no trailing comma that is > something harmless that can be left in position and the same for the first > entry. Then my adding/deleting/editing of fields happens in the middle where > I always have a terminal comma. IOW you recreate the same feature by having a meaningless

RE: Lists And Extra Commas at end

2019-12-24 Thread Avi Gross via Python-list
convenience is in some sense removing a mathematical symmetry, but so what? -Original Message- From: Cameron Simpson Sent: Tuesday, December 24, 2019 5:12 PM To: Avi Gross Cc: python-list@python.org Subject: Re: Lists And Extra Commas at end On 24Dec2019 16:48, Avi Gross wrote: >

Re: Lists And Extra Commas at end

2019-12-24 Thread Marco Sulla via Python-list
;, and suggested a warning for implicit concatenation between adjacent strings. I don't really know why you renamed it "Lists And Extra Commas at end". Have you read the thread and my post? Cheers. -- https://mail.python.org/mailman/listinfo/python-list

Re: Lists And Extra Commas at end

2019-12-24 Thread Cameron Simpson
On 24Dec2019 16:48, Avi Gross wrote: Let me switch gears to the terminal comma situation. Unlike many languages, Python decided a dangling comma is perfectly allowable in many situations, perhaps all. a=[1,2,3,] a [1, 2, 3] [...] And, of course, you can use the same dangling comma in makin

Lists And Extra Commas at end

2019-12-24 Thread Avi Gross via Python-list
perfectly allowable in many situations, perhaps all. >>> a=[1,2,3,] >>> a [1, 2, 3] The above does not work for an empty comma at the beginning or middle or a double comma at the end. It is clear why they allowed this as it makes some things easier like building up a list in a lo

JOB | Front End Architect (London, UK)

2019-09-23 Thread James Tobin
Hello, I'm working with an employer that is looking to hire a permanent front end architect to join their London office. You should have experience with Javascript and frameworks such as (but not only) React. Consequently, I had hoped that some members of this mailing list may like to di

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-03 Thread zljubisic
Yes it is. Thanks. > A slightly better solution would be: > > cnv_sel = re.sub(r":(\w+)", r"${\1}", sel) -- https://mail.python.org/mailman/listinfo/python-list

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread Cameron Simpson
On 02Oct2018 06:04, zljubi...@gmail.com wrote: I have to execute the same sql in two different programs. Each of them marks parameters differently. Then you are MUCH better off assembling the SQL using come kind of query constructor, which correctly inserts parameter placeholders is the corre

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread MRAB
On 2018-10-02 14:04, zljubi...@gmail.com wrote: I have to execute the same sql in two different programs. Each of them marks parameters differently. Anyway, I have found the solution. cnv_sel = re.sub(r"(:(.+?)\b)", r"${\2}", sel) A slightly better solution would be: cnv_sel = re.sub(r":(\w+

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread zljubisic
I have to execute the same sql in two different programs. Each of them marks parameters differently. Anyway, I have found the solution. cnv_sel = re.sub(r"(:(.+?)\b)", r"${\2}", sel) Reagards. -- https://mail.python.org/mailman/listinfo/python-list

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread Chris Angelico
On Tue, Oct 2, 2018 at 10:36 PM wrote: > > Hi, > > if I have a string: > > sql = """ > where 1 = 1 > and field = :value > and field2 in (:list) > """ > > I would like to replace every word that starts with ":" in t

Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread zljubisic
Hi, if I have a string: sql = """ where 1 = 1 and field = :value and field2 in (:list) """ I would like to replace every word that starts with ":" in the following way: 1. replace ":" with "${" 2. at the end of the word add &q

Python back-end architecture for android application

2018-07-26 Thread praveenkumar beedanal
Hello all, I am new to python language. I am planning to create android application, whose back end will be Python. The work of the android application is to visualize the co2 emission information and production quantity of the each resource plants. I have confusion regarding the back end

Re: semicolon at end of python's statements

2018-04-03 Thread Tobiah
On 04/03/2018 09:48 AM, kar...@gmail.com wrote: Semicolon is optional. If you put a semicolon at the end of the of a statement, you can keep writing statements. a=3;b=2 PyCharm still complains about two statements on one line and sites Pep 8. I never used to pay much attention to Pep 8

Re: semicolon at end of python's statements

2018-04-03 Thread karuse
Semicolon is optional. If you put a semicolon at the end of the of a statement, you can keep writing statements. a=3;b=2 -- https://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2018-04-03 Thread Tobiah
On 04/01/2018 11:31 PM, dlt.joaq...@gmail.com wrote: El miércoles, 28 de agosto de 2013, 21:18:26 (UTC-3), Mohsen Pahlevanzadeh escribió: Dear all, I'm C++ programmer and unfortunately put semicolon at end of my statements in python. Quesion: What's really defferences betwe

Re: semicolon at end of python's statements

2018-04-01 Thread dlt . joaquin
El miércoles, 28 de agosto de 2013, 21:18:26 (UTC-3), Mohsen Pahlevanzadeh escribió: > Dear all, > > I'm C++ programmer and unfortunately put semicolon at end of my > statements in python. > > Quesion: > What's really defferences between putting semicolon and

Re: Report on non-breaking spaces in posts (was: How to join elements at the beginning and end of the list)

2017-10-31 Thread Jon Ribbens
On 2017-10-31, Stefan Ram wrote: > Ned Batchelder writes: >>     def wrapped_join(values, sep): > > Ok, here's a report on me seing non-breaking spaces in > posts in this NG. I have written this report so that you > can see that it's not my newsreader that is converting > something, b

Re: How to join elements at the beginning and end of the list

2017-10-31 Thread Steve D'Aprano
On Wed, 1 Nov 2017 02:29 am, Neil Cerutti wrote: > You can use the % operator instead of +, and a generator > expression instead of map. It's a pretty small improvement, > though. > > values = '||%s||' % ('||'.join(str(s) for s in value_list)) > > At least... I THINK you can use that generator e

Re: How to join elements at the beginning and end of the list

2017-10-31 Thread Ned Batchelder
On 10/31/17 12:29 PM, Stefan Ram wrote: Ned Batchelder writes: However you solve it, do yourself a favor and write a function to encapsulate it: It is always a good solution to encapsulate a pattern into a function. So I agree that this is a good suggestion. But just for the sole sake

Re: How to join elements at the beginning and end of the list

2017-10-31 Thread Neil Cerutti
On 2017-10-31, Stefan Ram wrote: > Neil Cerutti writes: >>You can use the % operator instead of +, and a generator >>expression instead of map. It's a pretty small improvement, >>though. > > "Improvement" in what sense? > > C:\>python -m timeit -s "value_list = [1, 2, 3, 4, 56, 's']" "values =

Re: How to join elements at the beginning and end of the list

2017-10-31 Thread Ned Batchelder
On 10/31/17 11:29 AM, Neil Cerutti wrote: On 2017-10-31, Ganesh Pal wrote: Here is my solution values = '||' + '||'.join(map(str, value_list)) + '||' values '||1||2||3||4||56||s||' I am joining the elements at the beginning and end of the list using

Re: How to join elements at the beginning and end of the list

2017-10-31 Thread Neil Cerutti
On 2017-10-31, Ganesh Pal wrote: > Here is my solution > >>>> values = '||' + '||'.join(map(str, value_list)) + '||' >>>> values > > '||1||2||3||4||56||s||' > > I am joining the elements at the beginning and end

How to join elements at the beginning and end of the list

2017-10-31 Thread Ganesh Pal
How to join each elements with a delimiter at (1) beginning and end of the list and (2) connecting all elements of the list Example : >>> value_list = [1, 2, 3, 4, 56, 's'] I want this to be converted in this from '||1||2||3||4||56||s||' Here is my solution

Python 3.3.7rc1 now available prior to Python 3.3 end-of-life

2017-09-06 Thread Ned Deily
On behalf of the Python development community and the Python 3.3 release teams, I would like to announce the availability of Python 3.3.7rc1, the release candidate of Python 3.3.7. It is a security-fix source-only release. Python 3.3.0 was released 5 years ago on 2012-09-29 and has been in sec

Re: pyserial and end-of-line specification

2017-07-21 Thread FS
Thanks Rob. Yes I ended up with a read(1) and use a field count and a few other checks to make sure I don't get a partial record. Serial is the "best of times and worst of times". Sure beats dealing with USB enumeration, power hungry ethernet processors and a lot of other stuff. I can still "s

Re: pyserial and end-of-line specification

2017-07-19 Thread Rob Gaddi
On 07/18/2017 12:53 PM, FS wrote: Thank you for your response Andre. I had tried some code like that in the document but it did not seem to work. However ever leaving my terminal for a time the code eventually wrote out the records so apparently there is some very deep buffering going on here.

Re: pyserial and end-of-line specification

2017-07-18 Thread FS
Thank you for your response Andre. I had tried some code like that in the document but it did not seem to work. However ever leaving my terminal for a time the code eventually wrote out the records so apparently there is some very deep buffering going on here. A little more searching on the web

Re: pyserial and end-of-line specification

2017-07-15 Thread Andre Müller
Just take a look into the documentation: https://docs.python.org/3/library/io.html#io.TextIOWrapper And in the example of Pyserial: http://pyserial.readthedocs.io/en/latest/shortintro.html#eol I think it shold be: sio = io.TextIOWrapper(io.BufferedRWPair(ser, ser), newline='yourline_ending') But

pyserial and end-of-line specification

2017-07-14 Thread F S
) record separators and also a 0x03 and 0x02 (stx,etx) framing so I need to change the EOL (end of line) specfier in order to get the pyserial readline to so this. I read the doc page for pyserial and they allude to using TextIOWrapper: to accomplish this however the example is very unclear and I could

Re: end=

2017-02-23 Thread Chris Angelico
On Fri, Feb 24, 2017 at 12:23 AM, wrote: > Using python at home as oppose to using it at school and getting a syntax > error for the line end= but this has worked previously at school. I think the > version I've got at home is newer than the one at school - should this affect &g

end=

2017-02-23 Thread peterreavey32
Using python at home as oppose to using it at school and getting a syntax error for the line end= but this has worked previously at school. I think the version I've got at home is newer than the one at school - should this affect it? -- https://mail.python.org/mailman/listinfo/python-list

Re: Appending an asterisk to the end of each line

2016-07-05 Thread cs
On 05Jul2016 21:37, Python List wrote: On 07/05/2016 03:05 PM, Seymore4Head wrote: import os f_in = open('win.txt', 'r') f_out = open('win_new.txt', 'w') for line in f_in.read().splitlines(): f_out.write(line + " *\n") f_in.close() f_out.close() os.rename('win.txt', 'win_old.txt') os.re

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Larry Hudson via Python-list
On 07/05/2016 03:05 PM, Seymore4Head wrote: import os f_in = open('win.txt', 'r') f_out = open('win_new.txt', 'w') for line in f_in.read().splitlines(): f_out.write(line + " *\n") f_in.close() f_out.close() os.rename('win.txt', 'win_old.txt') os.rename('win_new.txt', 'win.txt') I just

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Steven D'Aprano
On Wed, 6 Jul 2016 10:05 am, Seymore4Head wrote: > On Wed, 6 Jul 2016 01:05:12 +0100, MRAB > wrote: >>That suggests to me that it's an encoding problem (the traceback >>would've indicated that). >> >>Specify an encoding when you open the files: >> >>f_in = open('win.txt', 'r', encoding='utf-8')

Re: Appending an asterisk to the end of each line

2016-07-05 Thread MRAB
On 2016-07-06 01:05, Seymore4Head wrote: On Wed, 6 Jul 2016 01:05:12 +0100, MRAB wrote: On 2016-07-06 00:45, Seymore4Head wrote: On Tue, 05 Jul 2016 19:29:21 -0400, Seymore4Head wrote: On Tue, 5 Jul 2016 19:15:23 -0400, Joel Goldstick wrote: On Tue, Jul 5, 2016 at 7:03 PM, MRAB wrote:

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
On Wed, 6 Jul 2016 01:05:12 +0100, MRAB wrote: >On 2016-07-06 00:45, Seymore4Head wrote: >> On Tue, 05 Jul 2016 19:29:21 -0400, Seymore4Head >> wrote: >> >>>On Tue, 5 Jul 2016 19:15:23 -0400, Joel Goldstick >>> wrote: >>> On Tue, Jul 5, 2016 at 7:03 PM, MRAB wrote: > On 2016-07-05 23:05

Re: Appending an asterisk to the end of each line

2016-07-05 Thread MRAB
On 2016-07-06 00:45, Seymore4Head wrote: On Tue, 05 Jul 2016 19:29:21 -0400, Seymore4Head wrote: On Tue, 5 Jul 2016 19:15:23 -0400, Joel Goldstick wrote: On Tue, Jul 5, 2016 at 7:03 PM, MRAB wrote: On 2016-07-05 23:05, Seymore4Head wrote: import os f_in = open('win.txt', 'r') f_out = o

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
On Wed, 6 Jul 2016 09:38:47 +1000, Chris Angelico wrote: >On Wed, Jul 6, 2016 at 9:04 AM, Seymore4Head > wrote: >> I am using XP and launching the program from another drive/folder than >> the boot drive. >> >> The program has .py extension and the icon shows it is associated with >> Python. >> >

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
On Tue, 05 Jul 2016 19:29:21 -0400, Seymore4Head wrote: >On Tue, 5 Jul 2016 19:15:23 -0400, Joel Goldstick > wrote: > >>On Tue, Jul 5, 2016 at 7:03 PM, MRAB wrote: >>> On 2016-07-05 23:05, Seymore4Head wrote: import os f_in = open('win.txt', 'r') f_out = open('win_new.tx

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
On Tue, 5 Jul 2016 19:15:23 -0400, Joel Goldstick wrote: >On Tue, Jul 5, 2016 at 7:03 PM, MRAB wrote: >> On 2016-07-05 23:05, Seymore4Head wrote: >>> >>> import os >>> >>> f_in = open('win.txt', 'r') >>> f_out = open('win_new.txt', 'w') >>> >>> for line in f_in.read().splitlines(): >>> f_out

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Chris Angelico
On Wed, Jul 6, 2016 at 9:04 AM, Seymore4Head wrote: > I am using XP and launching the program from another drive/folder than > the boot drive. > > The program has .py extension and the icon shows it is associated with > Python. > > I tried "start run" and then typed python and it did show the dos

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
On Wed, 6 Jul 2016 00:03:29 +0100, MRAB wrote: >On 2016-07-05 23:05, Seymore4Head wrote: >> import os >> >> f_in = open('win.txt', 'r') >> f_out = open('win_new.txt', 'w') >> >> for line in f_in.read().splitlines(): >> f_out.write(line + " *\n") >> >> f_in.close() >> f_out.close() >> >> os.re

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Joel Goldstick
On Tue, Jul 5, 2016 at 7:03 PM, MRAB wrote: > On 2016-07-05 23:05, Seymore4Head wrote: >> >> import os >> >> f_in = open('win.txt', 'r') >> f_out = open('win_new.txt', 'w') >> >> for line in f_in.read().splitlines(): >> f_out.write(line + " *\n") >> >> f_in.close() >> f_out.close() >> >> os.re

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
On Tue, 5 Jul 2016 18:40:51 -0400, Joel Goldstick wrote: >On Tue, Jul 5, 2016 at 6:29 PM, Seymore4Head > wrote: >> On Tue, 5 Jul 2016 18:27:25 -0400, Joel Goldstick >> wrote: >> >>>On Tue, Jul 5, 2016 at 6:05 PM, Seymore4Head >>> wrote: import os f_in = open('win.txt', 'r') f

Re: Appending an asterisk to the end of each line

2016-07-05 Thread MRAB
On 2016-07-05 23:05, Seymore4Head wrote: import os f_in = open('win.txt', 'r') f_out = open('win_new.txt', 'w') for line in f_in.read().splitlines(): f_out.write(line + " *\n") f_in.close() f_out.close() os.rename('win.txt', 'win_old.txt') os.rename('win_new.txt', 'win.txt') I just trie

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Joel Goldstick
On Tue, Jul 5, 2016 at 6:29 PM, Seymore4Head wrote: > On Tue, 5 Jul 2016 18:27:25 -0400, Joel Goldstick > wrote: > >>On Tue, Jul 5, 2016 at 6:05 PM, Seymore4Head >> wrote: >>> import os >>> >>> f_in = open('win.txt', 'r') >>> f_out = open('win_new.txt', 'w') >>> >>> for line in f_in.read().splitl

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
On Tue, 5 Jul 2016 18:27:25 -0400, Joel Goldstick wrote: >On Tue, Jul 5, 2016 at 6:05 PM, Seymore4Head > wrote: >> import os >> >> f_in = open('win.txt', 'r') >> f_out = open('win_new.txt', 'w') >> >> for line in f_in.read().splitlines(): >> f_out.write(line + " *\n") >> >> f_in.close() >> f_

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Joel Goldstick
On Tue, Jul 5, 2016 at 6:05 PM, Seymore4Head wrote: > import os > > f_in = open('win.txt', 'r') > f_out = open('win_new.txt', 'w') > > for line in f_in.read().splitlines(): > f_out.write(line + " *\n") > > f_in.close() > f_out.close() > > os.rename('win.txt', 'win_old.txt') > os.rename('win_ne

Appending an asterisk to the end of each line

2016-07-05 Thread Seymore4Head
import os f_in = open('win.txt', 'r') f_out = open('win_new.txt', 'w') for line in f_in.read().splitlines(): f_out.write(line + " *\n") f_in.close() f_out.close() os.rename('win.txt', 'win_old.txt') os.rename('win_new.txt', 'win.txt') I just tried to reuse this program that was posted se

ANN: zerodb Google Hangout on March 22nd. End-to-end DB encryption

2016-03-19 Thread MacLane & Michael
The ZeroDB team will be hosting an OpenSource Community Google Hangout on March 22, 2016 ZeroDB: An end-to-end encrypted database based on ZODB & written in Python. == 1) Introduction to ZeroDB Founders & Developer comm

Re: Obscuring Python source from end users

2014-10-02 Thread Chris Angelico
On Thu, Oct 2, 2014 at 5:50 PM, Johannes Bauer wrote: > On 29.09.2014 16:53, Sturla Molden wrote: >> Chris Angelico wrote: >> I have a project that involves distributing Python code to users in an organisation. Users do not interact directly with the Python code; they only know thi

Re: Obscuring Python source from end users

2014-10-02 Thread Johannes Bauer
On 29.09.2014 16:53, Sturla Molden wrote: > Chris Angelico wrote: > >>> I have a project that involves distributing Python code to users in an >>> organisation. Users do not interact directly with the Python code; they >>> only know this project as an Excel add-in. >>> >>> Now, internal audit tak

Re: Obscuring Python source from end users

2014-10-02 Thread Steven D'Aprano
Marko Rauhamaa wrote: > Dan Stromberg : > >> On Mon, Sep 29, 2014 at 4:47 AM, Steven D'Aprano >>> Yes. Distribute the pyc files only. >> >> Yes, this is the way it's usually done. > > Has the .pyc file format stabilized? A decade ago, my employer shipped > an application as .pyc files but had to

Re: Obscuring Python source from end users

2014-10-02 Thread Terry Reedy
On 10/2/2014 1:17 AM, Marko Rauhamaa wrote: Dan Stromberg : On Mon, Sep 29, 2014 at 4:47 AM, Steven D'Aprano Yes. Distribute the pyc files only. Yes, this is the way it's usually done. Has the .pyc file format stabilized? No. The cache files are binary specific and are so labelled. x.py

Re: Obscuring Python source from end users

2014-10-01 Thread Marko Rauhamaa
Dan Stromberg : > On Mon, Sep 29, 2014 at 4:47 AM, Steven D'Aprano >> Yes. Distribute the pyc files only. > > Yes, this is the way it's usually done. Has the .pyc file format stabilized? A decade ago, my employer shipped an application as .pyc files but had to ship the matching CPython binary wit

  1   2   3   4   5   6   7   8   9   10   >