Re: Checking if email is valid

2023-11-01 Thread De ongekruisigde via Python-list
On 2023-11-01, Mats Wichmann wrote: > On 11/1/23 05:35, Simon Connah via Python-list wrote: >> OK. I've been doing some reading and that you should avoid regex to check >> email addresses. So what I was thinking was something like this: > > To be a little more specific, Avoid Rolling Your Own Reg

Re: Simple webserver

2023-10-20 Thread De ongekruisigde via Python-list
On 2023-10-20, Chris Angelico wrote: > On Fri, 20 Oct 2023 at 22:31, Janis Papanagnou via Python-list > wrote: >> >> On 19.10.2023 01:23, Chris Angelico wrote: >> > >> > Broadly speaking, your ideas are great. Any programming language CAN >> > be used for the server (and I've used several, not jus

Re: WHAT THE ERROR ON MY CODE???

2022-06-28 Thread De ongekruisigde
On 2022-06-28, Chris Angelico wrote: > ‪On Wed, 29 Jun 2022 at 01:37, ‫נתי שטרן‬‎ wrote:‬ >> headers["Authorization"] = "Basic >> YjMwMzcwODY3NTUzNDMwNTg5NzA2MjkyNDFmMDE1YWY6VjNKYTk2Y1F4RTFzeTdYbzRnbkt0a2k1djhscXUyU01oSE5VWUwwRg==" >> > > The error is that you just revealed your credentials to th

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
-06-09 at 03:18:56 +1000, >> > Chris Angelico wrote: >> > >> > > On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote: >> > > > >> > > > On 2022-06-08 at 08:07:40 -, >> > > > De ongekruisigde wro

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, 2qdxy4rzwzuui...@potatochowder.com <2qdxy4rzwzuui...@potatochowder.com> wrote: > On 2022-06-08 at 08:07:40 -0000, > De ongekruisigde wrote: > >> Depending on the problem a regular expression may be the much simpler >> solution. I love them for e.g. te

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, Christian Gollwitzer wrote: > Am 07.06.22 um 23:01 schrieb Christian Gollwitzer: > >>> In [3]: re.sub(r'^\d+\s*', '', s) Out[3]: 'Trinket' >>> > > that RE does match what you intended to do, but not exactly what you > wrote in the OP. that would be '^\d\d.' start with exactly two

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, Dave wrote: > I hate regEx and avoid it whenever possible, I’ve never found something that > was impossible to do without it. I love regular expressions and use them where appropriate. Saves tons of code and is often much more readable than the pages of code required to do the sam

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, dn wrote: > On 08/06/2022 10.18, De ongekruisigde wrote: >> On 2022-06-08, Christian Gollwitzer wrote: >>> Am 07.06.22 um 21:56 schrieb Dave: >>>> It depends on the language I’m using, in Objective C, I’d use isNumeric, >>>> just wante

Re: How to replace characters in a string?

2022-06-08 Thread De ongekruisigde
On 2022-06-08, Dave wrote: > Hi All, > > I decided to start a new thread as this really is a new subject. > > I've got two that appear to be identical, but fail to compare. After getting > the ascii encoding I see that they are indeed different, my question is how > can I replace the \u2019m wit

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
On 2022-06-08, Christian Gollwitzer wrote: > Am 07.06.22 um 21:56 schrieb Dave: >> It depends on the language I’m using, in Objective C, I’d use isNumeric, >> just wanted to know what the equivalent is in Python. >> > > Your problem is also a typical case for regular expressions. You can > crea

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
ileName[0].isdigit() and myCompareFileName[1].isdigit(): > myCompareFileName = myCompareFileName[3:] > > if myCompareFileName != myTitleName: > print('File Name Mismatch - Artist: ',myArtistName,' Album: > ',myAlbumName,' Track:',myTitleName,

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
On 2022-06-07, Stefan Ram wrote: > Dave writes: >>Example: if "05 Trinket" I want "Trinket" > > We're not supposed to write complete solutions, Okay, wasn't aware of this group policy; will keep it in mind. -- You're rewriting parts of Quake in *Python*? MUAHAHAHA -- https://mail.python.

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
On 2022-06-07, Dave wrote: > Hi, > > I’m new to Python and have a simple problem that I can’t seem to find the > answer. > > I want to test the first two characters of a string to check if the are > numeric (00 to 99) and if so remove the fist three chars from the string. > > Example: if “05 Tr

Re: "py" command for Linux and Mac?

2022-05-12 Thread De ongekruisigde
On 2022-05-12, Mats Wichmann wrote: > On 5/12/22 10:25, Dan Stromberg wrote: >> Hi folks. >> >> I heard there's a Windows-like "py" command for Linux (and Mac?). >> >> I'm finally getting to porting a particular project's Python 2.7 code to >> 3.x, and one of the first steps will probably be cha

Re: Questions about XML processing?

2020-11-08 Thread Hernán De Angelis
On 2020-11-07 20:03, Dieter Maurer wrote: Hernán De Angelis wrote at 2020-11-6 21:54 +0100: ... However, the hard thing to do here is to get those only when tagC/note/title/string='value'. I was expecting to find a way of specifying a certain construction in square brackets, lik

Re: Questions about XML processing?

2020-11-07 Thread Hernán De Angelis
t; Regards, > > David > > On Fri, 6 Nov 2020 at 20:57, Hernán De Angelis < > variablestarli...@gmail.com> wrote: > >> Thank you Terry, Dan and Dieter for encouraging me to post here. I have >> already solved the problem albeit with a not so efficient solution. &

Re: Python 3

2020-11-07 Thread Hernán De Angelis
Hi, Wikipedia has an article on the duodecimal system, that includes an explanation of how to convert from decimal and the other way around. https://en.wikipedia.org/wiki/Duodecimal?wprov=sfla1 Peerrhaps it can be easily implemented as a function. Good luck. H. Den lör 7 nov. 2020 07:55Nick

Re: Questions about XML processing?

2020-11-06 Thread Hernán De Angelis
    string.append(element4.text) Crude, but works. As I wrote above, I was wishing that a bracketed clause of the type [@ ...] already in the first "findall" would do a more efficient job but alas my knowledge of xml is too rudimentary. Perhaps something to tinker on in the coming weeks

Questions about XML processing?

2020-11-06 Thread Hernán De Angelis
Hi everyone I am confronting some XML parsing challenges and would like to ask some questions to more knowledgeable Python users. Apparently there exists a group for such questions but that list (xml-sig) has apparently not received (or archived) posts since May 2018(!). I wonder if there are

Re: Post request and encoding

2020-11-03 Thread Hernán De Angelis
I see. Should be "encoding". Thanks. /H. On 2020-11-03 19:30, Dieter Maurer wrote: Hernán De Angelis wrote at 2020-11-2 10:06 +0100: ... My request has the form: header = {'Content-type':'application/xml', 'charset':'utf-8'} Not your probl

Re: Post request and encoding

2020-11-02 Thread Hernán De Angelis
I see, my mistake was (tacitly) assuming that encode() could work in place. Now I see that it should work in a previous line as you wrote. Thank you! /H. On 2020-11-02 18:32, Karsten Hilbert wrote: On Mon, Nov 02, 2020 at 06:21:15PM +0100, Hernán De Angelis wrote: For the record: Just

Re: Post request and encoding

2020-11-02 Thread Hernán De Angelis
) not in a previous separate line as I did. Now it works. This wasn't an obvious way to proceed for me. /H. On 2020-11-02 10:06, Hernán De Angelis wrote: Hi everyone, I am writing a program that sends a post request to a server. The post request may include keywords with Swedish c

Post request and encoding

2020-11-02 Thread Hernán De Angelis
Hi everyone, I am writing a program that sends a post request to a server. The post request may include keywords with Swedish characters (åöä). I noticed that requests that include strings without those characters return a useful expected response. On the other hand, posts including those ch

Re: Decorators with arguments?

2020-05-25 Thread Christopher de Vidal
pters = list() for collection in ['door_status', 'cpu_temp']: adapters.append(bridge(collection)) while True: sleep(1) for adapter in adapters: adapter.unsubscribe() Christopher de Vidal Would you consider yourself a good person? Have you ever taken the 'Good

Decorators with arguments?

2020-05-14 Thread Christopher de Vidal
ad_time): on_snapshot('cpu_temp', col_snapshot, changes, read_time) cpu_temp_col_ref = db.collection('cpu_temp') cpu_temp_col_watch = cpu_temp_col_ref.on_snapshot(cpu_temp_on_snapshot) # End repeated code section # Start repeated code section door_status_col_watch.unsubscri

