Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-06-01 Thread Mike Dewhirst
On 24/05/2023 6:00 pm, Mike Dewhirst wrote: On 23/05/2023 7:16 pm, Chris Green wrote: Mike Dewhirst wrote: [-- multipart/mixed, encoding 7bit, 22 lines --] [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] On 21/05/2023 5:53 am, Chris Green wrote: I'm converting a bash scri

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-24 Thread Mike Dewhirst
On 23/05/2023 7:16 pm, Chris Green wrote: Mike Dewhirst wrote: [-- multipart/mixed, encoding 7bit, 22 lines --] [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] On 21/05/2023 5:53 am, Chris Green wrote: I'm converting a bash script to python as it has become rather clumsy i

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-23 Thread Alex Pinkney
On Tue, 23 May 2023, 17:25 Chris Green, wrote: > Mike Dewhirst wrote: > > [-- multipart/mixed, encoding 7bit, 22 lines --] > > > > [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] > > > > On 21/05/2023 5:53 am, Chris Green wrote: > > > I'm converting a bash script to python as i

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-23 Thread Chris Green
Mike Dewhirst wrote: > [-- multipart/mixed, encoding 7bit, 22 lines --] > > [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] > > On 21/05/2023 5:53 am, Chris Green wrote: > > I'm converting a bash script to python as it has become rather clumsy > > in bash. > > What is the use

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-22 Thread Mike Dewhirst
On 21/05/2023 5:53 am, Chris Green wrote: I'm converting a bash script to python as it has become rather clumsy in bash. What is the use case? However I have hit a problem with converting dates, the bash script has:- dat=$(date --date "$1" +"%Y/%m/%d") and this will accept almost anyth

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-22 Thread Tim Williams
On Mon, May 22, 2023 at 12:41 PM Mats Wichmann wrote: > On 5/20/23 13:53, Chris Green wrote: > > I'm converting a bash script to python as it has become rather clumsy > > in bash. > > > > However I have hit a problem with converting dates, the bash script > > has:- > > > > dat=$(date --date

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-22 Thread Mats Wichmann
On 5/20/23 13:53, Chris Green wrote: I'm converting a bash script to python as it has become rather clumsy in bash. However I have hit a problem with converting dates, the bash script has:- dat=$(date --date "$1" +"%Y/%m/%d") and this will accept almost anything reasonably sensible that c

Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-22 Thread Chris Green
I'm converting a bash script to python as it has become rather clumsy in bash. However I have hit a problem with converting dates, the bash script has:- dat=$(date --date "$1" +"%Y/%m/%d") and this will accept almost anything reasonably sensible that can be interpreted as a date, in particul

RE: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-18 Thread Steve
-Original Message- From: Python-list On Behalf Of Greg Ewing Sent: Wednesday, August 18, 2021 11:49 AM To: python-list@python.org Subject: Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency On 18/08/21 4:43 pm, Steve wrote: >> >> "

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-18 Thread Greg Ewing
On 18/08/21 4:43 pm, Steve wrote: "The HAL (hardware abstraction layer) function HalMakeBeep()" Is the beep that opens the pod bay doors? def HalMakeBeepUsingPCSpeaker(): raise IOError("I'm sorry, I can't do that, Dave.") -- Greg -- https://mail.python.org/mailman/listinfo/python-list

