[Tutor] list of tutors for python

2011-01-21 Thread bruce
Hi guys. Please don't slam me!! I'm working on a project, looking for a pretty good number of pythonistas. Trying to find resources that I should look to to find them, and thought I would try here for suggestions. Any comments would be appreciated. Thanks

[Tutor] multi-threaded/parallel processing - local tutor

2011-01-22 Thread bruce
Hi. I'm working on a project that uses python to spawn/create multiple threads, to run parallel processes to fetch data from websites. I'm looking to (if possible) go over this in person with someone in the San Fran area. Lunch/beer/oj can be on me!! It's a little too complex to try to describe h

Re: [Tutor] multi-threaded/parallel processing - local tutor

2011-01-23 Thread bruce
3.x --- http://docs.python.org/dev/library/multiprocessing.html > > > On 23-Jan-2011, at 11:46 AM, bruce wrote: > >> Hi. >> >> I'm working on a project that uses python to spawn/create multiple >> threads, to run parallel processes to fetch data from websites. I'm >&

[Tutor] list issue.. i think

2011-12-22 Thread bruce
hi. got a test where i have multiple lists with key/values. trying to figure out how to do a join/multiply, or whatever python calls it, where i have a series of resulting lists/dicts that look like the following.. the number of lists/rows is dynamic.. the size of the list/rows will also be dynam

[Tutor] generating unique set of dicts from a list of dicts

