Re: Simple TCP proxy

2022-07-28 Thread Andrew MacIntyre
stack-sizes-and-how-alpine-is-different/). threading.stack_size() can be used to check and perhaps adjust the allocation size. -- - Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andy

Re: error of opening Python

2022-04-14 Thread Andrew Hernandez
that is not an error, its simply the python console intrepeter -- https://mail.python.org/mailman/listinfo/python-list

pyinstaller is not a internal or external command

2022-04-04 Thread Andrew Pierson
I ran pip install pyinstaller fine but after then I type in pyinstaller and it says pyinstaller is not a internal or external command   Sent from [1]Mail for Windows   References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 -- https://mail.python.org/ma

Re: on writing a while loop for rolling two dice

2021-09-11 Thread Andrew Jaffe
On 11/09/2021 10:09, dn via Python-list wrote: The stated requirement is: "I'd like to get the number of times I tried". Given such: why bother with returning any of the pairs of values? Indeed, if that's the requirement, then you can do even better, noting that the probability of getting a

Re: better handling of "pinned" modules?

2021-01-08 Thread Andrew Jaffe
On 08/01/2021 18:21, Chris Angelico wrote: On Sat, Jan 9, 2021 at 5:18 AM Andrew Jaffe wrote: Hi, I don't know if this makes more sense here or on "python-ideas" (or elsewhere?) but I'll try this first: I am starting to encounter more and more instances of packages req

better handling of "pinned" modules?

2021-01-08 Thread Andrew Jaffe
thin a specific package egg would be directed to a specific version stored within the egg or in some other known location? Is this an issue worth tackling? Or do we just have to rely on package developers to keep up with their dependencies? Yours, Andrew -- https://mail.python.org/mailman/listinfo/python-list

stat_result.st_ino from os.stat isn't constant on a network drive.

2020-08-26 Thread Andrew Nelson
ot; If I do the same thing on a local file instead of on a network mount st_ino is constant and doesn't change. Is this a Python bug, or is it an issue with the way Windows deals with network mounts? Andrew. -- https://mail.python.org/mailman/listinfo/python-list

Re: Dowloading package dependencies from locked down machine

2020-07-27 Thread Andrew McLean
, would it be possible to create a standalone executable version of pip with py2exe or similar? - Andrew -- https://mail.python.org/mailman/listinfo/python-list

Dowloading package dependencies from locked down machine

2020-07-26 Thread Andrew McLean
a browser, finding its dependencies manually, downloading these and so on recursively? My dream solution would be for PyPi to provide a link to a zip file that bundled up a package and its dependencies, but I realise that this is probably a very niche requirement. - Andrew [1] Apparently

Re: [Beginner] Spliting input

2020-06-25 Thread Andrew Jaffe
Hi, On 25/06/2020 12:50, Bischoop wrote: I try to split input numbers, for example: 12 so I cant add them, I tried separated split(' ') but it's not working. Any ideas how to do this? * numb1,numb2=input("enter 1st and 2nd no ").split() Avg=(int(numb1) + int(numb2)) / 2 print(Avg) So, this i

Re: [Beginner] Spliting input

2020-06-25 Thread Andrew Bell
ing. > Any ideas how to do this? > > * > numb1,numb2=input("enter 1st and 2nd no ").split() > Avg=(int(numb1) + int(numb2)) / 2 > print(Avg) > -- Andrew Bell andrew.bell...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Andrew Jaffe
Dear all, \On 26/05/2020 15:56, BlindAnagram wrote: I came across an issue that I am wondering whether I should report as an issue. If I have a directory, say: base='C:\\Documents' and I use os.path.join() as follows: join(base, '..\\..\\', 'build', '') I obtain as expected from the d

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Andrew Barnert via Python-list
On Jan 8, 2020, at 01:09, Abdur-Rahmaan Janhangeer wrote: > > Using the wheel-included zip (A), we can generate another zip file (B) with > the packages installed. That generated zip file is then executed. But that generated zip B doesn’t have a trustable hash on it, so how can you execute it?

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Andrew Barnert via Python-list
On Jan 8, 2020, at 01:09, Abdur-Rahmaan Janhangeer wrote: > > But now, a malicious program might try to modify the info file > and modify the hash. One way to protect even the metadata is > to hash the entire content > > folder/ > file.py # we can add those in a folder if needed > __main

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Andrew Z
Look into https://repl.it On Wed, Nov 20, 2019, 15:43 Göktuğ Kayaalp wrote: > > Andrew Z wrote: > > Goktug, > > Im not clear what is the objective of the lecture? I understand it is > an > > intro, but what are you trying to achieve? > > Basically I ne

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Andrew Z
Goktug, Im not clear what is the objective of the lecture? I understand it is an intro, but what are you trying to achieve? I didnt read all the details, but maybe you can look into creating a docker/virtual box image with everything preinstalled. Good luck. On Wed, Nov 20, 2019, 11:54 Göktuğ K