RE: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-17 Thread Steve
g’s that f**king funny!”. -Original Message- From: Python-list On Behalf Of Eryk Sun Sent: Tuesday, August 17, 2021 6:23 PM To: Dennis Lee Bieber Cc: python-list@python.org Subject: Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency On 8/17/21, Dennis

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-17 Thread Eryk Sun
On 8/17/21, Dennis Lee Bieber wrote: > On Tue, 17 Aug 2021 15:11:05 +1000, Chris Angelico > declaimed the following: > >>Huh. Okay. Then I withdraw the concern from this list, and instead lay >>it at Microsoft's feet. That is, I maintain, a bizarre choice. Surely >>there are better ways to trigge

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-17 Thread Dennis Lee Bieber
On Tue, 17 Aug 2021 15:11:05 +1000, Chris Angelico declaimed the following: > >Huh. Okay. Then I withdraw the concern from this list, and instead lay >it at Microsoft's feet. That is, I maintain, a bizarre choice. Surely >there are better ways to trigger audio on the sound card? > Possi

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-16 Thread Chris Angelico
On Tue, Aug 17, 2021 at 1:50 PM Eryk Sun wrote: > > On 8/16/21, Chris Angelico wrote: > > On Tue, Aug 17, 2021 at 11:44 AM Eryk Sun wrote: > > > >> Yes, the PC speaker beep does not get used in Windows 7+. The beep > >> device object is retained for compatibility, but it redirects the > >> reque

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-16 Thread Eryk Sun
On 8/16/21, Chris Angelico wrote: > On Tue, Aug 17, 2021 at 11:44 AM Eryk Sun wrote: > >> Yes, the PC speaker beep does not get used in Windows 7+. The beep >> device object is retained for compatibility, but it redirects the >> request to a task in the user's session (which could be a remote >>

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-16 Thread Chris Angelico
On Tue, Aug 17, 2021 at 11:44 AM Eryk Sun wrote: > > On 8/16/21, Roel Schroeven wrote: > > > > We're not necessarily talking about the PC speaker here: (almost) all > > computers these days have sound cards (mostly integrated on the > > motherboard) that are much more capable than those one-bit P

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-16 Thread Eryk Sun
On 8/16/21, Roel Schroeven wrote: > > We're not necessarily talking about the PC speaker here: (almost) all > computers these days have sound cards (mostly integrated on the > motherboard) that are much more capable than those one-bit PC speakers. Yes, the PC speaker beep does not get used in Win

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-16 Thread jak
Il 13/08/2021 18:17, Chris Angelico ha scritto: On Sat, Aug 14, 2021 at 2:11 AM Terry Reedy wrote: On 8/13/2021 6:53 AM, Umang Goswami wrote: Hi There, Hope you find this mail in good health. I am Umang Goswami, a Python developer and student working on a huge project for automation of music

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-16 Thread Roel Schroeven
Op 15/08/2021 om 7:01 schreef Chris Angelico: On Sun, Aug 15, 2021 at 1:02 PM John O'Hagan wrote: > > > On 2021-08-13 17:17, Chris Angelico wrote: > > > Is it really? In my experience, no human ear can distinguish 277Hz > > > from 277.1826Hz when it's played on a one-bit PC speaker, which the >

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-15 Thread Joel Goldstick
On Sun, Aug 15, 2021 at 1:03 AM Chris Angelico wrote: > > On Sun, Aug 15, 2021 at 1:02 PM John O'Hagan wrote: > > > > > On 2021-08-13 17:17, Chris Angelico wrote: > > > > Is it really? In my experience, no human ear can distinguish 277Hz > > > > from 277.1826Hz when it's played on a one-bit PC sp

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-14 Thread Chris Angelico
On Sun, Aug 15, 2021 at 1:02 PM John O'Hagan wrote: > > > On 2021-08-13 17:17, Chris Angelico wrote: > > > Is it really? In my experience, no human ear can distinguish 277Hz > > > from 277.1826Hz when it's played on a one-bit PC speaker, which the > > > Beep function will be using. > > Rounding to

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-14 Thread John O'Hagan
On Fri, 13 Aug 2021 17:41:05 +0100 MRAB wrote: > On 2021-08-13 17:17, Chris Angelico wrote: > > On Sat, Aug 14, 2021 at 2:11 AM Terry Reedy > > wrote: > >> > >> On 8/13/2021 6:53 AM, Umang Goswami wrote: > >> > Hi There, Hope you find this mail in good health. > >> > > >> > I am Umang Goswami, a

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-13 Thread MRAB
On 2021-08-13 17:17, Chris Angelico wrote: On Sat, Aug 14, 2021 at 2:11 AM Terry Reedy wrote: On 8/13/2021 6:53 AM, Umang Goswami wrote: > Hi There, Hope you find this mail in good health. > > I am Umang Goswami, a Python developer and student working on a huge > project for automation of musi

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-13 Thread Chris Angelico
On Sat, Aug 14, 2021 at 2:11 AM Terry Reedy wrote: > > On 8/13/2021 6:53 AM, Umang Goswami wrote: > > Hi There, Hope you find this mail in good health. > > > > I am Umang Goswami, a Python developer and student working on a huge > > project for automation of music instruments. I am producing the m

