Re: [Tutor] Finding unique strings.

2019-05-03 Thread Roger B. Atkins
It would probably make things easier if you specified your operating system, Python version, data file type and location. Typically, the bank info would be downloadable as a CSV (comma separated value) file. Assuming that to be the case, and assuming you are using Windows, and assuming Python 3, a

[Tutor] str.replace error

2019-04-25 Thread Roger Lea Scherer
I get an error: Traceback (most recent call last): File "somefile", line 7, in str.replace(a, "") TypeError: replace() takes at least 2 arguments (1 given) But I think I have 2 arguments: a being the "old" argument as per the documentation, "" bei

Re: [Tutor] OT: A bit of humor related to my sporadic quest to learn Python

2019-01-13 Thread Roger B. Atkins
Ditto, but the angle is steeper, I've lost my climbing equipment, and the volcano is erupting. On Sun, Jan 13, 2019 at 5:44 PM boB Stepp wrote: > My son sent me this link, which I think captures my situation with > Python quite nicely: > > https://cdn-images-1.medium.com/max/720/1*7RZKI-g4K_syDf

Re: [Tutor] I think I've broken my Python

2018-11-12 Thread Roger B. Atkins
What about installing or reinstalling Django using the python version that produced the error message? On Mon, Nov 12, 2018 at 10:10 AM Matthew Ngaha wrote: > > On Mon, Nov 12, 2018 at 3:31 PM Mats Wichmann wrote: > > > > Reconstruct the virtualenv you want maybe? Their whole concept is that > >

Re: [Tutor] Request for help with code

2018-11-07 Thread Roger B. Atkins
Gmail: Click Compose (Upper Left corner) Window opens. In lower right corner within the compose window, click on the 3 stacked dots. Select text only. On Wed, Nov 7, 2018 at 1:39 AM Adam Eyring wrote: > > When I post code with questions, I just copy and paste from Python IDLE > 3.6. Colors are rem

Re: [Tutor] Installing python

2018-11-04 Thread Roger B. Atkins
environment. On Sat, Nov 3, 2018 at 7:39 AM Mats Wichmann wrote: > > On 11/2/18 10:01 PM, Roger B. Atkins wrote: > > Okay, but what about the virtual environments? Once the Windows 10 > > path environment variable has a version of Python added to it, Windows > > will find it (I am us

Re: [Tutor] Installing python

2018-11-03 Thread Roger B. Atkins
Okay, but what about the virtual environments? Once the Windows 10 path environment variable has a version of Python added to it, Windows will find it (I am using Win 10), but will it be found from within any given virtual environment (venv), regardless of which version created the environment? And

[Tutor] Installing python

2018-11-02 Thread Roger Lea Scherer
Hey, I have installed python 3.7 on my computer Windows10 (C:\Users\Roger\AppData\Local\Programs\Python\Python37), but when I go to the git repository that holds all my projects and type "python --version" in WindowsPowershell, I get Python 3.6.5. So I guess my question is am I s

[Tutor] pip install

2018-10-16 Thread Roger Lea Scherer
s to be related to python somehow although I'm a little foggy about that. If this is not the forum please tell me where to go (be nice). Thank you. -- Roger Lea Scherer 623.255.7719 *Strengths:* Input, Strategic, Responsibility, Learner, Ideation __

[Tutor] Numpy documentation

2018-10-04 Thread Roger Lea Scherer
nk you for your help as always. -- Roger Lea Scherer 623.255.7719 *Strengths:* Input, Strategic, Responsibility, Learner, Ideation ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Running programs that import 3rd party packages installed using pip.

2018-10-04 Thread Roger B. Atkins
3:32:41) [MSC v.1900 64 bit (AMD64)]' In [5]: sys.platform Out[5]: 'win32' I'll have to do more research to figure out which folders I need to add given that '\site-packages' is already included, but at least I won't be looking at the wrong path variable. O

Re: [Tutor] Running programs that import 3rd party packages installed using pip.

2018-10-04 Thread Roger B. Atkins
Thanks! That helps. I'll have to go back to the drawing board, but you've put me on the right "path". On Thu, Oct 4, 2018 at 12:47 AM Alan Gauld via Tutor wrote: > > On 04/10/18 04:20, Roger B. Atkins wrote: > > System: Windows 10, Anaconda, Python 3, Spyder3 &g