Fw: Python installation problem

2020-04-01 Thread HERNANDEZ AGUIRRE JOSE GABRIEL DE LA DOLOROSA
En Mar, 31 Marzo, 2020 en 18:48, yo escribió:   Para: python-list@python.org I  installed  the Python software , but I could not find the python.exe file with the Unscramble software What do you advise ? Regards -- https://mail.python.org/mailman/listinfo/python-list

Why an InitVar pseudo field in dataclasses cannot have a default_factory?

2019-07-17 Thread Jacobo de Vera
estriction? I asked in stackoverflow[1] and I was suggested to ask here. [1] https://stackoverflow.com/questions/57056029 Thanks, Jacobo de Vera @jovianjake -- https://mail.python.org/mailman/listinfo/python-list

Re: can not use pycharm

2019-06-14 Thread Informatico de Neurodesarrollo
ur system. -- Ing. Jesús Reyes Piedra Admin Red Neurodesarrollo,Cárdenas La caja decía:"Requiere windows 95 o superior"... Entonces instalé LINUX. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones

Re: Farewell, Python 3.4

2019-05-10 Thread Informatico de Neurodesarrollo
ía:"Requiere windows 95 o superior"... Entonces instalé LINUX. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromis

Re: Might be doing this wrong? (Turtle graphics)