Re: Regarding inability of Python Module Winsound to produce beep in decimal frequency

2021-08-13 Thread Terry Reedy
On 8/13/2021 6:53 AM, Umang Goswami wrote: Hi There, Hope you find this mail in good health. I am Umang Goswami, a Python developer and student working on a huge project for automation of music instruments. I am producing the musical notes using the Beep function of Winsound Module( https://docs

Re: (Issue resolved!) Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Sarvesh Poddar via Python-list
Hi terry, I am so happy to mention that your suggestion worked! I moved the file from Tkinter to Lib and I am suddenly able to import the file.  Thanks you so much @Bob, @Arjun, @Cameron for your suggestions. I can finally move forward. I hope to contribute to this community in future after gain

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Sarvesh Poddar via Python-list
Hello Dennis, Sorry for my copy-paste error and thanks for highlighting the same. I will make sure that from next time I will maintain the line breaks. I tried opening it in CMD and it did open with the skewed triangle figure although I am still not able to use it in my IDLE environment. Unfortu

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Terry Reedy
On 8/2/2020 2:36 AM, Sarvesh Poddar via Python-list wrote: [I downloaded] https://mcsp.wartburg.edu/zelle/python/graphics.py) I have unmangled the traceback and added explanations. Traceback (most recent call last):  File "", line 1, in     import graphics You typed this in IDLE Shell in r

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Bob van der Poel
Do you have tkinter installed? The graphics.py module needs it to run. On Sat, Aug 1, 2020 at 11:36 PM Sarvesh Poddar via Python-list < python-list@python.org> wrote: > Hi, > I am currently using Python 3.8.5 with IDLE environment that comes > pre-installed with the Python application. I am usin

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-02 Thread Cameron Simpson
Diverting replies to tu...@python.org, a better place for all this. It looks like the error is in graphics.py, not in your file. Your line: from graphics import * is syntacticly correct. Something has mangled the line breaks in your traceback, which here appears as: When I write a diff

Re: Issue with Python module downloads from Library for a beginner Python coder.

2020-08-01 Thread Sarvesh Poddar via Python-list
Hi, I am currently using Python 3.8.5 with IDLE environment that comes pre-installed with the Python application. I am using the book "An Introduction to computer science" by John Zelle as my reference. The problem I am facing is "There is a python program named "graphics.py" that is used as re

Re: How to pass username and password in the curl requests using requests python module

2019-05-02 Thread Tobiah
On 5/2/19 4:30 AM, Pradeep Patra wrote: Can anyone pls help in this regard? Something like this?: requests.get('https://api.github.com/user', auth=('user', 'pass')) -- https://mail.python.org/mailman/listinfo/python-list

Re: How to pass username and password in the curl requests using requests python module

2019-05-02 Thread DL Neil
On 2/05/19 11:30 PM, Pradeep Patra wrote: Can anyone pls help in this regard? Yes! | | | | | | | | | | | | | | | | | | | | | | V However, whilst accurate, that answer in NOT helpful? The question is so wide. Which part(s) should we answer? Why

How to pass username and password in the curl requests using requests python module

2019-05-02 Thread Pradeep Patra
Can anyone pls help in this regard? -- https://mail.python.org/mailman/listinfo/python-list

Re: Distributing a Python module as .rpm and .deb packages across major distributions

2018-06-13 Thread adam . preble
On Sunday, June 10, 2018 at 3:05:45 PM UTC-5, Barry wrote: > The way I learn about the details of RPM packaging is to look at examples > like what I wish to achieve. > > I would go get the source RPM for a python2 package from each distro you want > to supoort and read its .spec file. > > I se

Re: Splitting up large python module impact on performance?

2018-06-13 Thread Rick Johnson
On Wednesday, June 13, 2018 at 4:27:35 AM UTC-5, Chris Angelico wrote: > It's more his definition of "large" and "small" that I was > disagreeing with. You're absolutely right that a dense > global scope is a problem; but a "one class per file" rule > is a terrible idea. What if the "one class" sp

Re: Splitting up large python module impact on performance?

2018-06-13 Thread Steven D'Aprano
On Wed, 13 Jun 2018 14:08:35 +1000, Cameron Simpson wrote: > I was going to say something along these lines, but to some extent this > feels like an unfair finger pointing exercise. Huge files can be a PITA; > having something that aids moving around them reduces the pain, but > doesn't remove the

Re: Splitting up large python module impact on performance?

2018-06-13 Thread Chris Angelico
On Wed, Jun 13, 2018 at 5:56 PM, Ed Kellett wrote: > On 2018-06-13 05:24, Chris Angelico wrote: >> Oh wait, your code isn't anything remotely sane. But for the rest of >> us, large files aren't a problem. > > I don't like large files--I think mostly because files are an > organisational tool, they

Re: Splitting up large python module impact on performance?

2018-06-13 Thread Ed Kellett
On 2018-06-13 05:24, Chris Angelico wrote: > Oh wait, your code isn't anything remotely sane. But for the rest of > us, large files aren't a problem. I don't like large files--I think mostly because files are an organisational tool, they're quite good at that job, and one might as well use them. B

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Cameron Simpson
On 13Jun2018 17:53, Greg Ewing wrote: Chris Angelico wrote: A few thousand lines in a file is only a problem if you're using an editor that lacks a Find feature. My editor has a find feature, but I still find it a nuisance to have to use it every single time I want to find something. Tags f

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Gregory Ewing
Chris Angelico wrote: A few thousand lines in a file is only a problem if you're using an editor that lacks a Find feature. My editor has a find feature, but I still find it a nuisance to have to use it every single time I want to find something. -- Greg -- https://mail.python.org/mailman/list

Re: Splitting up large python module impact on performance?

2018-06-12 Thread dieter
Bill Deegan writes: > I'm doing some refactoring on a fairly large python codebase. > Some of the files are > 4000 lines long and contain many classes. I am typically working with systems consisting of hundreds of modules (Zope/Plone). Such large systems have a significant impact on startup time

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 2:15 PM, Rick Johnson wrote: > On Tuesday, June 12, 2018 at 10:35:47 PM UTC-5, Chris Angelico wrote: > [...] >> A few thousand lines in a file is only a problem if you're >> using an editor that lacks a Find feature. Or if you use >> bad function/class names that you can't

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Rick Johnson
On Tuesday, June 12, 2018 at 10:35:47 PM UTC-5, Chris Angelico wrote: [...] > A few thousand lines in a file is only a problem if you're > using an editor that lacks a Find feature. Or if you use > bad function/class names that you can't search for. I'm unaware of any text editor that doesn't have

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Cameron Simpson
On 13Jun2018 13:35, Chris Angelico wrote: On Wed, Jun 13, 2018 at 1:23 PM, Rick Johnson wrote: Bill Deegan wrote: I'm doing some refactoring on a fairly large python codebase. Some of the files are > 4000 lines long and contain many classes. I would argue that files of such size are a total

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 1:23 PM, Rick Johnson wrote: > Bill Deegan wrote: >> I'm doing some refactoring on a fairly large python >> codebase. Some of the files are > 4000 lines long and >> contain many classes. > > I would argue that files of such size are a total pain to > navigate and thus, edit

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Rick Johnson
Bill Deegan wrote: > I'm doing some refactoring on a fairly large python > codebase. Some of the files are > 4000 lines long and > contain many classes. I would argue that files of such size are a total pain to navigate and thus, edit. I prefer to place only one -- or only a handful of classes --

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Steven D'Aprano
On Tue, 12 Jun 2018 15:00:44 -0700, Bill Deegan wrote: > Greetings, > > I'm doing some refactoring on a fairly large python codebase. Some of > the files are > 4000 lines long and contain many classes. > > Should I expect any performance hit from splitting some of the classes > out to other file

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Gregory Ewing
Bill Deegan wrote: Should I expect any performance hit from splitting some of the classes out to other files? I doubt it. Time taken to load modules is mostly dependent on the total amount of code, not how many files it lives in. If you had a *very* large number of tiny files, it might be a bi

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Chris Angelico
On Wed, Jun 13, 2018 at 10:32 AM, Cameron Simpson wrote: > I think I'm saying: don't worry unless your applications are very time > critical (eg invoked very frequently and/or doing almost nothing after the > "import" phase) or you notice a significant slowdown after your changes. And > it is usua

Re: Splitting up large python module impact on performance?

2018-06-12 Thread Cameron Simpson
On 12Jun2018 15:00, Bill Deegan wrote: I'm doing some refactoring on a fairly large python codebase. Some of the files are > 4000 lines long and contain many classes. Should I expect any performance hit from splitting some of the classes out to other files? In general, nothing significant. Ye

Splitting up large python module impact on performance?

2018-06-12 Thread Bill Deegan
Greetings, I'm doing some refactoring on a fairly large python codebase. Some of the files are > 4000 lines long and contain many classes. Should I expect any performance hit from splitting some of the classes out to other files? Thanks, Bill -- https://mail.python.org/mailman/listinfo/python-l

Re: Distributing a Python module as .rpm and .deb packages across major distributions

2018-06-10 Thread Barry
t. I'm not really in a political position to > change that policy, for what it's worth. > > I'm still stuck in Python 2.7 here for at least a few more months. Also, it > probably helps to know this is a pure Python module that doesn't have to > compile any nati

Distributing a Python module as .rpm and .deb packages across major distributions

2018-06-08 Thread adam . preble
x27;m still stuck in Python 2.7 here for at least a few more months. Also, it probably helps to know this is a pure Python module that doesn't have to compile any native code. Creating a package itself isn't a problem. In my case, I bandied with the bdist_rpm rule in setup.py, and used st

Re: Target WSGI script cannot be loaded as Python module.

2018-05-23 Thread Νίκος
Τη Τετάρτη, 23 Μαΐου 2018 - 6:18:13 μ.μ. UTC+3, ο χρήστης John Gordon έγραψε: > Is your web server using Python 2 or Python 3 to execute WSGI? I really dont knwo that detail. How can i check that? -- https://mail.python.org/mailman/listinfo/python-list

Re: Target WSGI script cannot be loaded as Python module.

2018-05-23 Thread John Gordon
In <34bc9890-90c9-473d-bd26-3f62264aa...@googlegroups.com> =?UTF-8?B?zp3Or866zr/Pgg==?= writes: > I have both python installed in parallel. > python2.7 and python3.6 > I have installed the modules as > pip3.6 install bottle bottle-pymysql geopip2 > and they were installed successfully. Is you

Re: Target WSGI script cannot be loaded as Python module.

2018-05-22 Thread Νίκος
Τη Τρίτη, 22 Μαΐου 2018 - 10:55:54 μ.μ. UTC+3, ο χρήστης Alexandre Brault > > Any ideas as to why iam getting the above error although i have python36 > > isntalled along with all modules? why can it find it? > How did you install geoip2? Was it by any chance in a virtual > environment? If it was

Re: Target WSGI script cannot be loaded as Python module.

2018-05-22 Thread Alexandre Brault
lient > 46.103.59.37:14500] mod_wsgi (pid=24298): Target WSGI script > '/home/nikos/public_html/app.py' cannot be loaded as Python module. > [Tue May 22 06:49:45.763842 2018] [:error] [pid 24298] [client > 46.103.59.37:14500] mod_wsgi (pid=24298): Exception occurred process