Re: Blasphemy

2019-10-24 Thread Andrew Z
Space. On Thu, Oct 24, 2019, 18:53 Marek Mosiewicz wrote: > What about, if Python would have optional end keyword. In fact most of > blocks have starting : sign. What if you would have also keyword to > optionaly mark end of block. > > That would be big win for IDEs to format code and ensure tha

Re: [Python-ideas] Fwd: Re: PEP: add a `no` keyword as an alias for `not`

2019-08-02 Thread Andrew Barnert via Python-list
On Aug 1, 2019, at 13:38, Daniel Okey-Okoro wrote: > > > > not a strong enough justification for breaking any code that uses "no" in > > any other way. > > This is a very crucial point I didn't consider. > > > > What if we could le

Multiple Interpreters?

2019-07-26 Thread Andrew Bell
ne 5, in from collections import deque File "/Users/acbell/miniconda3/envs/pdal/lib/python3.7/collections/__init__.py", line 24, in import heapq as _heapq File "/Users/acbell/miniconda3/envs/pdal/lib/python3.7/heapq.py", line 587, in from _heapq import * Thanks, -- Andrew Bell andrew.bell...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Books for Python 3.7

2019-07-16 Thread Andrew Z
> intrigued to hear from you, should you... > > > Last comment (to OP): you should be aware of the Python version > 'covered'. Am not convinced that v3.7 is that important - to a beginner. > Thus, maybe accept v3.5+, and make a practice of reviewing the Python > docs -

Re: Books for Python 3.7

2019-07-15 Thread Andrew Z
Gys - hats off. Basically what Dennis is saying- you dont need a book "about python ". Tutorials and general search online will get you further and faster than any book. Blah-blah about myself: my bookshelf has 2 technical books, just because i got them to prepare for certifications. For my tradi

Re: Books for Python 3.7

2019-07-12 Thread Andrew Z
8nterval and start/stop countdown. I have 0 knowledge in android and kotlin. So for me to get to voice recognition part i need to learn basics of the android and kotlin. On Fri, Jul 12, 2019, 15:35 RIchy M wrote: > On Friday, July 12, 2019 at 2:45:48 PM UTC-4, Andrew Z wrote: > > Richy,

Re: Books for Python 3.7

2019-07-12 Thread Andrew Z
Richy, What specific part you consider hard? If i may suggest, get a (pet) project as you read it. On Fri, Jul 12, 2019, 13:46 RIchy M wrote: > On Friday, July 12, 2019 at 1:00:01 PM UTC-4, MRAB wrote: > > On 2019-07-12 16:40, Terry Reedy wrote: > > > On 7/12/2019 11:27 AM, Richard Mok wrote:

Pandas- yahoo finance

2019-06-04 Thread Andrew Z
Hello, Do i get it right that yahoo finance is no longer available as a data source for pandas? -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python has no equivalent of JDBC of Java?

2019-05-20 Thread Andrew Z
PM, Andrew Z wrote: > > What does 249 specification mention about drivers? > > Nothing that I can see. > > But it stands to reason that at some point the Python code is going to > have to interface with the SQL database server's API. And when the > database in question is

Re: Why Python has no equivalent of JDBC of Java?

2019-05-20 Thread Andrew Z
What does 249 specification mention about drivers? On Mon, May 20, 2019, 17:39 Marco Sulla via Python-list < python-list@python.org> wrote: > On Mon, 20 May 2019 at 17:32, Thomas Jollans wrote: > > > Python has a the "Python Database API" (DB API 2.0) > > https://www.python.org/dev/peps/pep-0249