2019-03-21 Thread Informatico de Neurodesarrollo
ado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sl

Re: tkinter

2019-03-20 Thread Informatico de Neurodesarrollo
Conn.close() <---         if output == 0:             return True         else:             return False El 19/03/19 a las 17:55, MRAB escribió: On 2019-03-19 19:46, Informatico de Neurodesarrollo wrote: Thanks for all yours recommendations, finally I was successf

Re: tkinter

2019-03-19 Thread Informatico de Neurodesarrollo
50") root.resizable(width=False, height=False) colorupdate() root.mainloop() Thanks again -- Ing. Jesús Reyes Piedra Admin Red Neurodesarrollo,Cárdenas La caja decía:"Requiere windows 95 o superior"... Entonces instalé LINUX. -- Este mensaje le ha llegado mediante el servicio

Re: tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
Thanks, I was noted it. I have figure out, how can I do that. I keep in touch El 18/03/19 a las 14:09, MRAB escribió: On 2019-03-18 16:00, Informatico de Neurodesarrollo wrote: Hello friends: I am a beginner on programming in python. I want make a simple program that test continuously

Re: tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
.sleep(5) What's next?, I am all eyes El 18/03/19 a las 12:44, Chris Angelico escribió: On Tue, Mar 19, 2019 at 3:33 AM Informatico de Neurodesarrollo wrote: Hello friends: I am a beginner on programming in python. Cool! Then I would recommend making your program as simple as you p

tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
p(5) root.mainloop() Any ideas, will be welcome. T.I.A -- Ing. Jesús Reyes Piedra Admin Red Neurodesarrollo,Cárdenas La caja decía:"Requiere windows 95 o superior"... Entonces instalé LINUX. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infome

Re: subprocess svn checkout password issue

2019-03-15 Thread Martin De Kauwe
On Saturday, 16 March 2019 16:50:23 UTC+11, dieter wrote: > Martin De Kauwe writes: > > > I'm trying to write a script that will make a checkout from a svn repo and > > build the result for the user. However, when I attempt to interface with > > the shell it ask

subprocess svn checkout password issue

2019-03-15 Thread Martin De Kauwe
Hi, I'm trying to write a script that will make a checkout from a svn repo and build the result for the user. However, when I attempt to interface with the shell it asks the user for their filename and I don't know how to capture this with my implementation. user = "XXX578" root="https://trac

Re: ESR "Waning of Python" post

2018-10-12 Thread Vito De Tullio
Chris Angelico wrote: >> Reference counting was likely a bad idea to begin with. > > Then prove CPython wrong by making a fantastically better > implementation that uses some other form of garbage collection. I'm not talking about the "goodness" of the implemetations, but AFAIK jython and ironp

Re: How to upload to Pythonhosted.org

2017-11-30 Thread Irmen de Jong
On 11/30/2017 03:31 AM, Ben Finney wrote: > Irmen de Jong writes: > >> On 11/30/2017 02:06 AM, waylan wrote: >>> So, how do I upload an update to my documentation? >> >> I ran into the same issue. From what I gathered, Pythonhosted.org is >> in the pr

Re: How to upload to Pythonhosted.org