Target WSGI script cannot be loaded as Python module.

2018-05-22 Thread Νίκος
'/home/nikos/public_html/app.py' cannot be loaded as Python module. [Tue May 22 06:49:45.763842 2018] [:error] [pid 24298] [client 46.103.59.37:14500] mod_wsgi (pid=24298): Exception occurred processing WSGI script '/home/nikos/public_html/app.py'. [Tue May 22 06:49:45.763872 2018]

Re: Run python module from console

2017-09-06 Thread Thomas Jollans
On 05/09/17 17:14, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prompt: > The runpy modul

Re: Run python module from console

2017-09-05 Thread Grant Edwards
On 2017-09-05, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prompt: > >>>> os.system(

Re: Run python module from console

2017-09-05 Thread Rhodri James
On 05/09/17 17:11, Stefan Ram wrote: Ned Batchelder writes: exec( compile( open( 'myscr.py', 'rb' ).read(), 'myscr.py', 'exec' )) . This looks quite complicated, but there are rumors that Python 4 might have a »execfile« function, and one then will be able to write: execfile( 'myscr.py' ) It'

Re: Run python module from console

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 8:45:00 PM UTC+5:30, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prom

Re: Run python module from console

2017-09-05 Thread Ned Batchelder
On 9/5/17 11:16 AM, Stefan Ram wrote: > Andrej Viktorovich writes: >> I suppose I can run python module by passing module as param for executable: >> python.exe myscr.py >> But how to run script when I'm inside of console and have python prompt: The Python cons

Re: Run python module from console

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 8:45:00 PM UTC+5:30, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python p

Run python module from console

2017-09-05 Thread Andrej Viktorovich
Hello, I suppose I can run python module by passing module as param for executable: python.exe myscr.py But how to run script when I'm inside of console and have python prompt: >>> -- https://mail.python.org/mailman/listinfo/python-list

Re: Conventions and requirements for a python module

2016-10-11 Thread Michael Felt
On 11/10/2016 17:30, Michael Torrie wrote: On 10/11/2016 08:29 AM, Michael Felt wrote: From reading the python source, and other projects I am looking to patch I see that there is often a file __init__.py, sometimes empty (only comments), sometimes not. I have tried looking in what I hope are

Re: Conventions and requirements for a python module

2016-10-11 Thread Michael Torrie
On 10/11/2016 08:29 AM, Michael Felt wrote: > From reading the python source, and other projects I am looking to > patch I see that there is often a file __init__.py, sometimes empty > (only comments), sometimes not. > > I have tried looking in what I hope are the "regular" places such as: > h

Conventions and requirements for a python module

2016-10-11 Thread Michael Felt
From reading the python source, and other projects I am looking to patch I see that there is often a file __init__.py, sometimes empty (only comments), sometimes not. I have tried looking in what I hope are the "regular" places such as: https://docs.python.org, readthedocs (it took 454 second

python module install manully

2016-08-19 Thread ldompeling
I have a module insteon.py what I need to install manually because it is not in the python index packages. I copied the module in /usr/lib/python2.7/dist-packages and /usr/local/lib/python2.7/dist-packages. When I try to import the module insteon.py I get this error: Does someone knows what the

Re: I need a pure python module from PyPI without additional packages on my OS.

2016-07-03 Thread Laurent Pointal
Seti Volkylany wrote: > I heard about cairo, but it required installed on my computer before. Some precision would be wellcome. Do you need any pure Python module from PyPI ? Do you need a "cairo compatible" pure Python module from PyPI ? A+ L.P. -- https://mail.python.org/mai

I need a pure python module from PyPI without additional packages on my OS.

2016-06-29 Thread Seti Volkylany
I heard about cairo, but it required installed on my computer before. -- https://mail.python.org/mailman/listinfo/python-list

Re: docstringargs: Python module for setting up argparse

2015-04-21 Thread Chris Angelico
On Wed, Apr 22, 2015 at 2:00 PM, Ian Kelly wrote: > On Tue, Apr 21, 2015 at 12:59 AM, Chris Angelico wrote: >> plus, docstringargs >> basically implies that all the function parameters are strings, so the >> annotations are going to be rather less useful. > > Why is that? argparse supports non-st

Re: docstringargs: Python module for setting up argparse

2015-04-21 Thread Ian Kelly
On Tue, Apr 21, 2015 at 12:59 AM, Chris Angelico wrote: > plus, docstringargs > basically implies that all the function parameters are strings, so the > annotations are going to be rather less useful. Why is that? argparse supports non-string args, so why couldn't docstringargs as well? -- https

Re: docstringargs: Python module for setting up argparse

2015-04-21 Thread Chris Angelico
On Tue, Apr 21, 2015 at 4:46 PM, Paul Rubin wrote: > Chris Angelico writes: >> Ow, this is getting extremely complicated. And you still haven't >> actually answered the fundamental problem, which is: When will you >> need this? When will you actually want to put two different >> annotations onto

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Paul Rubin
Chris Angelico writes: > Ow, this is getting extremely complicated. And you still haven't > actually answered the fundamental problem, which is: When will you > need this? When will you actually want to put two different > annotations onto the same function's parameters? You've posted this cool a

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Chris Angelico
On Tue, Apr 21, 2015 at 3:54 PM, Paul Rubin wrote: > Chris Angelico writes: >> Other decorators have to be able to recognize whether there's an outer >> dictionary or not. That means they have to dig into the annotating >> object to inquire as to whether or not their thing is there. > > I'm imagi

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Paul Rubin
Chris Angelico writes: > Other decorators have to be able to recognize whether there's an outer > dictionary or not. That means they have to dig into the annotating > object to inquire as to whether or not their thing is there. I'm imagining the annotation consumers themselves being wrapped by so

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Paul Rubin
Paul Rubin writes: > If there's only one annotation it can take a dictionary without an outer > one. If there's more than one annotation Hmm, I see what you might be getting at: the decorators run innermost-first so only the outer ones can tell if there are multiple ones without some pretty bad

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Chris Angelico
On Tue, Apr 21, 2015 at 3:08 PM, Paul Rubin wrote: > Chris Angelico writes: >> PEP 484 says that type hints don't need a decorator, but if it were >> anything else, then yes, it'd need a second decorator. But what if one >> of the annotation usages wants to be a dictionary? How can you elide >> t

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Paul Rubin
Chris Angelico writes: > PEP 484 says that type hints don't need a decorator, but if it were > anything else, then yes, it'd need a second decorator. But what if one > of the annotation usages wants to be a dictionary? How can you elide > the outer dictionary and still recognize what's going on?

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Chris Angelico
On Tue, Apr 21, 2015 at 2:33 PM, Paul Rubin wrote: > Chris Angelico writes: >> @cmdline >> def adduser( >> user: {cmdline: "Name of user to add", typing: str}, >> password: {cmdline: "Password for the new user", typing: str}=""): >> """Add a new user""" > > In the case of just

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Paul Rubin
Chris Angelico writes: > @cmdline > def adduser( > user: {cmdline: "Name of user to add", typing: str}, > password: {cmdline: "Password for the new user", typing: str}=""): > """Add a new user""" In the case of just one decorator, the dictionary could be omitted. The decorato

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Chris Angelico
On Tue, Apr 21, 2015 at 1:44 PM, Paul Rubin wrote: > Chris Angelico writes: >>> Does this conflict with type signature proposals >> In the sense that you can't use both together, yes. But docstringargs >> follows the rule of "if you're going to use annotations, also use a >> decorator"; and the d

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Paul Rubin
Chris Angelico writes: >> Does this conflict with type signature proposals > In the sense that you can't use both together, yes. But docstringargs > follows the rule of "if you're going to use annotations, also use a > decorator"; and the decorator removes all the annotations it uses. This makes

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Chris Angelico
On Tue, Apr 21, 2015 at 11:13 AM, Paul Rubin wrote: > Chris Angelico writes: >> @cmdline >> def adduser(user: "Name of user to add", password: "Password for the >> new user"=""): >> """Add a new user""" > > Does this conflict with type signature proposals using that annotation > mechanism? I

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Paul Rubin
Chris Angelico writes: > @cmdline > def adduser(user: "Name of user to add", password: "Password for the > new user"=""): > """Add a new user""" Does this conflict with type signature proposals using that annotation mechanism? I guess that means PEP 0484 but I've lost track of what's where.

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Chris Angelico
On Mon, Apr 20, 2015 at 5:22 PM, Steven D'Aprano wrote: > On Monday 20 April 2015 16:20, Chris Angelico wrote: > >> Looking for comments, recommendations, advice that I've just wasted >> half a day on something utterly useless, whatever it be! >> >> I've just posted a new (single-module) package t

Re: docstringargs: Python module for setting up argparse

2015-04-20 Thread Steven D'Aprano
On Monday 20 April 2015 16:20, Chris Angelico wrote: > Looking for comments, recommendations, advice that I've just wasted > half a day on something utterly useless, whatever it be! > > I've just posted a new (single-module) package to PyPI that simplifies > the creation of an argparse UI for a p

docstringargs: Python module for setting up argparse

2015-04-19 Thread Chris Angelico
Looking for comments, recommendations, advice that I've just wasted half a day on something utterly useless, whatever it be! I've just posted a new (single-module) package to PyPI that simplifies the creation of an argparse UI for a program that consists of a number of subcommands. It uses functio

Re: exporting c_variable to embedded python module

2015-01-08 Thread kenakahn
I want to access c-side global variables from the python side. -- https://mail.python.org/mailman/listinfo/python-list

Re: exporting c_variable to embedded python module

2015-01-08 Thread Chris Angelico
On Fri, Jan 9, 2015 at 8:03 AM, wrote: > I'm running a python script loaded via PyImport_Import in my C++ program on > Linux. Is there any way I can pass a value from the c-code to the loaded > python module? To answer this question, first think about how you would like to see

exporting c_variable to embedded python module

2015-01-08 Thread kenakahn
I'm running a python script loaded via PyImport_Import in my C++ program on Linux. Is there any way I can pass a value from the c-code to the loaded python module? -- https://mail.python.org/mailman/listinfo/python-list

Re: which specified python module can monitor text information in Windows GUI

2015-01-05 Thread vern . muhr
On Monday, January 5, 2015 4:06:52 AM UTC-8, Chambers yin wrote: > Which kind of specified python module can monitor text in Windows GUI or > support the similar function? > > > Br, > -Chambers Sikuli (http://www.sikuli.org/) might be helpful. It is scripted in Jython. Not

which specified python module can monitor text information in Windows GUI

2015-01-05 Thread Chambers yin
Which kind of specified python module can monitor text in Windows GUI or support the similar function? Br, -Chambers -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the recommended python module for SQL database access?

2014-02-10 Thread Asaf Las
On Tuesday, February 11, 2014 5:31:35 AM UTC+2, Chris Angelico wrote: > On Tue, Feb 11, 2014 at 2:02 PM, Asaf Las wrote: > > > On Tuesday, February 11, 2014 4:57:30 AM UTC+2, Walter Hurry wrote: > >> Chris Angelico wrote: > >> > > >> > And definitely don't go for a non-free option (MS-SQL, DB2, e

Re: What is the recommended python module for SQL database access?

2014-02-10 Thread Chris Angelico
On Tue, Feb 11, 2014 at 2:02 PM, Asaf Las wrote: > On Tuesday, February 11, 2014 4:57:30 AM UTC+2, Walter Hurry wrote: >> Chris Angelico wrote: >> > >> > And definitely don't go for a non-free option (MS-SQL, DB2, etc) >> > unless you've looked into it really closely and you are absolutely >> > th

Re: What is the recommended python module for SQL database access?

2014-02-10 Thread Chris Angelico
On Tue, Feb 11, 2014 at 1:57 PM, Walter Hurry wrote: > Chris Angelico wrote: > >> Broad recommendation: Single application, tiny workload, concurrency >> not an issue, simplicity desired? Go SQLite. Big complex job, need >> performance, lots of things reading and writing at once, want >> networked

Re: What is the recommended python module for SQL database access?

2014-02-10 Thread Asaf Las
On Tuesday, February 11, 2014 4:57:30 AM UTC+2, Walter Hurry wrote: > Chris Angelico wrote: > > > > And definitely don't go for a non-free option (MS-SQL, DB2, etc) > > unless you've looked into it really closely and you are absolutely > > thoroughly *sure* that you need that system (which probably

Re: What is the recommended python module for SQL database access?

2014-02-10 Thread Walter Hurry
Chris Angelico wrote: > Broad recommendation: Single application, tiny workload, concurrency > not an issue, simplicity desired? Go SQLite. Big complex job, need > performance, lots of things reading and writing at once, want > networked access? Go PGSQL. And don't go MySQL if PG is an option. > >

  1   2   3   4   5   >