[Tutor] Running programs that import 3rd party packages installed using pip.

2018-10-04 Thread Roger B. Atkins
System: Windows 10, Anaconda, Python 3, Spyder3 Problem: Running programs that import requests, pyperclip, bs4 and/or other modules from 3rd party packages works fine within Spyder IDE, but not from command line, or Win/R. The error message indicates no such module. Therefore, my programs crash a

[Tutor] IDLE

2018-09-11 Thread Roger Lea Scherer
IDLE/Shell. And I can't for the life of me remember how I originally got the Python 3.6.5 Shell. Thank you -- Roger Lea Scherer 623.255.7719 *Strengths:* Input, Strategic, Responsibility, Learner, Ideation ___ Tutor mai

Re: [Tutor] localhosting

2018-09-06 Thread Roger Lea Scherer
ge in PowerShell: 127.0.0.1 - - [06/Sep/2018 11:22:46] "GET /cgi-bin/hello.py HTTP/1.1" 200 - 127.0.0.1 - - [06/Sep/2018 11:22:46] command: C:\Users\Roger\AppData\Local\Programs\Python\Python37-32\python.exe -u C:\Users\Roger\documents\roger\python\www\cgi-bin\hello.py "" 127.

[Tutor] localhosting

2018-08-30 Thread Roger Lea Scherer
have python3 because I run python3.6 shell practically every day. I've looked in the Program Files folder, came up empty as far as python is concerned, but I don't know where else to look? Or if this is not the correct forum, can you please (re)direct me to the correct one? Thank y

[Tutor] Accessing a tuple of a dictionary's value

2018-08-22 Thread Roger Lea Scherer
t find a way to access the 1 or the 2 in the dictionary key:value pair {0.5: [1, 2]} Thank you for your help. -- Roger Lea Scherer 623.255.7719 *Strengths:* Input, Strategic, Responsibility, Learner, Ideation ___ Tutor maillist - T

[Tutor] Removing duplicates

2018-08-02 Thread Roger Lea Scherer
sortedFrac[i-1][0]: # so if the float equals the previous float sortedFrac.pop(sortedFrac[i][0]) # remove the second float else: sortedFrac.append(sortedFrac[i][0]) except ValueError: continue -- Roger Lea Scherer 623.255.7719

[Tutor] Recursion

2018-06-18 Thread Roger Lea Scherer
ge") t.right(20) t.backward(branchLen) t.pencolor("green") def main(): t = turtle.Turtle() myWin = turtle.Screen() t.speed(0) t.left(90) t.up() t.backward(100) t.down() t.color("green") tree(75, 20, t) myWi

Re: [Tutor] Iteration issues

2018-06-07 Thread Roger Lea Scherer
ebsite, so many things seem so promising, but I just can't get them to work nor figure out why they won't. I've started from scratch again. ** import string gettysburg = open("C:/Users/Roger/Documents/GitHub/LaunchCode/gettysburg.txt", "r") puncle

[Tutor] Turtle drawing

2018-06-05 Thread Roger Lea Scherer
tle.Screen() # Set up the window and its attributes wn.bgcolor("beige") hadir = turtle.Turtle() # create hadir hadir.color('orange') hadir.speed(0) datums = open("C:/Users/Roger/Documents/GitHub/LaunchCode/mystery.txt", "r") for aline in datums:

[Tutor] Iteration issues

2018-05-10 Thread Roger Lea Scherer
'berens': 1} [''] {'to': 1, 'berens': 1, '': 1} This eBook is for the use of anyone anywhere at no cost and with ['this', 'ebook', 'is', 'for', 'the', 'use', 'of', 'anyone', 'anywhere', 'at', 'no', 'cost', 'and', 'with'] {'to': 1, 'berens': 1, '': 1, 'with': 1} Thank you as always. -- Roger Lea Scherer 623.255.7719 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] beginning encryption

2018-04-19 Thread Roger Lea Scherer
pos = alphabet.index(char) encrypted += encryption[pos] print(encrypted) encryptor(address) -- Roger Lea Scherer 623.255.7719 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Return problems

2018-04-07 Thread Roger Lea Scherer
def findHypot(a, b): c = math.sqrt((a ** 2) + (b ** 2)) if c == (round(c)): return round(c) else: return round(c, 4) findHypot(3, 4) from the IDE: = RESTART: C:\Users\Roger\Documents\GitHub\LaunchCode\hypotenuse.py = >>> Thank you as always. -- R