2017-11-29 Thread Irmen de Jong
On 11/30/2017 02:06 AM, waylan wrote: > I've been hosting documentation for many years on pythonhosted.org. However, > I can't seem to upload any updates recently. The homepage at > http://pythonhosted.org states: > >> To upload documentation, go to your package edit page >> (http://pypi.python

Re: Code Snippets

2017-11-01 Thread Irmen de Jong
On 11/01/2017 06:25 PM, Stefan Ram wrote: > import random > ... > random.random() > > Now, the user has to cut the import, paste it to the top > of his code, then go back to the list of snippets, find > the same snippet again, copy the expression, go to his code, > then find the point whe

Re: How to determine lowest version of Python 3 to run?

2017-10-05 Thread Irmen de Jong
On 10/05/2017 04:23 AM, Christopher Reimer wrote: > I'm leaning towards installing the latest minor version of each available > major version, running tox to run the unit tests against each one, and seeing > what blows up. Perhaps you can use the service of Travis (travis-ci.org) to avoid insta

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-28 Thread Irmen de Jong
On 09/28/2017 09:40 AM, Paul Moore wrote: > Are you aware of pipsi? If you do `pipsi install somepackage` it > creates a new virtualenv in ~/.local/.venvs, populates it with > somepackage and its dependencies, and then puts the entry point > scripts for somepackage into ~/.local/bin. It may be a us

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-27 Thread Irmen de Jong
On 09/27/2017 09:50 AM, Paul Moore wrote: >>> What you could do is pip install your binary dependencies into a >>> directory in $TEMP using --target, then add that directory to >>> sys.path. Probably easier than building a full virtualenv. Bundle pip >>> with your app if you can't assume your user

Re: Boolean Expressions

2017-09-26 Thread Irmen de Jong
On 09/27/2017 12:23 AM, Cai Gengyang wrote: > > I'm trying to understand the logic behind AND. I looked up Python logic tables > > False and False gives False > False and True gives False > True and False gives False > True and True gives True. > > So does that mean that the way 'and' works in P

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Irmen de Jong
On 09/26/2017 10:49 PM, Paul Moore wrote: > On 26 September 2017 at 19:47, Irmen de Jong wrote: >> Any thoughts on this? Is it a good idea or something horrible? Has >> someone attempted something like this before perhaps? > > When I've done this, I've bundled my

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Irmen de Jong
On 09/26/2017 09:19 PM, Thomas Jollans wrote: >> - use venv.EnvBuilder() to create a new virtualenv somewhere in the >> user's home directory (~./virtualenvs/mygreatgame ?) > > The appropriate place for this kind of thing, on Linux, would be > $XDG_DATA_HOME, default "~/.local/share/", i.e.: > >

auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Irmen de Jong
Hi, I've been using Python's executable zip application feature to neatly package my little game into a single "executable" file. Here "executable" means the user can simply start it by doubleclicking it, or launching it from a shell prompt. Of course the user already has to have a proper Python in

Re: Fw: Problems Installing Python36

2017-09-22 Thread Irmen de Jong
On 09/22/2017 08:34 PM, Stephan Houben wrote: > I was vaguely tempted to offer the Mingw-w64 (GCC) Python as an > alternative, since it doesn't rely on any optionally-installed Microsoft > DLLs and so avoids this issue. But I suppose that is not really the > newbie-friendly solution the OP was loo

Re: Fw: Problems Installing Python36

2017-09-20 Thread Irmen de Jong
On 14/09/2017 05:46, Michael Torrie wrote: > On 09/12/2017 03:05 AM, Thomas Jollans wrote: >> Other people on this list: >> This isn't the first time I've someone with this issue here. It's >> probably putting off plenty of potential new users who don't make as >> much effort to find a solution. I

v2.0 released of: a Boulder Dash clone with retro graphics and sound

2017-09-10 Thread Irmen de Jong
On 06/09/2017 23:17, Irmen de Jong wrote: > > https://github.com/irmen/bouldercaves > My Boulder Dash clone is now at version 2.0 because a few important things that were lacking are now implemented: * authentic mode: The game is now displayed in a small screen that scrolls smoothly

Re: a Boulder Dash clone with retro graphics and sound

2017-09-06 Thread Irmen de Jong
On 05/09/2017 00:02, Irmen de Jong wrote: https://github.com/irmen/bouldercaves > There's just two things missing I think: > - high score table > - being able to play multiple sounds simultaneously, as the amoeba and > magic wall sounds are lacking at the moment. In version 1.