Re: Why Python has no equivalent of JDBC of Java?

2019-05-19 Thread Andrew Z
The pg python lib requires https://www.postgresql.org/docs/current/libpq.html pip pulls it as a part of the lib install, whereas in oracle case you install the driver yourself first.(suize matters) //for some reason i thought the driver libs come as part of cx . But it was a year ago and my memory

Re: Why Python has no equivalent of JDBC of Java?

2019-05-19 Thread Andrew Z
Marco, You clearly know more about python/java universe than i do. But im infinitely thankful to cx team for putting out the package. Feature and performance wise , even with non supported oracle timesten, it was fantastic. Id always go after "native" vs jdbc. But i understand that most of apps

Re: Python resources recommendations

2019-03-09 Thread Andrew Z
I would think that your experience with other languages would guide you on the route of learning another tool.. On Sat, Mar 9, 2019, 13:01 Arup Rakshit wrote: > Hello Python, > > This is my first time in this mailing list. I am a Ruby/JS developer by > day. I have decided to learn Python now thi

Re: Hands-On Quantum Computing with Python

2019-01-05 Thread Andrew Z
Good for you. On Sat, Jan 5, 2019, 06:25 Bhagvan Kommadi I am coauthoring a packt book : Hands-On Quantum Computing with Python. > The book will be published around Aug 2019 > > > > The book will introduce quantum computing and a comprehensive overview of > the quantum programming languages curre

Re: Good editor for python

2018-11-11 Thread Andrew Z
e snippet and "```{r}" ... "```" for an R code snippet. Or I > > just use the Idle editor that comes with Python. > > > > > >Someone suggested that Apache Zeppelin and / or BeakerX might be > > able to do this also, but I've not tried o

Re: Good editor for python

2018-11-11 Thread Andrew Z
If you do scripts - emacs/vi is the way to go. If you need something more (like creating libraries, classes) go with pycharm. It is a professionally made IDE. Over past 2 years ive been trying to "downgrade" myself to something with less belts and whistles, but come back to it all the time. On

Re: Cloud platform with GPU

2018-11-10 Thread Andrew Z
Denis, ..none of them was very satisfactory. Sharing your requirements will be a good first step for getting good answers. On Sat, Nov 10, 2018, 02:26 denis meng Good day all, > > I am looking for a good cloud platform to do all my python development for > machine learning with GPU availability,

Re: Python bug in ArcGIS - Urban Network analysis tool

2018-07-30 Thread Andrew MacIntyre
act the author or the download source. If you or your organisation has a current ArcGIS maintenance agreement, you might also be able to access the community forums that ESRI run to ask for more info about this plugin. -- - An

help install on Win 7

2018-06-28 Thread Andrew von Bevern
I have tried to install python on my home laptop several times, using 3.6 or 3.7. Each time I get the following error - anyone know what I am doing wrong? [image: image.png] thanks in advance Andrew -- https://mail.python.org/mailman/listinfo/python-list

Installing Paraview 5.4.1-704g7198de6 (64) and Python 3.7.)b3 (64) on W10

2018-04-08 Thread Andrew Podgorski
I am trying to find out how to install the above programs together so that ParaView will recognize Python? I see so many responses on the web that I am confused. I NEED TO READ only vtk file? Andrew Podgorski a.podgor...@ieee.org -- https://mail.python.org/mailman/listinfo/python-list

Re: Keys in dict and keys not in dict

2018-03-19 Thread Andrew Z
Beautiful. Thank you Chris, Ben, Peter and Inada. On Mar 19, 2018 3:14 AM, "INADA Naoki" wrote: > > expected = {"foo", "bar", "spam"} > > missing = expected - set(json.keys()) > > > > dict.keys() returns set-like object. > So `missing = expected - json.keys()` works fine, and it's more e

Keys in dict and keys not in dict

2018-03-18 Thread Andrew Z
hello, i'd like to check if a function parameter (json) has all the keys I expect it to have and if it doesn't - point out the one that is missing. What's the good way of doing that? "good way" - something concise... i'd like to avoid using : if key in json: #pass else print(" Oops, i

A better solution