[Tutor] Turtle color question

2018-03-29 Thread Roger Lea Scherer
ackground. So I assigned a variable and printed that variable which says None. See: RESTART: C:/Users/Roger/AppData/Local/Programs/Python/Python36/turtle square draw.py None >>> Removing " color = " doesn't change the outcome. I hope this adequately explains things.Thanks, a

[Tutor] Pi approximation

2018-03-28 Thread Roger Lea Scherer
g + h + i + j + k + l print(1/m) print(math.pi) -- Roger Lea Scherer 623.255.7719 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Polygon fill in turtle

2018-03-27 Thread Roger Lea Scherer
"And what color would you like to fill it with? ") hadir.begin_fill() hadir.color(outlineColor) print(filler) for i in range(sides): hadir.forward(length) hadir.left(360 / sides) hadir.up() hadir.end_fill() Thanks, as always. -- Roger Lea Scherer 623.255.7719 _

[Tutor] Turtle Issues

2018-03-06 Thread Roger Lea Scherer
I know I don't have to apologize, but I am so independent I hate asking for help and you guys and gals have been so helpful that now that I'm stuck again I'm sorry I have to. I've looked on StackOverflow and followed their advice (which I can't make work) and went to the python/turtle documentation

[Tutor] Another question, dictionaries

2018-03-02 Thread Roger Lea Scherer
I'm trying to finish chapter 5 in my book and it has to do with dictionaries and creating simple games. We need a pool of points and the ability to exchange point between the pool and each of the, what I call, attributes of Strength, Health, Wisdom, and Dexterity. I got only to the first option and

[Tutor] Regex not working as desired

2018-02-26 Thread Roger Lea Scherer
: RESTART: C:\Users\Roger\Documents\GitHub\ciphers\cipher1.py Please enter an integer less than 10,000 greater than 0: 4jkk33 No match >>> RESTART: C:\Users\Roger\Documents\GitHub\ciphers\cipher1.py Please enter an integer less than 10,000 greater than 0: 4k33

[Tutor] xlrd has no attribute

2018-01-11 Thread Roger Lea Scherer
t_sheet.row_values(0)) # read a cell cell = first_sheet.cell(0,0) print(cell) print(cell.value) open_file("C:/Users/Roger/Documents/Roger/archive/area codes.xls") But I get an error: Traceback (most recent call last): File "C:\Users\Roger\Documents\Roger\Python\xlrd.

[Tutor] Floating decimal question

2017-12-18 Thread Roger Lea Scherer
This is my first time in this "forum", please be patient I will do my best. As I was going through a book and came across this challenge, I did what I believe was a success. And I know there are ways of making the decimal place be limited to 2 places, but my question is more of understanding why t

[Tutor] python problems on android