a Boulder Dash clone with retro graphics and sound

2017-09-04 Thread Irmen de Jong
Hi, Yet another continuation of my graphics experiments with tkinter. In the previous project I've been using tkinter bitmaps to simulate a commodore-64 screen where I exploited the possibility to change the foreground and background color of the bitmap on the fly. This conveniently matches the wa

Re: wrote a commodore-64 emulator using just Python

2017-09-04 Thread Irmen de Jong
On 08/13/2017 03:50 PM, Irmen de Jong wrote: > Hi, > > As another experiment with using just tkinter for graphics, this time I > created a > Commodore-64 emulator. You can find it here https://github.com/irmen/pyc64 [...] > There's also https://github.com/mnaberez/p

Re: tkinter keypress events are a mess for numpad keys

2017-08-29 Thread Irmen de Jong
On 29/08/2017 06:32, Terry Reedy wrote: > *The* documentation (for 8.6) is the tcl.tk/man doc set: > https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm > For the level of detail you are looking at, they are essential. > > The nmt docs for 8.5 are neither complete (intentionally not) nor always > c

tkinter keypress events are a mess for numpad keys

2017-08-28 Thread Irmen de Jong
Hi, Using tkinter in python3, I was trying to intercept individual keypresses (and releases) of keys on the numeric keypad. I want to use this as a simple joystick simulation. While you can bind the event, actually doing something sensible with it in a cross platform way seems utterly impossib

Re: wrote a commodore-64 emulator using just Python

2017-08-14 Thread Irmen de Jong
On 08/13/2017 03:50 PM, Irmen de Jong wrote: > Now, it's not a "true" emulator: obviously it doesn't simulate the C64 on a > hardware > level. It does however implement enough to load and run simple basic programs > that can > show interesting PETSCII pict

wrote a commodore-64 emulator using just Python

2017-08-13 Thread Irmen de Jong
Hi, As another experiment with using just tkinter for graphics, this time I created a Commodore-64 emulator. You can find it here https://github.com/irmen/pyc64 You only need the pillow library to be able to run this. I guess most people have that one already anyway. It works pretty well :) (

Re: SSL/TLS support in Pyro4

2017-08-04 Thread Irmen de Jong
On 04/08/2017 15:44, Robin Becker wrote: > .. >> >> Hi Robin >> >> I am not sure how this is any benefit over the self-signed root certs that I >> now use? >> >> Except for the fact that these are a root cert as well and don't use any CA >> trust chain. >> To be able to validate this cert

Re: SSL/TLS support in Pyro4

2017-08-04 Thread Irmen de Jong
On 03/08/2017 20:30, Irmen de Jong wrote: > Alternatively, is there a cheap way to get an 'official' SSL certificate for > testing > purposes. I don't think letsencrypt can help here because it is only for web > sites? > (and their certs are only valid for a very

Re: SSL/TLS support in Pyro4

2017-08-04 Thread Irmen de Jong
On 04/08/2017 10:26, Robin Becker wrote: > On 03/08/2017 19:30, Irmen de Jong wrote: > . >> >> I wonder if any current (or new) users of Pyro4 want to check this out? The >> biggest >> concern I have is that I only have dummy (self-signed) certificates so I

SSL/TLS support in Pyro4

2017-08-03 Thread Irmen de Jong
' SSL certificate for testing purposes. I don't think letsencrypt can help here because it is only for web sites? (and their certs are only valid for a very short period) Cheers Irmen de Jong -- https://mail.python.org/mailman/listinfo/python-list

Re: Issues with Python

2017-07-30 Thread Irmen de Jong
On 30/07/2017 23:31, Ode Idoko wrote: > Hi, I am new to Python and though I have been able to download the 3.6 > version on my laptop , I still have issues with the syntax. While writing a > program to execute, it will display syntax error with different shades of > color usually green or yellow

Re: zipapp should not include temporary files?

2017-07-28 Thread Irmen de Jong
On 28/07/2017 18:36, Irmen de Jong wrote: > On 27/07/2017 00:03, Paul Moore wrote: >> If you want to create a feature request for a filter function on >> bugs.python.org and assign it to me, I'll take a look at it. \ > > > I will do this, thanks in advance. Should

Re: Installation Python 3.6.x on Windows using command line installer (without GUI)