2018-03-16 Thread Andrew Z
Hello, im not entirely happy with my solution and would love to hear your suggestions on how to improve the solution. I simplified the task while keeping the code working. Task: financial accounts are described by XML documents. I want to architecture the code to be easily extendible ( easy to

Re: Flask: request vs Request

2018-03-12 Thread Andrew Z
Thank you Christopher. On Mar 12, 2018 09:10, "Christopher Mullins" wrote: > Could you please give some context when you reply, TIA >> > > Whoops, thanks for the reminder Mark. > > So what for the Request is used for then? > > > In general when you see that something in Python starts with a cap

Re: csv module and NULL data byte

2018-03-11 Thread Andrew McNamara
outside the Python core... 8-) -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Flask: request vs Request

2018-03-11 Thread Andrew Z
after reading the docs and stackoverflow i got some rudimentary understanding of Request vs request. i still don't understand why i PyCharm won't show properties, but it is tool centric question that hardly belongs to this group. On Sun, Mar 11, 2018 at 10:02 AM, Andrew Z wrote: &g

Re: Flask: request vs Request

2018-03-11 Thread Andrew Z
Sorry guys. i realized i was "mumbling" . What is the difference between Request and request? - RTFM <http://flask.pocoo.org/docs/0.12/api/#flask.Request>, Andrew Questions: a. when do i use Request? b. why can't I see any properties of the request? For example,

Re: Flask: request vs Request

2018-03-10 Thread Andrew Z
that's right there is no Request used. So what for the Request is used for then? Here it is explained that request is for current request... that's kinda of clears the air a bit. but where do i find it's m

Flask: request vs Request

2018-03-10 Thread Andrew Z
hello, i'm playing with Michael Grinberg's "Restful API with python and flask" tutorial . And i'm very much confused whats the difference between request and Request. the "request" is introduced @ the point he

Re: LXML: can't register namespace

2018-03-09 Thread Andrew Z
nel wrote: > > > >> Andrew Z schrieb am 07.03.2018 um 05:03: > >>> Hello, > >>> with 3.6 and latest greatest lxml: > >>> > >>> from lxml import etree > >>> > >>> tree = etree.parse('Sample.xml') >

Re: LXML: can't register namespace

2018-03-07 Thread Andrew Z
the namespace URI will be removed. On Wed, Mar 7, 2018 at 8:55 AM, Andrew Z wrote: > Yes, if i give it any non empty tag - all goes well. > > All im trying to do is to extract a namespace ( i try to keep simple here. > Just first one for now) and register it so i can save

Re: LXML: can't register namespace