2014-01-03 Thread Roger
Hi. I wrote a few python programs and had them running on my phone up to last september. Haven't had time to work on them again till now. Only now, they... don't work ! Not sure why and its very frustrating. one of the errors is in response to an input request like this g = input ("type h to use

[Tutor] sqlite search

2013-01-25 Thread Roger
Hello, I am very new to python. Wrote a small program to use on my android phone using pickle/shelve to access data. That worked fine but i realised it would be better to use sqlite as a database to more easily modify the data. I havent got a clue about sqlite, have a book but cant find the ans

[Tutor] sqlite search syntax

2013-01-18 Thread Roger Shaw
Hello, I am very new to python. Wrote a small program to use on my android phone using pickle/shelve to access data. That worked fine but i realised it would be better to use sqlite as a database to more easily modify the data. I havent got a clue about sqlite, have a book but cant find

[Tutor] ADO with python 2.6 without additional installs

2012-04-10 Thread Bakkestuen Roger
ns or even sample code? Best regards Roger Bakkestuen Norwegian Public Roads Administration Eastern Region - Geodata Post adress: Statens vegvesen Region øst, Postboks 1010, 2605 LILLEHAMMER Office adress: Industrigaten 17, LILLEHAMMER Phone: +47 61271236 Mobile: +47 94833636 e-mail: roger.ba

Re: [Tutor] python function to know the path of the program in execution * *

2010-02-05 Thread Rohit Roger$
tps://www.boxbe.com/anno?tc=1530328725_1435846689&disp=b> | Block > domain <https://www.boxbe.com/anno?tc=1530328725_1435846689&disp=b&dom> > > > > Date: Fri, 5 Feb 2010 17:43:37 +0530 >> From: Spoorthi >> To: "Rohit Roger$" >> Cc:

Re: [Tutor] Variable: From input and output

2010-02-05 Thread Rohit Roger$
Answer: Here is the code : >>> firstname = raw_input("\n Enter your first name : ") >>> lastname = raw_input("\n Enter your last name : ") >>> print (" Printing Your Complete name.") >>> print firstname + " " + lastname Regards, Rohit On Fri, Feb 5, 2010 at 6:04 PM, Kent Johnson wro

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Rohit Roger$
ad from standard > input), path[0] is the empty string, which directs Python to search > modules in the current directory first. Notice that the script directory is > inserted before the entries inserted as a result of PYTHONPATH.* > > > On Fri, Feb 5, 2010 at 5:38 PM, Rohit Roge

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Rohit Roger$
sys.path[0] returns none On Fri, Feb 5, 2010 at 5:36 PM, Spoorthi wrote: > sys.path[0] should be serving the purpose effectively I guess > > > On Fri, Feb 5, 2010 at 5:29 PM, Rohit Roger$ wrote: > >> Answer : >> >>> import sys >> >>> rohit

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Rohit Roger$
Answer : >>> import sys >>> rohit = sys.argv[0] >>> print rohit it returns the name of the path On Fri, Feb 5, 2010 at 4:13 PM, David Hutto wrote: > Junk Score: 2 out of 10 (below your Auto Allow > threshold) > | Approve sender

[Tutor] Python and Abaqus

2009-10-20 Thread Paul Roger Leinan
Hi! Referring to http://mail.python.org/pipermail/tutor/2008-November/065270.html Would you be able to send me these python examples to? Regards Paul Leinan -- Paul Roger Leinan PhD Student Department of Structural Engineering - Biomechanics - Norwegian University of Science and Technology

Re: [Tutor] Allow only one instance of a process

2009-05-19 Thread Roger
On Sunday 17 May 2009 21:54:54 Kent Johnson wrote: > On Sat, May 16, 2009 at 10:26 PM, Sylvain Ste-Marie > > wrote: > > I'm currently writing a script to batch convert video for my psp > > > > It basically looks into a folder for video and launch ffmpeg: > > > > ffmpeg -i "videoname" -f psp -r 29.

[Tutor] [Web] Using pyCrypto - pyscard

2009-01-24 Thread Olivier Roger
Hello, I have a question concerning the use of python to make web application. I don't know if it is possible. I would like to create an applet capable of using the client smardcard (with pyscard/pyCrypto module) reader to read and display the contained data on the page. I already have a simple p

[Tutor] Program Specification Request