2017-07-28 Thread Irmen de Jong
On 27/07/2017 20:55, Andreas Jung wrote: > > I need to installed Python 3.6.x on Windows as part of an automated process > without user-interaction. Recently Python releases provided MSI files for > installation using the "msiexec" utility however there are no more MSI > release files available

Re: zipapp should not include temporary files?

2017-07-28 Thread Irmen de Jong
On 27/07/2017 00:03, Paul Moore wrote: > On Wednesday, 26 July 2017 18:37:15 UTC+1, Irmen de Jong wrote: >> What do you think? Should the zipapp module perhaps be improved to >> automatically skip >> obvious temporary files or perhaps allow to provide a filter function? &g

zipapp should not include temporary files?

2017-07-26 Thread Irmen de Jong
Hi, when creating an executable zip file using the zipapp module, it's a little sad to see that no effort is done to filter out obvious temporary files: the resulting zipfile contains any *.pyc/pyo files and other things such as .git, .tox, .tmp folders. The documentation says "zip is created f

Re: JSON encoding PDF or Excel files in Python 2.7

2017-07-21 Thread Irmen de Jong
On 21/07/2017 20:52, Skip Montanaro wrote: > I would like to JSON encode some PDF and Excel files. I can read the content: > > pdf = open("somefile.pdf", "rb").read() > > but now what? json.dumps() insists on treating it as a string to be > interpreted as utf-8, and bytes == str in Python 2.x. I

Re: pythonhosted.org status?

2017-07-03 Thread Irmen de Jong
On 02/07/2017 11:27, breamore...@gmail.com wrote: > On Sunday, July 2, 2017 at 10:03:34 AM UTC+1, Irmen de Jong wrote: >> Hi, >> I'm using pythonhosted.org to host the docs for various projects but it has >> either been >> very slow or unavailable over the past w

pythonhosted.org status?

2017-07-02 Thread Irmen de Jong
Hi, I'm using pythonhosted.org to host the docs for various projects but it has either been very slow or unavailable over the past week. Anyone else having the same problems? Should I perhaps consider putting my docs on readthedocs.org instead? Irmen -- https://mail.python.org/mailman/listinfo/

Re: Progress on the Gilectomy

2017-06-10 Thread Irmen de Jong
On 10-6-2017 14:54, Steve D'Aprano wrote: > Larry Hastings is working on removing the GIL from CPython: > > https://lwn.net/Articles/723949/ Here is Larry's "How's it going" presentation from Pycon 2017 on this subject https://www.youtube.com/watch?v=pLqv11ScGsQ -irmen -- https://mail.python.o

Re: Transitioning from Linux to Windows

2017-06-05 Thread Irmen de Jong
On 3-6-2017 15:44, chitt...@uah.edu wrote: > Ideally, I would like to set up the user on their Windows 7/10 system so that > they can "login" to the ubuntu system (say putty) - change working directory > (to where desired) - run the script (on the ubuntu system) - and scp the file > back to the

Re: Very Slow Disk Writes when Writing Large Data Blocks

2017-06-02 Thread Irmen de Jong
On 2-6-2017 20:14, remmm wrote: > These write speeds are in the range of 18 to 25 MBytes per second for > spinning disks and about 50 Mbytes/sec for SSDs. Keep in mind these numbers > should be more like 120 MBytes/sec for spinning disks and 300 MBytes/sec for > SSDs. You'll only reach thos

Re: Bug or intended behavior?

2017-06-02 Thread Irmen de Jong
On 2-6-2017 19:17, sean.diza...@gmail.com wrote: > Can someone please explain this to me? Thanks in advance! > > ~Sean > > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" fo

adding type hints to one of my projects, things learned

2017-05-24 Thread Irmen de Jong
ably will because it now has them everywhere already, but my other projects have to wait. As this is the first and only time so far that I have used type hints, it is very likely that I made some mistakes or missed a better solution to some of the issues I encountered. Please correct

Re: SSL certificate of a server on Windows

2017-05-23 Thread Irmen de Jong
On 23-5-2017 10:19, COPIN Mathieu. wrote: > Hi, > > I want to get a server certificate from the host-name. > > I know I could do something like : >> call(openssl, s_client, -showcerts, -connect, hostname:port) > > > But the thing is to do it without openssl because I want to run the script on

Re: How to install Python package from source on Windows

2017-05-18 Thread Irmen de Jong
On 18-5-2017 3:30, Dennis Lee Bieber wrote: > Late-comer... I'm pretty sure 1.4, if not 1.3 was the version > documented in the first books I bought on the language... > > And I bought because AmigaOS was listed as a viable candidate (thanks > Irmen) -- within a week I had written an o