2012-01-10 Thread bruce
trying to figure out how to generate a unique set of dicts from a json/list of dicts. initial list ::: [{"pStart1a": {"termVal":"1122","termMenu":"CLASS_SRCH_WRK2_STRM","instVal":"OSUSI", "instMenu":"CLASS_SRCH_WRK2_INSTITUTION","goBtn":"CLASS_SRCH_WRK2_SSR_PB_SRCH", "pagechk":"CLASS_SRCH_WRK2_SS

[Tutor] Parsing/Crawling test College Class Site.

2015-06-01 Thread bruce
Hi. I'm creating a test py app to do a quick crawl of a couple of pages of a psoft class schedule site. Before I start asking questions/pasting/posting code... I wanted to know if this is the kind of thing that can/should be here.. The real issues I'm facing aren't so much pythonic as much as prob

[Tutor] aws/cloud questions..

2015-08-28 Thread bruce
Evening group! Hope wee'all doing well, having fun. yada yada..!! I'm considering taking a dive into the "cloud" with an app that would be comprised of distributed machines, running py apps, talking to db on different server(s), etc.. So, I was wondering if anyone has good docs/tutorials/walk th

[Tutor] generate a list/dict with a dynamic name..

2015-09-27 Thread bruce
Hi. I can do a basic a=[] to generate a simple list.. i can do a a="aa"+bb" how can i do a a=[] where a would have the value of "aabb" in other words, generate a list/dict with a dynamically generated name IRC replies have been "don't do it".. or it's bad.. but no one has said you can do it

Re: [Tutor] Scraping Wikipedia Table (The retruned file is empty)

2015-10-27 Thread bruce
my $0.02 for what it might be worth.. You have some people on the list who are straight out begineers who might be doing cut/copy/paste from 'bad code'. You have people coming from other languages.. and then you have some who are trying to 'get through' something, who aren't trying to be the dev

[Tutor] ncurses question

2015-10-30 Thread bruce
Hi. Looking over various sites on ncurses. Curious. I see various chunks of code for creating multiple windows.. But I haven't seen any kind of example that shows how to 'move' or switch between multiple windows. Anyone have any code sample, or any tutorial/site that you could point me to! I'm t

[Tutor] ascii to/from AL32UTF8 conversion

2015-11-22 Thread bruce
Hi. Doing a 'simple' test with linux command line curl, as well as pycurl to fetch a page from a server. The page has a charset of >>AL32UTF8. Anyway to conert this to straight ascii. Python is throwing a notice/error on the charset in another part of the test.. The target site is US based, so

Re: [Tutor] Beautiful Soup

2015-12-13 Thread bruce
Hey Crusier/ (And Others...) For your site... As Alan mentioned, its a mix of html/jscript/etc.. So, you're going (or perhaps should) need to extract just the json/struct that you need, and then go from there. I speak of experience, as I've had to hande a number of sites that are essentially jus

Re: [Tutor] parser recommendations (was Re: Tutor Digest, Vol 142, Issue 11)

2015-12-14 Thread bruce
beautifulsoup, selenium + PhantomJS, and dryscrape no knowledge of dryscape, never used it. The other tools/apps are used to handle/parse html/websites. Ssoup can handle xml/html as well as other input structs. Good for being able to parse the resulting struct/dom to extract data, or to change/m

[Tutor] idle??

2016-01-08 Thread bruce
Hey guys/gals - list readers Recently came across someone here mentioning IDLE!! -- not knowing this. I hit google for a look. Is IDLE essentially an ide for doing py dev? I see there's a windows/linux (rpms) for it. I'm running py.. I normally do $$python to pop up the py env for quick tests..

Re: [Tutor] idle??

2016-01-08 Thread bruce
ppreciated!! On Fri, Jan 8, 2016 at 6:42 PM, Alan Gauld wrote: > On 08/01/16 19:07, bruce wrote: > >> Is IDLE essentially an ide for doing py dev? I see there's a >> windows/linux (rpms) for it. > > Yes, its the official IDE for Python. > > There is an "

Re: [Tutor] Creating a webcrawler

2016-01-09 Thread bruce
Hi Isac. I'm not going to get into the pythonic stuff.. People on the list are way better than I. I've been doing a chunk of crawling, it's not too bad, depending on what you're trying to accomplish and the site you're targeting. So, no offense, but I'm going to treat you like a 6 year old (goog

[Tutor] really basic - finding multiline chunk within larger chunk

2016-02-16 Thread bruce
Hi. I've got a test, where I have a chunk of text "a" and a subset of text "s2a". the subset is multiline. For some reason, can't seem to return true on the find. I've pasted in http://fpaste.org/323521/, but the following is an example as well. (not sure if the psuedo code listed actually shows

Re: [Tutor] really basic - finding multiline chunk within larger chunk

2016-02-17 Thread bruce
hmm... Ok. For some reason, it appears to be a whitespace issue, which is what I thought. The basic process that was used to get the subchunk to test for, was to actually do a copy/cut/paste of the subtext from the master text, and then to write the code to test. Yeah, testing for "text" with w

[Tutor] Py/selenium bindings

2016-02-28 Thread bruce
Hi. This might be a bit beyond the group, but I figured no harm/no foul. I'm looking to access a site that's generated via javascript. The jscript of the site is invoked via the browser, generating the displayed content. I'm testing using py/selenium bindings as docs indicate that the py/seleniu

[Tutor] simple regex question

2016-05-01 Thread bruce
Hi. I have a chunk of text code, which has multiple lines. I'd like to do a regex, find a pattern, and in the line that matches the pattern, mod the line. Sounds simple. I've created a test regex. However, after spending time/google.. can't quite figure out how to then get the "complete" line con

[Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-06 Thread bruce
Hi. Saw the decorator thread earlier.. didn't want to pollute it. I know, I could google! But, what are decorators, why are decorators? who decided you needed them! Thanks! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription o

Re: [Tutor] Unable to download , using Beautifulsoup

2016-07-29 Thread bruce
In following up/on what Walter said. If the browser without cookies/javascript enabled doesn't generate the content, you need to have a different approach. The most "complete" is the use of a headless browser. However, the use/implementation of a headless browser has its' own share of issues. Spe

Re: [Tutor] Unable to download , using Beautifulsoup

2016-07-29 Thread bruce
adverts, prob not a cool thing to do, no matter what tools are used. On Fri, Jul 29, 2016 at 6:59 PM, Alan Gauld via Tutor wrote: > On 29/07/16 23:10, bruce wrote: > > > The most "complete" is the use of a headless browser. However, the > > use/implementation of

[Tutor] unicode decode/encode issue

2016-09-26 Thread bruce
Hi. Ive got a "basic" situation that should be simpl. So it must be a user (me) issue! I've got a page from a web fetch. I'm simply trying to go from utf-8 to ascii. I'm not worried about any cruft that might get stripped out as the data is generated from a us site. (It's a college/class dataset

Re: [Tutor] unicode decode/encode issue

2016-09-26 Thread bruce
of the above ines should be able to be removed, and still have the unicode issue resolved. Thanks On Mon, Sep 26, 2016 at 1:54 PM, Peter Otten <__pete...@web.de> wrote: > bruce wrote: > > > Hi. > > > > Ive got a "basic" situation that should be simpl. So it

[Tutor] xpath - html entities issue -- &

2016-10-04 Thread bruce
Hi. Just realized I might have a prob with testing a crawl. I get a page of data via a basic curl. The returned data is html/charset-utf-8. I did a quick replace ('&','&') and it replaced the '&' as desired. So the content only had '&' in it.. I then did a parseString/xpath to extract what I wa

[Tutor] selenium bindings...

2016-10-18 Thread bruce
Hi. This is prob way off topic. Looking at web examples from different sites for selenium/python bindings. Basically, trying to get an understanding of how to get the "page" content of a page, after an implicit/explicit wait. I can see how to get an element, but can't see any site that describes

[Tutor] a bit off topic.. - more of a high level arch question!

2016-10-21 Thread bruce
Hi. Thinking of a situation where I have two "processes" running. They each want to operate on a list of files in the dir on a first come first operate basis. Once a process finishes with the file, it deletes it. Only one process operates on a file. I'm curious for ideas/thoughts. As far as I c

[Tutor] implementing sed - termination error

2016-11-01 Thread bruce
Hi Running a test on a linux box, with python. Trying to do a search/replace over a file, for a given string, and replacing the string with a chunk of text that has multiple lines. >From the cmdline, using sed, no prob. however, implementing sed, runs into issues, that result in a "termination e

[Tutor] trying to parse an xml file

2013-12-14 Thread bruce
Hi. Looking at a file -->> http://www.marquette.edu/mucentral/registrar/snapshot/fall13/xml/BIOL_bysubject.xml The file is generated via online/web url, and appears to be XML. However, when I use elementtree: document = ElementTree.parse( '/apps/parseapp2/testxml.xml' ) I get an invalid error

Re: [Tutor] Python Question

2014-01-11 Thread bruce
hey amy.. ok.. before we jump to coding (and forgive me if what I'm about to type is really basic!) let's play a bit with what's called psuedo-code. psuedo-code is a technique to kind of put your thoughts about a problem/approach in a hash of code/english.. kind of lets you lay out what you're tr

[Tutor] cdata/aml question..

2014-04-12 Thread bruce
Hi. The following text contains sample data. I'm simply trying to parse it using libxml2dom as the lib to extract data. As an example, to get the name/desc test data d = libxml2dom.parseString(s, html=1) p1="//department/name" p2="//department/desc" pcount_ = d.xpath(p1)

[Tutor] capturing errors/exceptions..

2014-08-01 Thread bruce
Hi. Really basic question!! Got a chunk of some test python, trying to figure out a quick/easy way to capture all/any errors/exceptions that get thrown.. For the test process, I need to "ensure" that I capture any/all potential errors.. -Could/Should I wrap the entire func in a try/catch when I

Re: [Tutor] capturing errors/exceptions..

2014-08-01 Thread bruce
is why I'm interested in implementing some basic "capture/display" all/any error approach to get a feel for what's happening.. On Fri, Aug 1, 2014 at 10:54 AM, Steven D'Aprano wrote: > On Fri, Aug 01, 2014 at 10:14:38AM -0400, bruce wrote: >> Hi. >> >>

[Tutor] try/exception - error block

2014-08-03 Thread bruce
Hi. I have a long running process, it generates calls to a separate py app. The py app appears to generate errors, as indicated in the /var/log/messages file for the abrtd daemon.. The errors are intermittent. So, to quickly capture all possible exceptions/errors, I decided to wrap the entire "ma

Re: [Tutor] try/exception - error block

2014-08-03 Thread bruce
eption!!! > > but thanks for the information on posting test code! Don't email me privately - respond to the list :) Also, please don't top-post. ChrisA On Sun, Aug 3, 2014 at 10:29 AM, bruce wrote: > Hi. > > I have a long running process, it generates calls to a separate py &

Re: [Tutor] try/exception - error block

2014-08-03 Thread bruce
Hi Alan. Yep, the err file in the exception block gets created. and the weird thing is it matches the time of the abrtd information in the /var/log/messages log.. Just nothing in the file! On Sun, Aug 3, 2014 at 4:01 PM, Alan Gauld wrote: > On 03/08/14 18:52, bruce wrote: > >>

Re: [Tutor] Installing twisted

2014-11-26 Thread bruce
Hey... When you get this resolved.. if you don't mind.. post the soln back here!! thanks ps. I know, not strictly a py language issue.. but might really help someone struggling to solve the same issue! On Wed, Nov 26, 2014 at 7:45 PM, Gary wrote: > Hi all, > I have been trying to install the

[Tutor] trying to convert pycurl/html to ascii

2015-03-29 Thread bruce
Hi. Doing a quick/basic pycurl test on a site and trying to convert the returned page to pure ascii. The page has the encoding line The test uses pycurl, and the StringIO to fetch the page into a str. pycurl stuff . . . foo=gg.getBuffer() -at this point, foo has the page in a str buffer. W

[Tutor] subprocess.Popen / proc.communicate issue

2017-03-30 Thread bruce
Trying to understand the "correct" way to run a sys command ("curl") and to get the potential stderr. Checking Stackoverflow (SO), implies that I should be able to use a raw/text cmd, with "shell=true". If I leave the stderr out, and just use s=proc.communicate() the test works... Any pointe

[Tutor] test

2017-03-30 Thread bruce
sent a question earlier.. and got a reply saying it was in the moderation process??? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] subprocess.Popen / proc.communicate issue

2017-03-31 Thread bruce
ing and > understanding it when looking at this kind of problem. > > Cheers, > Cameron Simpson > > > On 31Mar2017 09:43, Cameron Simpson wrote: >> >> On 30Mar2017 13:51, bruce wrote: >>> >>> Trying to understand the "correct" way t

[Tutor] using sudo pip install

2017-04-20 Thread bruce
Hey guys.. Wanted to get thoughts? On an IRC chat.. someone stated emphatically... Never do a "sudo pip install --upgrade..." The claim was that it could cause issues, enought to seriously (possibly) damage the OS.. So, is this true?? ___ Tutor maill

[Tutor] centos 7 - new setup.. weird python!

2017-07-19 Thread bruce
Hi. Testing setting up a new Cnntos7 instance. I ran python -v from the cmdline... and instantly got a bunch of the following! Pretty sure this isn't correct. Anyone able to give pointers as to what I've missed. thanks python -v # installing zipimport hook import zipimport # builtin # install

[Tutor] basic decorator question

2017-07-24 Thread bruce
Hi. I've seen sites discuss decorators, as functions that "wrap" and return functions. But, I'm sooo confuzed! My real question though, can a decorator have multiple internal functions? All the examples I've seen so far have a single internal function. And, if a decorator can have multiple inter

[Tutor] pythonic ascii decoding!

2017-07-31 Thread bruce
Hi guys. Testing getting data from a number of different US based/targeted websites. So the input data source for the most part, will be "ascii". I'm getting a few "weird" chars every now and then asn as fas as I can tell, they should be utf-8. However, the following hasn;t always worked: s=s

[Tutor] really basic question..

2017-08-05 Thread bruce
Hey guys. A really basic question. I have the following: try: element = WebDriverWait(driver, 100).until(EC.presence_of_element_located((By.ID, "remarketingStoreId"))) except TimeoutException: driver.close() I was wondering can I do something like the following to han

Re: [Tutor] really basic question..

2017-08-05 Thread bruce
Lord... redid a search just now. found a bunch of sites that said it's doable.. embarrased Not sure what I was looking for earlier.. need r u m! On Sat, Aug 5, 2017 at 11:44 AM, bruce wrote: > Hey guys. > > A really basic question. I have the following: > try:

[Tutor] really basic py/regex

2018-03-30 Thread bruce
Hi. Trying to quickly get the re.match() to extract the groups from the string. x="MATH 59900/40 [47490] - THE " The regex has to return MATH, 59900, 40,, and 47490 d=re.match(r'(\D+)...) gets the MATH... But I can't see (yet) how to get the rest of what I need... Pointers would be usefu

Re: [Tutor] [Visualpython-users] VPython and Tkinter

2009-02-04 Thread Bruce Sherwood
the Carbon-based Mac version, the application was removed from the set of examples, which are platform-independent. Bruce Sherwood Mr Gerard Kelly wrote: Is there a way to make separate VPython and Tkinter windows run simultaneously from the one program? Or to have the VPython window run

Re: [Tutor] [Visualpython-users] tkinter and visual with objects

2009-02-05 Thread Bruce Sherwood
The following works to produce a window with nothing displayed in it: ball = sphere() ball.visible = 0 Another scheme would be this: scene.range = 1 ball = sphere(radius=1e-6) The point is that Visual doesn't create a window unless there is something to display. Bruce Sherwood Mr G

[Tutor] Counting and grouping dictionary values in Python 2.7

2016-07-08 Thread Bruce Dykes
I'm compiling application logs from a bunch of servers, reading the log entries, parsing each log entry into a dictionary, and compiling all the log entries into a single list of dictionaries. At present, all I'm doing with it is writing the list of dictionaries to a .csv file, and to date, we've b

Re: [Tutor] Counting and grouping dictionary values in Python 2.7

2016-07-13 Thread Bruce Dykes
On Fri, Jul 8, 2016 at 1:33 PM, Alan Gauld via Tutor wrote: > On 08/07/16 14:22, Bruce Dykes wrote: > > > with it is writing the list of dictionaries to a .csv file, and to date, > > we've been able to get by doing some basic analysis by simply using grep > > and w

[Tutor] vol 166, issue 20, 1. installing python and numpy on the Mac (OSX) (Peter Hodges)

2017-12-24 Thread Bruce Todd Puls
sudo -H python3.6 -m pip install numpy ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] prime factorisation

2018-03-12 Thread Bruce Todd Puls
I think You would do much better if You wrote pseudo code first, i.e. write each step out in words, code is much easier to write following pseudo code Are You trying to factor Prime Numbers? Prime Number factored (Prime Number and 1) https://en.wikipedia.org/wiki/Table_of_prime_factors#1_to_100

[Tutor] libtiff--can't find library

2012-06-29 Thread R Bruce van Dover
Presumably this is a newbie question; apologies in advance, but I have spent hours trying to RTFM, to no avail. Can anyone help? I've installed pylibtiff-0.1-svn.win32.exe since I want to be able to read a TIFF file. But when I type (in IDLE) I get from libtiffimport TIFFfile, TIFFimage