2008-01-16 Thread Roger Maxwell
Hi all: 1st post! Have been lurker 4 some time. Thanks to all. I am new to Python and a former DOS Clipper programmer. I would like to learn and teach my 2 girls a mini database GUI program in Python and They are Girl Scouts (and advanced MS & HS students) It is, almost, (19 Jan

Re: [Tutor] curses delwin functionality?

2005-12-29 Thread Roger Merchberger
y what your looking for, but if not, try here: http://heather.cs.ucdavis.edu/~matloff/Python/PyCurses.pdf Google is your friend! ;-) HTH, Roger "Merch" Merchberger -- Roger "Merch" Merchberger -- SysAdmin, Iceberg Computers [EMAIL PROTECTED] Hi! I am a .signat

Re: [Tutor] Does a module for DirectFB exist?

2005-11-11 Thread Roger Merchberger
Rumor has it that Roger Merchberger may have mentioned these words: >DirectFB is short for Direct Frame Buffer, and allows access to a graphical >frame buffer system in *nix (and I think maybe MacOSX) from a text prompt >without going through X. > >Anyone know of a module to acce

[Tutor] Does a module for DirectFB exist?

2005-11-01 Thread Roger Merchberger
knew about something along these lines. Thanks, Roger "Merch" Merchberger -- Roger "Merch" Merchberger | A new truth in advertising slogan SysAdmin, Iceberg Computers | for MicroSoft: "We're not the oxy... [EMAIL PROTECTED]

[Tutor] removal

2005-08-03 Thread Roger Sell
Please remove from the Tutor recipient list. Thanks, Roger Sell ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Corrupt files

2005-08-02 Thread Roger Merchberger
=-=-= snip here =-=-=-=-=-=-= Just put an 'openzip' or 'openjpg' type of function for each type of file you'll need to authenticate. [[ This code will *not* run -- it certainly won't run in Eudora (where it's being typed), so it's only for showing the

Re: [Tutor] Building an SQL query

2005-06-02 Thread Roger Merchberger
#x27;s no 'default behavior' -- if it's not defined, it can be spit out in any order it chooses; prolly depends on the implementation. It might also matter how the indices & primary keys are set up as to what comes out first... > but maybe it has >knowledge of the Po

Re: [Tutor] better resolution on time.sleep()?

2005-05-26 Thread Roger Merchberger
trying the usleep implementation in wxPython -- well, I couldn't get the rascal compiled on my old Linux From Scratch version 4 installation (my main working Linux for that laptop) no matter what I turned off in .configure... I guess I should prioritize my LFS6 install a bit higher. ;-) Thanks o

Re: [Tutor] better resolution on time.sleep()?

2005-05-23 Thread Roger Merchberger
Rumor has it that Roger Merchberger may have mentioned these words: Yea, yea, I'm replying my own message you'll see why later! ;-) >Rumor has it that [EMAIL PROTECTED] may have mentioned these words: > >I just did some experimenting ... I am running ActiveState Py

Re: [Tutor] better resolution on time.sleep()?

2005-05-23 Thread Roger Merchberger
Rumor has it that [EMAIL PROTECTED] may have mentioned these words: >Quoting Roger Merchberger <[EMAIL PROTECTED]>: > > > I really only need between 500 and 1000 samples per second, but as the > > smallest sleep available normally is time.sleep(.01) -- which brings my >

[Tutor] better resolution on time.sleep()?

2005-05-23 Thread Roger Merchberger
x27;s been on the back of my mind... [[ Oh, I found a reference to wxwindows that might have something that could work, but I was hoping for a little less overkill... my app barely uses ncurses. ]] Thanks! Roger "Merch" Merchberger -- Roger "Merch" Merchberger -- SysAdmin,

Re: [Tutor] counting no of words

2005-01-20 Thread Roger Merchberger
enOffice solution should work equally well on either platform. HTH, Roger "Merch" Merchberger -- Roger "Merch" Merchberger -- SysAdmin, Iceberg Computers [EMAIL PROTECTED] Hi! I am a .signature virus. Copy me into your .signature to join in! __

Re: [Tutor] O.T.

2004-12-29 Thread Roger Merchberger
I'm interested in making it "suck less," therefore, I'm interested in construction. ;-) Happy Hollydaze, Roger "Merch" Merchberger -- Roger "Merch" Merchberger -- SysAdmin, Iceberg Computers [EMAIL PROTECTED] Hi! I am a .signature virus. Copy me into yo

Re: [Tutor] What am I doing wrong...

2004-12-23 Thread Roger Merchberger
'__main__': main() ### Now the program is done. ;-) Hope this Helps! Roger "Merch" Merchberger -- Roger "Merch" Merchberger | Anarchy doesn't scale well. -- Me [EMAIL PROTECTED] | SysAdmin, Iceberg Computers ___ Tut

Re: [Tutor] silly question

2004-12-22 Thread Roger Merchberger
variable name is not a good idea, as it's a reserved word, if I'm not mistaken. Consider this snippet: Python 2.2.2 (#1, Feb 24 2003, 19:13:11) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2 Type "help", "copyright", "credits" or "license"

RE: [Tutor] Popen? or something else

2004-12-22 Thread Roger Merchberger
Rumor has it that Ertl, John may have mentioned these words: Roger, I have been doing it the Pythonic way (that is why I have no idea about how Popen works) but I need to make sure (the systems guys called me on it) I use the same dtg as everyone else...it is possible (has not happened yet in 20

Re: [Tutor] Popen? or something else

2004-12-22 Thread Roger Merchberger
212 If you wanted to use popen, it would look rather like this: import os dtg_s = os.popen("/path/to/dtg").readlines()[0] But this may use more system resources (spawning child shells & whatnot) than doing everything internally with the time module in Python. HTH, Roger "Merch&qu