Re: Out of memory while reading excel file

2017-05-10 Thread Irmen de Jong
On 10-5-2017 17:12, Mahmood Naderan wrote: > So, I think numpy is unable to manage the memory. That assumption is very likely to be incorrect. >> np.array([[i.value for i in j] for j in p.rows]) I think the problem is in the way you feed your excel data into the numpy array constructor. The co

Re: Install python via MS batch file

2017-05-06 Thread Irmen de Jong
On 6-5-2017 7:14, Mahmood Naderan wrote: > Hello, > I have downloaded python-3.6.1-amd64.exe and it is fine to install it through > GUI. However, I want to write a batch file to install it via command line. > Since the installation process is interactive, it seems that the auto-install > batch f

Re: write arrays to disk

2017-04-16 Thread Irmen de Jong
On 16-4-2017 14:28, jorge.conr...@cptec.inpe.br wrote: > Hi, > > I'm new on Python software. I would like to write on disk arrays in binary or > ascii > format. Can someone please help me? > > Thanks, > > Conrado What kind of data is in the arrays? Who or what will be reading the files? And mo

Re: IOError: [Errno 12] Not enough space

2017-04-12 Thread Irmen de Jong
On 12-4-2017 7:54, LnT wrote: > > Hi Irmen, > > you may please find full log @ https://pastebin.mozilla.org/9018753 I have no idea what I'm looking at. But my initial response was wrong, see the reply by eryk sun; your error has nothing to do with disk space but rather, a lack of system memory

Re: IOError: [Errno 12] Not enough space

2017-04-11 Thread Irmen de Jong
On 11-4-2017 14:30, LnT wrote: > Hi, > > version information > > python 27 Please be more precise, there is no Python 27. (Yeah it is clear you meant 2.7 but still) > java version "1.8.0_111" That should not be relevant > OS -Win 10 , 64Bit , 8GB RAM , 60GB HD 60 GB is not a lot of space for

Re: python and databases

2017-03-14 Thread Irmen de Jong
On 14-3-2017 20:59, Xristos Xristoou wrote: > I have a database in microsoft ACCESS with about 150 records.. if I want to > get some > data from this database using a query in python and i want to store in some > variables in python that will do this ? to avoid the 150 if ...: Using the > stand

Re: Error installing python on Windows

2017-02-24 Thread Irmen de Jong
On 24-2-2017 12:18, Michelle Tan wrote: > Hello all > > I am new to python. > > Trying to install Python and encountered this error message : "The program > can't start because api-ms-win-crt-runtime-I1-1-0.dll is missing from your > computer." > > Tried to repair and reinstall Python however i

Re: Python 3.6 installation doesn't add launcher to PATH