2018-03-07 Thread Andrew Z
> wrote: > On Tue, 06 Mar 2018 23:03:15 -0500, Andrew Z wrote: > > > Hello, > > with 3.6 and latest greatest lxml: > > > > from lxml import etree > > > > tree = etree.parse('Sample.xml') > > etree.register_namespace('','htt

Re: csv module and NULL data byte

2018-03-07 Thread Andrew McNamara
parser to produce the same result as Excel, it must see the raw bytes with no re-ordering or suppression of CRs. Unfortunately, I haven't had time to be involved in the module for a few years. I wasn't involved with the Unicode changes necessary in Python 3, and I have not verified

LXML: can't register namespace

2018-03-06 Thread Andrew Z
Hello, with 3.6 and latest greatest lxml: from lxml import etree tree = etree.parse('Sample.xml') etree.register_namespace('','http://www.example.com') causes: Traceback (most recent call last): File "/home/az/Work/flask/tutorial_1/src/xml_oper.py", line 16, in etree.register_namespace('

Re: python to C code generator

2018-01-23 Thread Andrew Z
Id go this way too. Basic C is straightforward. I usually consider learning a new "thing " if the time to support potwntially combersome solution using existing methods justifies the effort. On Jan 23, 2018 09:01, "Ned Batchelder" wrote: > On 1/23/18 8:48 AM, kushal bhattacharya wrote: > >> On

Re: we want python software

2017-12-06 Thread Andrew Z
Can we mark the entire thread "spam", please? On Dec 6, 2017 17:55, "Gregory Ewing" wrote: > Rick Johnson wrote: > > DOLT: "Programming is easy! Once you learn the langauge, >> it's just a matter of fill-in-the-blanks." >> > > To be fair to this person, for someone who has a natural > a

Re: Politeness (was: we want python software)

2017-12-06 Thread Andrew Z
Looks like the longest thread for past 2 months. Should we push it to be the longest for 2017? :) On Dec 6, 2017 15:34, "Ian Kelly" wrote: > On Wed, Dec 6, 2017 at 10:56 AM, Gene Heskett > wrote: > > On Wednesday 06 December 2017 12:14:32 Ian Kelly wrote: > > > >> On Wed, Dec 6, 2017 at 9:42

Re: Pros and cons of Python sources?

2017-11-27 Thread Andrew Z
Martin, Im Late to the party, but my (newbish) .02 I learned hard way not to mix rpm and pip (im on fedora). Yes, pip ...-user is what i use now exclusively. I doubt you can _easily_ clean everything up..especially considering that a few linux core utils depend on python nowadays. Maybe you ca

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-24 Thread Andrew Z
Thank you Rick for well thought out argument. On Nov 24, 2017 12:44, "Rick Johnson" wrote: > On Thursday, November 23, 2017 at 9:57:12 PM UTC-6, Ben Finney wrote: > [...] > > This is a necessary consequence of increasing the diversity > > of people able to program in Python: people will expres

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-23 Thread Andrew Z
I have hard time seeing the benefits of this "necessity" , just unreasonable overcomplications for the name of "diversity". On Nov 23, 2017 22:57, "Ben Finney" wrote: > Ian Kelly writes: > > > On Thu, Nov 23, 2017 at 1:04 PM, Karsten Hilbert > > wrote: > > > Using function arguments writte

Re: Time travel - how to simplify?

2017-11-18 Thread Andrew Z
dDate + relativedelta.relativedelta(months = -6,day = 1) LocalSmlSuffix = [ suffix for mnth, suffix in fut_suffix.items() if mnth == startDate.month] On Tue, Nov 14, 2017 at 5:01 PM, Rick Johnson wrote: > On Tuesday, November 14, 2017 at 1:44:17 PM UTC-6, Ben Finney wrote: > > Andrew Z

Re: for/ if against dict - one liner

2017-11-18 Thread Andrew Z
thon.org> wrote: > On Tue, 14 Nov 2017 00:44:18 -0500, Andrew Z wrote: > > > Hello, > > i wonder how do i get the "for" and "if" to work against a dictionary > > in > > one line? > > > > basically i want to "squeeze":

Time travel - how to simplify?

2017-11-13 Thread Andrew Z
well, yeah, it's unidirectional and final destination is always the same and have little to do with the question. Say, i have a dict: fut_suffix ={ 1 : 'F', 2 : 'G', 3 : 'H', 4 : 'J', 5 : 'K', 6 : 'M', 7 : 'N',

Re: Time travel - how to simplify?

2017-11-13 Thread Andrew Z
My implied solution is incorrect. I should start with using the date type and, for example, dateutil package for date manipulation and building the dictionary of needed dates/months. And only after that, map against the fut_suffix. On Tue, Nov 14, 2017 at 12:56 AM, Andrew Z wrote: > w

for/ if against dict - one liner

2017-11-13 Thread Andrew Z
Hello, i wonder how do i get the "for" and "if" to work against a dictionary in one line? basically i want to "squeeze": dct= [ 1 : "one", 2:"two", 3:"three"] for k, val in dct: if k >= 2: # do magnificent things Thank you AZ -- https://mail.python.org/mailman/listinfo/python-list

Re: matplot plot hangs

2017-11-04 Thread Andrew Z
Tim, it won't even advance to that line. On Thu, Nov 2, 2017 at 8:28 AM, Tim Williams wrote: > On Wednesday, November 1, 2017 at 6:30:27 PM UTC-4, Andrew Z wrote: > > nope. it doesnt: > > > > I added print-s after each line and that produced: > > [az@hp

Re: matplot plot hangs

2017-11-01 Thread Andrew Z
py imported ^C^Z [1]+ Stopped python3.5 ./main1.py On Wed, Nov 1, 2017 at 9:31 AM, Vlastimil Brom wrote: > 2017-11-01 13:49 GMT+01:00 Andrew Z : > > Wolfgang, > > I tried to ran from ide with no rwsults, so now im trying from a > terminal > > in xwindow. > &g

Re: matplot plot hangs

2017-11-01 Thread Andrew Z
Wolfgang, I tried to ran from ide with no rwsults, so now im trying from a terminal in xwindow. The .plot is the last line in the script and it does hang trying to execute it. On Nov 1, 2017 05:44, "Wolfgang Maier" < wolfgang.ma...@biologie.uni-freiburg.de> wrote: On 01.11.2017

Re: matplot plot hangs

2017-10-31 Thread Andrew Z
Stefan, I intentionally tried to use the qt backend that i do not have. I wanted to check i the switch was working (or not). All i want at this point is to use (seemed to be default) tkagg. On Oct 31, 2017 20:15, "Stefan Ram" wrote: > Andrew Z writes: > >ImportError: *No

matplot plot hangs

2017-10-31 Thread Andrew Z
hello, learning python's plotting by using matplotlib with python35 on fedora 24 x86. Installed matplotlib into user's directory. tk, seemed to work - http://www.tkdocs.com/tutorial/install.html#installlinux - the window shows up just fine. but when trying to run the simple plot ( https://matplot

Re: Ide vs ide

2017-10-28 Thread Andrew Z
I like this trajectory of conversation. Can we re define "small tiny" as "scripts"? i can argue, based on my expirience with other languages, that there is no need for an "ide". The most ive ever needed is a text editor and a few plugins with "print". Moving to "average" size projects. What i fou

Ide vs ide

2017-10-27 Thread Andrew Z
Yeah, lets start the war! // joking! But if i think about it... there are tons articles and flame wars about "a vs b". And yet, what if the question should be different: If you were to create the "ide" for yourself (think lego) , what are the functions that you _use_ and like a lot? -- https://m

Re: How to plot

2017-10-27 Thread Andrew Z
Rrhank you Thomas. On Oct 27, 2017 04:23, "Thomas Jollans" wrote: > On 2017-10-27 07:18, Andrew Z wrote: > > Hello, > > i'd like to create a graph/plot based a DB table's data, but not sure > > where to start. I > > > > also would like to

How to plot

2017-10-26 Thread Andrew Z
Hello, i'd like to create a graph/plot based a DB table's data, but not sure where to start. I also would like to have the following functionality: a. i'd like to have it in the separate window ( xwindow to be precise). b. and i'd like to have the graph updating with every record added to the

Modern website

2017-10-22 Thread Andrew Z
I realize the following has little todo with python per se. But i hope to get a guidance on how these types of tasks are done nowadays. The task: Ive been asked to create an integration process. That is a few webpages with questioneer with the submission to a "mother" company using its API . Idea

Re: how to read in the newsreader

2017-10-15 Thread Andrew Z
hmm. i did do that. maybe just a delay. I'll see how it will go tomorrow then. Thank you gents. On Mon, Oct 16, 2017 at 12:30 AM, Chris Angelico wrote: > On Mon, Oct 16, 2017 at 3:19 PM, Andrew Z wrote: > > Michael, that's what i use too - gmail. But i get the dige

Re: how to read in the newsreader

2017-10-15 Thread Andrew Z
esn't seemed to filter anything in the comp group. But what you recommend is to access the group using regular email client and use it's spam filtering . Did i get that right ? On Mon, Oct 16, 2017 at 12:19 AM, Andrew Z wrote: > Michael, that's what i use too - gmail. But i

Re: how to read in the newsreader

2017-10-15 Thread Andrew Z
Michael, that's what i use too - gmail. But i get the digest only and can't really reply that way. i was hoping to get the mail.python.org list On Mon, Oct 16, 2017 at 12:00 AM, Michael Torrie wrote: > On 10/15/2017 08:50 PM, Andrew Z wrote: > > Gents, > > how

how to read in the newsreader

2017-10-15 Thread Andrew Z
Gents, how do i get this group in a newsreader? The digest i'm getting is not workable for me - i can't reply , can only read the replies from the members of the group. Or. maybe, it shouldn't be a news reader please advise.. P.S. Oh the comp.lang.python is a nightmare because of spam... --

Best practise for passing time as arguments

2017-10-14 Thread Andrew Z
Hello, I wonder what are the "best practises" for passing "time" parameters to functions? I noticed that sometimes i pass "time" as a str and then start "massaging" it into delta or i need this time format or that format. Thats quite annoying and inconsistent. I use word "time" as a general word f

Re: unorderable types: list() > int()

2017-10-13 Thread Andrew Z
The answer is: The dict returns list - my mistake obviously. I think list.pop(0) is better for sanity than list[0]: Pos= [k,v for ...].pop(0) On Oct 13, 2017 00:23, "Andrew Z" wrote: > Hello, > pos = {"CLown":10,"BArbie":20} > I want to return intege

unorderable types: list() > int()

2017-10-12 Thread Andrew Z
Hello, pos = {"CLown":10,"BArbie":20} I want to return integer (10) for the keyword that starts with "CL" cl_ = [v for k, v in pos.items() if k.startswith('CL')] cl_pos = cl_[0] if cl_pos > 0: blah.. There are 2 issues with the above: a. ugly - cl_pos = cl_ [0] . I was thinking something

Re: Logging from files doesn't work

2017-10-12 Thread Andrew Z
Cameron, Peter, Thank you. Your comments were spot on. Changing root logger got the logs spitting into the file. And i now can org these logs into one directory, instead of the current mess. Thank you! On Oct 11, 2017 23:41, "Cameron Simpson" wrote: > On 11Oct2017 22:27, An

Re: Logging from files doesn't work

2017-10-11 Thread Andrew Z
g is working perfectly well. This brings me to the question - what is wrong with me file naming/structure that confuses the logging module? I'm not sure i really want to have each little file in it's own directory too.. but i'm open for suggestions. On Wed, Oct 11, 2017 at 10:15 PM, Andre

Re: Logging from files doesn't work

2017-10-11 Thread Andrew Z
if i change print statements in both files to print out "__name__": __main__ test1.test On Wed, Oct 11, 2017 at 10:02 PM, Andrew Z wrote: > Hello, > > apparently my reading comprehension is nose diving these days. After > reading python cookbook and a few other tutoria

Logging from files doesn't work

2017-10-11 Thread Andrew Z
Hello, apparently my reading comprehension is nose diving these days. After reading python cookbook and a few other tutorials i still can't get a simple logging from a few files to work. I suspected my file organization - all files are in the same directory, causing problem. But it appears it is

Re: "comprehend" into a single value

2017-10-07 Thread Andrew Z
and how about adding "IF" into the mix ? as in : a=0 dict= {10: ['a',1,'c'], 20: ['d',2,'f']} for i in dict: p+= 10 if dict[i][1] in [1,2,3,4,5] else 0 can i "squish" "for" and "if" together ? or will it be

Re: "comprehend" into a single value

2017-10-07 Thread Andrew Z
>> Something like that? >> > Ah, but that's 2 lines. > > sum(val[1] for val in {10: ['a',1,'c'], 20: ['d',2,'f']}.values()) > > On Sat, Oct 7, 2017 at 11:07 PM, Andrew Z wrote: >> >> Hello, >>> i wonder

"comprehend" into a single value

2017-10-07 Thread Andrew Z
Hello, i wonder how can i accomplish the following as a one liner: dict= {10: ['a',1,'c'], 20: ['d',2,'f']} p = 0 for i in dict: p += dict[i][1] Thank you -- https://mail.python.org/mailman/listinfo/python-list

A good way to unpack a matrix

2017-09-13 Thread Andrew Zyman
hello, is there a better approach to populating a function in this situation? res = self.DB.getPrice(): # returns array of 3x2 always. symbol_id, symbol, price. var1 = self.AFunction(symbols=res[0][2] + '.' + res[1][2], conid1= self.Contracts[res[0][0]].conId, conid2=self.Contracts[res[1][0]]

async. How to wait for async function to complete

2017-09-07 Thread Andrew Z
Hello, i need to wait for the callback function (contractDetailsEnd) to finish before i can continue with the logic ( in subscribe) further. For that i check the flag (ContractsUpdatedEnd) in the "while" loop. Here is the simplified code: import asyncio import ibapi from tws_async import TWSCl

Nesting concurrent.futures.ThreadPoolExecutor

2017-07-20 Thread Andrew McLean
I have a program where I am currently using a concurrent.futures.ThreadPoolExecutor to run multiple tasks concurrently. These tasks are typically I/O bound, involving access to local databases and remote REST APIs. However, these tasks could themselves be split into subtasks, which would also b

Windows: python3.exe missing

2017-07-07 Thread Andrew Pennebaker
Could the Windows installer for Python 3 provide a "python3" command, such as a python3.bat or python3.exe file, to help with scripts that rely on the interpreter being called "python3"? The py launcher is somewhat helpful, but a proper python3 runnable is preferable. -- https://mail.python.or

Re: Python3 : import

2017-07-07 Thread Andrew Z
On Friday, July 7, 2017 at 4:16:38 PM UTC-4, Ian wrote: > On Fri, Jul 7, 2017 at 2:00 PM, Andrew Z wrote: > > [az@hp tst1]$ python3 ./uno.py > > Traceback (most recent call last): > > File "./uno.py", line 1, in > > from . import db > > Syste

Re: Python3 : import

2017-07-07 Thread Andrew Z
On Friday, July 7, 2017 at 4:00:51 PM UTC-4, Andrew Z wrote: > this has bee driving me nutz for the past few hours. > 2 modules are in the same directory. I want to be able to use them both: > > [code] > > [az@hp tst1]$ pwd > /home/az/Dropbox/work/Prjs/tst1 > > [az

Re: Python3 : import

2017-07-07 Thread Andrew Z
On Friday, July 7, 2017 at 4:00:51 PM UTC-4, Andrew Z wrote: > this has bee driving me nutz for the past few hours. > 2 modules are in the same directory. I want to be able to use them both: > > [code] > > [az@hp tst1]$ pwd > /home/az/Dropbox/work/Prjs/tst1 > > [az

Python3 : import

2017-07-07 Thread Andrew Z
this has bee driving me nutz for the past few hours. 2 modules are in the same directory. I want to be able to use them both: [code] [az@hp tst1]$ pwd /home/az/Dropbox/work/Prjs/tst1 [az@hp tst1]$ ls -l total 16 -rw-rw-r--. 1 az az 66 Jul 7 12:58 db.py -rw-rw-r--. 1 az az 182 Jul 7 15:54 uno.

Re: Proper architecture

2017-07-05 Thread Andrew Zyman
r remarks have been accepted :) Thank you very much! On Sun, Jul 2, 2017 at 8:14 PM, Cameron Simpson wrote: > On 02Jul2017 11:02, Andrew Z wrote: > >> I'd appreciate your suggestions for a better approach to the following >> task. >> >> I have 2 files ( 2 class

Re: Proper architecture

2017-07-02 Thread Andrew Zyman
Cameron, This is much more than I hoped for. >From quickly looking over - most your notes are perfectly on target. Allow sometime to digest and reply. Thank you very much! On 2 Jul 2017 8:14 p.m., "Cameron Simpson" wrote: > On 02Jul2017 11:02, Andrew Z wrote: > >

Proper architecture

2017-07-02 Thread Andrew Z
Hello, I'd appreciate your suggestions for a better approach to the following task. I have 2 files ( 2 classes). One (ClassA) has all logic related to the main workflow of the program. Another (DB), I like to offload all operations with a DB ( sql3 in this case). I'm trying to pass the connect

Re: data structure

2017-06-15 Thread Andrew Zyman
ill do for now. Thank you. On 15 Jun 2017 03:07, "Paul Barry" wrote: > Hi Andrew. > > You start by talking about a data structure, then show code that uses > "class". Not everything in Python needs to be in a class. > > I'd look at using a simple D

data structure

2017-06-14 Thread Andrew Zyman
Hello, i wonder what would be a proper data structure for something with the following characteristics: id - number, obj[a..c] - objects of various classes the idea is to be able to update certain fields of these objects initially getting access to the record by ID something like this ( not wor

Python subprocess error win 10

2017-05-19 Thread Havalda Andrew
would be grateful if you would help me solve this embarrassing problem. I look forward to hearing from you as soon as possible. Yours faithfully, Andrew Havalda -- https://mail.python.org/mailman/listinfo/python-list

FW: Python win 10 problem

2017-05-19 Thread Andrew Havalda
Sent from Mail for Windows 10 From: Havalda Andrew Sent: 2017. május 18., csütörtök 19:56 To: python-list@python.org Subject: Python win 10 problem Dear Python team, I have encountered a problem with Python 3.6 version, when I open IDLE it sais: "Subprocess startup error". I attach

  1   2   3   4   5   6   7   8   9   10   >