2017-02-24 Thread Irmen de Jong
On 24-2-2017 13:38, ChrisW wrote: > The installation guidelines for Python 3.6 say: > > "Per-user installations of Python do not add the launcher to PATH unless the > option was selected on installation." > (https://docs.python.org/3/using/windows.html#from-the-command-line). > > However, I've

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Irmen de Jong
On 24-2-2017 0:20, Juan C. wrote: > On Thu, Feb 23, 2017 at 7:42 PM, Irmen de Jong wrote: >> >> import os >> os.system("traceroute www.google.com") > > Indeed, that would work, but it isn't a great approach in my opinion > because I would rely o

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Irmen de Jong
On 23-2-2017 22:33, Juan C. wrote: > I need to implement a traceroute inside my script but I can't escalate > privileges. Unix uses UDP for traceroute, but I didn't find any material > regarding UDP traceroute in Python. import os os.system("traceroute www.google.com") -- https://mail.python.

Re: python decorator

2017-02-22 Thread Irmen de Jong
On 22-2-2017 8:39, Argentinian Black ops lll wrote: > Thanks for the quick response...! you saved me a lot of time, thank you! > I don't know if you want/have to use your own custom caching decorator, but are you aware of the lru_cache decorator that's part of the standard library? https://docs

Re: CSV

2017-02-22 Thread Irmen de Jong
On 22-2-2017 18:26, Braxton Alfred wrote: > Why does this not run? It is right out of the CSV file in the Standard Lib. What does "not run" mean. We can't help if you are not telling us the exact error message you're getting (if any) > filename = 'c:\users\user\my documents\Braxton\Excel\perso

Re: WANT: bad code in python (for refactoring example)

2017-02-14 Thread Irmen de Jong
On 14-2-2017 23:44, Makoto Kuwata wrote: > Hi, > > Is there any *just right* python code to refactor? > In other words, I'm finding bad code example in python. > > (background) > I'm teaching Python to some novice programmer, and > want to show refactoring example to them. > > (required) > * not

Re: What library/package to use for parsing XML?

2017-01-30 Thread Irmen de Jong
On 30-1-2017 18:58, Chris Green wrote: > I want to parse some XML data, it's the address book data from the > linux program osmo. The file I want to parse is like this:- > [snip] > > I basically want to be able to extract the data and output in other > formats - e.g. write to a Sqlite3 databas

Re: What are your opinions on .NET Core vs Python?

2017-01-30 Thread Irmen de Jong
On 30-1-2017 21:33, Joseph L. Casale wrote: >> Python still has my heart, but .NET Core tempts me. One great thing of >> coding in C# would be no GIL. > > Seriously, check out the benchmarks at https://github.com/aspnet/benchmarks. Results vary quite a bit there. For instance take the json serial

Re: Cannot import GDAL

2017-01-11 Thread Irmen de Jong
On 11-1-2017 18:31, Falter, Donald [USA] wrote: > I am new to Python and I am trying to utilize GDAL. I installed Python 3.6. > I installed the following: gdal-201-1800-core.msi and > GDAL-2.1.2.win32-py3.4.msi. Those don't match. You'll have to use a MSI built for py3.6, one thinks. Either ins

Re: Work between multiple processes

2017-01-11 Thread Irmen de Jong
On 10-1-2017 23:57, Patrick Zhou wrote: > Hi Irmen, > > I have successfully got it to work with both side as python but so far having > trouble with pyrolite.jar which is downloaded from > https://mvnrepository.com/artifact/net.razorvine/pyrolite/4.4 > > [...] > > which "getDst" works on Ja

Re: Announcement: TLSv1.2 will become mandatory in the future for Python.org Sites

2017-01-10 Thread Irmen de Jong
On 10-1-2017 16:01, Donald Stufft wrote: >> TypeError: the JSON object must be str, not ‘bytes' > Huh, just tested, my original snippet works on Python 3.6 but fails on Python > 3.5. My guess is that is due to an improvement in 3.6 mentioned here: https://docs.python.org/3/whatsnew/3.6.html#jso

Re: Work between multiple processes

2017-01-06 Thread Irmen de Jong
On 4-1-2017 23:14, zxpat...@gmail.com wrote: > Hi everyone, > > I ran into a case that I need to create a work process of an application (Jython so has to call using java.exe) which will collect the data based on what main process indicates. > > (1) I tried multiprocessing package, no luck. Java.e

Re: Work between multiple processes

2017-01-05 Thread Irmen de Jong
On 4-1-2017 23:14, zxpat...@gmail.com wrote: > Hi everyone, > > I ran into a case that I need to create a work process of an application > (Jython so has to call using java.exe) which will collect the data based on > what main process indicates. > > (1) I tried multiprocessing package, no luck

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Irmen de Jong
On 2-1-2017 12:38, Antonio Caminero Garcia wrote: > The thing with the from-the-scratch full featured IDEs (Eclipse, IntelliJ, > Pycharm) > is that they look like a space craft dashboard and that unwarranted resources > consumption and the unnecessary icons. I want my IDE to be minimalistic but

Re: Printing a generator returns "", need to print its values

2016-12-05 Thread Irmen de Jong
On 5-12-2016 19:39, vmaha...@centerpointmedia.com wrote: > On Wednesday, November 16, 2016 at 3:25:39 PM UTC-5, Peter Otten wrote: >> vmaha...@centerpointmedia.com wrote: >> >>> I am running Python2.7, wherein I am running the following price of code: >>> >>> y = m.predict(input_fn=lambda:input_fn(

Re: Result is not Displayed

2016-11-22 Thread Irmen de Jong
On 22-11-2016 9:18, prihantoro2...@gmail.com wrote: > Dear all, > > i am new to Python and have this problem > > = > import nltk > puzzle_letters = nltk.FreqDist('egivrvonl') > obligatory = 'r' > wordlist = nltk.corpus.words.words() > [w for w in wordlist if len(w) >= 6 > and obligatory in w

  1   2   3   4   5   6   7   8   9   10   >