Re: Beginner Tutorials

2013-01-18 Thread Joel Goldstick
get or similar methods, just not be a curious reader who is interested in the underlying html that produced the site. Messing with the reader's browser is not considered polite by many! > > In summary --- good work Rik :-) > > --V > -- > http://mail.python.org/**mailman/listinfo/p

Re: Forcing Python to detect DocumentRoot

2013-01-18 Thread Joel Goldstick
On Fri, Jan 18, 2013 at 1:58 PM, Ferrous Cranus wrote: > Τη Παρασκευή, 18 Ιανουαρίου 2013 3:28:10 μ.μ. UTC+2, ο χρήστης Joel > Goldstick έγραψε: > > > DocumentRoot = os.environ['HOME'] + 'public_html' > > Yes, iam using this and it works. > One last th

Re: Uniquely identifying each & every html template

2013-01-21 Thread Joel Goldstick
We need another way to identify the file WITHOUT using the above > attributes. > > This is a very old problem (still unsolved I believe): > http://en.wikipedia.org/wiki/Ship_of_Theseus > > > Oscar > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Uniquely identifying each & every html template

2013-01-23 Thread Joel Goldstick
th, and you would stop annoying people. I don't understand the troll thing. Its really anti social. I like the web, but this is so strange > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: using split for a string : error

2013-01-25 Thread Joel Goldstick
lding block for > other use cases. For example atoi could be defined as: > > def atoi(s): return intparse(s)[0] > > intparse("xyz") should return (0, 0), and leave it to the caller > to decide whether a ValueError shoud be raised. > > > -- HansM > > > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: sockobj.connect Errno 13 Permission denied

2013-01-26 Thread Joel Goldstick
of sockobj.connect Errno 13 Permission denied. > > Why it can run from command line, but cannot make connection from a web > file? Appreciate any tips and clues. > > Thank you. > > Kind regards. > > > > -- > http://mail.python.org/mailman/listinfo/python-list &

Re: sockobj.connect Errno 13 Permission denied

2013-01-26 Thread Joel Goldstick
On Sat, Jan 26, 2013 at 8:47 AM, Joel Goldstick wrote: > > > > On Sat, Jan 26, 2013 at 6:19 AM, nobody wrote: > >> Hi, >> >> I have a client program Client.py which has a statement of >> sockobj.connect(), the port number 6 is used, so no problem from

Re: Algorithm. Tony Gaddis book 2 Starting python3

2013-01-27 Thread Joel Goldstick
if you ask it more clearly -- perhaps quote from the book. Also, paste into your question the code you have tried and the results you have gotten. -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Formatting a column's value output

2013-01-27 Thread Joel Goldstick
ther than in a loop: > > > > > > > > data = cur.fetchall() > > > > for row in data: > > > > url = row[0] > > > > hits = row[1] > > > > print ( "" ) > > > > print( &qu

Re: security quirk

2013-01-30 Thread Joel Goldstick
; -- > > As was pointed out, this really is off topic for this group. You might try googling. The NYTimes makes articles available by adding a parameter to the tail of the url I believe -- Joel Goldstick http://joelgoldstick.com -- http://mail.python.org/mailman/listinfo/python-list

Re: help

2013-01-30 Thread Joel Goldstick
fileName = sys.argv[1] > jadeFile = open(fileName, 'r') > > for line in jadeFile: > counter = counter + 1 > execute(line) > > jadeFile.close() > > i = 0 > > while i < len(labelList): >

Re: Boolean Expressions

2017-09-28 Thread Joel Goldstick
als to 3 right ? > which > > >equals the right hand side , hence first term is True > > > > But the test is for "!=", not "==". So False. > > > > Cheers, > > Cameron Simpson (formerly c...@zip.com.au) > > Right ... I didn't see the ' =! ' > -- > You didn't see the '!=' -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use a regexp here

2017-12-04 Thread Joel Goldstick
f the line, since 'in' would still be true no matter where the desired string is placed. It would be useful to see some sample data of the old data, and the new data -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: we want python software

2017-12-05 Thread Joel Goldstick
indows 10 > > > > -- > > https://mail.python.org/mailman/listinfo/python-list > -- > https://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Python script

2017-12-07 Thread Joel Goldstick
y will help you figure out what you don't understand -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use a regexp here

2017-12-08 Thread Joel Goldstick
f the line, since 'in' would still be true no matter where the desired string is placed. It would be useful to see some sample data of the old data, and the new data -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: for info

2018-01-31 Thread Joel Goldstick
On Wed, Jan 31, 2018 at 10:55 AM, wrote: > from where we learn python for free of cost. i am begineer in python.plzz > help me > -- > https://mail.python.org/mailman/listinfo/python-list > Start with python.org tutorial pages -- Joel Goldstick http://joelgoldstick.com

Re: How to replace characters in a string?

2022-06-08 Thread Joel Goldstick
27;string with starting smart quote" >>> repr(str1) "'’string with starting smart quote'" >>> repr(new_str) '"\'string with starting smart quote"' >>> As you can see, str1 doesn't change, but when you 'replace' on it, the result you want is returned to new_str -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list

Re: ModuleNotFoundError

2022-06-17 Thread Joel Goldstick
rsion_info) and executable: > >> > > Unable to initialize device PRN > >> > > >> > That's the command-line "print" program. You need to first start the > >> > Python shell via python.exe. The prompt should change to ">>> ". Then > >> > run print(sys.version) and print(sys.executable). > >> > > >> -- > >> https://mail.python.org/mailman/listinfo/python-list > >> > > > -- > https://mail.python.org/mailman/listinfo/python-list sys is a module that is part of 'batteries included' in python. Since it is not part of the language per se, you need to import it -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list

Re: Python cannot count apparently

2021-02-07 Thread Joel Goldstick
le, or the default python interactive console? If you did, please do that again, and copy and paste your code and the results here. There is something amiss. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: How to loop over a text file (to remove tags and normalize) using Python

2021-03-10 Thread Joel Goldstick
On Tue, Mar 9, 2021 at 10:36 PM S Monzur wrote: > > Thanks! I ended up using beautiful soup to remove the html tags and create > three lists (titles of article, publications dates, main body) but am still > facing a problem where the list is not properly storing the main body. > There is something

Re: Python language packages isn't working in Visual Studio Code

2021-05-03 Thread Joel Goldstick
picture of my laptop screen too. > > Waiting for your reply > > Regards Osmany > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > -- > https://mail.python.org/mailman/listinfo/python-list Better yet, cut and paste your relevant text in your email

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

2021-08-15 Thread Joel Goldstick
ot me curious, and I found this article. The code is very similar to the pyaudio version a few responses back. https://thehackerdiary.wordpress.com/2017/06/09/it-is-ridiculously-easy-to-generate-any-audio-signal-using-python/ except it doesn't need pyaudio I run Ubuntu 20.04, and I had problems getting pyaudio on my machine. -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with python

2021-09-04 Thread Joel Goldstick
^ > SyntaxError: invalid syntax > >>> > [/code] > > What is the proper way to fix this? > > Thank you. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list

Re: All permutations from 2 lists

2022-03-02 Thread Joel Goldstick
he result seems to be an empty list, > > which IMO is a perfectly valid result. > > > > All possible permutations over two collections where one collection is > > empty, should IMO give you an empty collection. > > If one list is empty I want just the other list. Wha

Re: All permutations from 2 lists

2022-03-02 Thread Joel Goldstick
On Wed, Mar 2, 2022 at 9:01 AM Larry Martell wrote: > > On Wed, Mar 2, 2022 at 8:54 AM Joel Goldstick > wrote: > > > > On Wed, Mar 2, 2022 at 8:46 AM Larry Martell > > wrote: > > > > > > On Wed, Mar 2, 2022 at 8:37 AM Antoon Pardon wrote: > >

Re: All permutations from 2 lists

2022-03-02 Thread Joel Goldstick
. > > > > Alternatively, if you expect an empty list to imply some single default > > the the experession: > > > > the_list or (the_default,) > > > > might be of use. > > I've solved the issue. > -- > https://mail.python.org/mailman/listinfo/python-list Would you be so kind as to show the results of your solution? -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list

Re: Comparing sequences with range objects

2022-04-07 Thread Joel Goldstick
oon Pardon. > -- > https://mail.python.org/mailman/listinfo/python-list I'm not sure I understand what you are trying to do, but if your data has no order, you can use set to remove the duplicates -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list

Re: Is duck-typing misnamed?

2016-08-27 Thread Joel Goldstick
r > sounding or acting), and can still suffer socially for such reasons, this it > not funny to me. We should stick with ducks. > > -- > Terry Jan Reedy > > -- > https://mail.python.org/mailman/listinfo/python-list which ducks? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Python -Simplebool

2016-10-05 Thread Joel Goldstick
=open('mutation_result.csv','w') > if INPUT['equi_steps'] == 0: #direct mutation > output.writelines('MutNodes,MutStates,%s\n'%(','.join(INPUT['observe_list']))) > for mute_pair in mut_list: > nodes=[] > states=[] > for node,state in mute_pair: > nodes.append(node) > states.append(str(state)) > output.writelines('%s,%s,%s\n'%('/'.join(nodes),'/'.join(states),','.join(mut_result[mute_pair]))) > elif INPUT['equi_steps'] > 0: #mutation with pre-equilibration steps > out_list=[] > for node in INPUT['observe_list']: > out_list.append(node) > out_list.append(node+'(mut)') > output.writelines('MutNodes,MutStates,%s\n'%(','.join(out_list))) > for mute_pair in mut_list: > nodes=[] > states=[] > for node,state in mute_pair: > nodes.append(node) > states.append(str(state)) > result_list=[each_result for each_pair in mut_result[mute_pair] for > each_result in each_pair] # collapse results > output.writelines('%s,%s,%s\n'%('/'.join(nodes),'/'.join(states),','.join(result_list))) > output.close() > > def GenerateCombinations(INPUT): > StrBool={'True':True,'False':False} > NodeState=[] > Combine=[] > for node_list in INPUT['mutation_list']: > for node in open(node_list): > NodeState.append((node.strip(),StrBool[INPUT['keep_state'][INPUT['mutation_list'].index(node_list)]])) > if INPUT['mutation_mode']=='single': > for mute_state in NodeState: > Combine.append((mute_state,)) > return Combine > elif INPUT['mutation_mode']=='double': > for i in range(len(NodeState)): > for j in range(i+1,len(NodeState)): > if NodeState[i][0] != NodeState[j][0]: > Combine.append((NodeState[i],NodeState[j])) > print 'Total %s combinations.'%(len(Combine)) > return Combine > if __name__ == '__main__': > try: > para=ParaParser(sys.argv[1]) > except: > para=ParaParser('mutation.in') > simu_mutation(para) > > > After running this file, I got the following > error:/home/JPJ/Priya_Ph.D/simple_bool/simplebool/SimpleBool-master/BoolMutation.py > in () > 383 para=ParaParser(sys.argv[1]) > 384 except: > --> 385 para=ParaParser('mutation.in') > 386 simu_mutation(para) > > /home/JPJ/Priya_Ph.D/simple_bool/simplebool/SimpleBool-master/BoolMutation.py > in ParaParser(ParaFile) > 254 } # define parameters > 255 > --> 256 for each_line in open(ParaFile).readlines(): > 257 para_name = each_line.split('=')[0].strip() > 258 para_value = each_line.split('=')[1].strip() > > IOError: [Errno 2] No such file or directory: 'mutation.in' > > > I can't understand, the problem here. Should I specify anything in the > Boolmutation.py file. Any help would be appreciated > Thank you > Regards > Priya > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Python does not start

2016-11-17 Thread Joel Goldstick
t python. Can you be a bit more forthcoming about your issue? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: NameError

2016-11-23 Thread Joel Goldstick
; is not defined > > How to solve this error ? > -- > https://mail.python.org/mailman/listinfo/python-list have you imported pygame? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode script

2016-12-15 Thread Joel Goldstick
things could be worse.” So I cheered up, and sure > enough, things got worse. > > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: List comprehension

2016-12-30 Thread Joel Goldstick
: > [(1, 2), (3, 4)] > -- > https://mail.python.org/mailman/listinfo/python-list Thy this: >>> [(a[0], a[1]) for a in data] [(1, 2), (3, 4)] -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: List comprehension

2016-12-30 Thread Joel Goldstick
ed: >>[(1, 2), (3, 4)] > > You can try [(x,z) for x,z in data]. > In your situation a takes the values (1,2) or (3,4) in the one that I put x > and z take the tupple values (x first one z second one). > >>>> [(x,z) for x,z in data] > [(1, 2), (3, 4)] I like yours bett

Re: learning and experimenting python.

2016-12-31 Thread Joel Goldstick
tten backwards so that it appears normal in a rear view mirror. Do they do that in other countries? > -- > Wulfraed Dennis Lee Bieber AF6VN > wlfr...@ix.netcom.com HTTP://wlfraed.home.netcom.com/ > > -- > https://mail.python.org/mailman/listinfo/p

Re: learning and experimenting python.

2016-12-31 Thread Joel Goldstick
while, einstein, you will see that the group will wander off into (sometimes) interesting asides when the original question seems to have been played out. Its a form a creative ignoring. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mai

Re: Help with this code

2017-01-09 Thread Joel Goldstick
ython.org/mailman/listinfo/python-list I was confused whether the OP wanted to retain the list order. The spec seemed unclear. If not, this is a nice approach. Of course this also removes duplicate values. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Clickable hyperlinks

2017-01-09 Thread Joel Goldstick
ough you pressed on > with certain lines of comment, especially when it was pointed out that > your question came from the wrong premise and idea of what the "console" > is. I don't believe that someone pointing out flaws in your > understanding is inherently rude, th

Re: Looking for advice

2018-04-20 Thread Joel Goldstick
//mail.python.org/mailman/listinfo/python-list sqlite is a small, in memory db that comes standard with python (i'm pretty sure). Great place to start -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: syntax error (?) on ubuntu

2018-05-03 Thread Joel Goldstick
quot;, line 132 > if(PY3K): ID = ID.decode("utf-8") > ^ > TabError: inconsistent use of tabs and spaces in indentation > -- > https://mail.python.org/mailman/listinfo/python-list Check to see if you have a tab after the colon in the last line. You must u

Re: stock quotes off the web, py style

2018-05-16 Thread Joel Goldstick
171.13 > week52Low 139.13 > ytdChange -0.0485148849103 > > You would do multiple symbols in a loop which you enter with an open urllib > object, rather than opening a new one for each symbol inside the loop. > > Frederic > > -- > https://mail.python.org/mailman/listinfo/python-list Many people find the library called Requests a better alternative to urllib. It is more intuitive -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding memory location of Python variables

2018-06-16 Thread Joel Goldstick
ttps://mail.python.org/mailman/listinfo/python-list Others can probably give a more complete explanation, but small numbers, and apparently letters are cached since they are so common. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: about main()

2018-07-05 Thread Joel Goldstick
#x27; issue that I can see. > > Abdur-Rahmaan Janhangeer > https://github.com/Abdur-rahmaanJ > > * Create as many functions as you can > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseb

Re: Program to output a subset of the composite numbers

2018-08-15 Thread Joel Goldstick
bers, and you can subtract that sequence from the sequence of positive integers -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: printing to stdout

2018-08-19 Thread Joel Goldstick
data objects > > -- > richard lucassen > http://contact.xaq.nl/ > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: printing to stdout

2018-08-19 Thread Joel Goldstick
On Sun, Aug 19, 2018 at 12:16 PM Richard Lucassen wrote: > > On Sun, 19 Aug 2018 10:11:08 -0400 > Joel Goldstick wrote: > > > > Well, apparently there were quite a lot of things that makes the > > > code more readable I'd say. And even better. But it was in

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-21 Thread Joel Goldstick
Wulfraed Dennis Lee Bieber AF6VN > wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/ > > -- > https://mail.python.org/mailman/listinfo/python-list although i don't offer advice too often here, as i am kind of retired., this is extremel

Re: Help Needed : script weird result.

2018-09-01 Thread Joel Goldstick
er the numbers separated by space and press ENTER :5 90 63 82 59 24 > > 5 > > 5 > > 5 > > 5 > > 5 > > 24 > > Lowest : 24 > > > > Regards > > Mohan C > > > > > Compare, > > >>> min(5, 90, 63, 82, 59, 24)

Re: Why list.reverse() modifies the list, but name.replace() does not modify the string?

2018-09-03 Thread Joel Goldstick
? As a beginner, I find this > confusing. How do you do it? > > Thank you! > -- > https://mail.python.org/mailman/listinfo/python-list Learn about help. Go to python command line and type help(L) it will show that this method reverses in place. Type help(name) and it will show

Re: Why list.reverse() modifies the list, but name.replace() does not

2018-09-05 Thread Joel Goldstick
? As a beginner, I find this > confusing. How do you do it? > > Thank you! > -- > https://mail.python.org/mailman/listinfo/python-list Learn about help. Go to python command line and type help(L) it will show that this method reverses in place. Type help(name) and it will sho

Re: Error in installing "pyperclip" module

2018-11-10 Thread Joel Goldstick
vely monitor and help out on the Tutor list. > -- > boB > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Collection: weak error prompt drives beginner crazy

2016-04-04 Thread Joel Goldstick
e importing the file itself, rather than importing other > file or library. And how can python know that? > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Promoting Python

2016-04-05 Thread Joel Goldstick
of what color, gcol etc do someone will likely show > you > Though in all fairness I dont expect it to be as pithy as the BASIC > -- > https://mail.python.org/mailman/listinfo/python-list The color stuff has to do with DOS based 16 color displays I think. Or maybe it worked with other 16 color displays of the time -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: python script for .dat file

2016-04-05 Thread Joel Goldstick
le? and how is it different from any other file? Is it binary or text data? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: python script for .dat file

2016-04-05 Thread Joel Goldstick
On Tue, Apr 5, 2016 at 4:47 PM, Mark Lawrence via Python-list wrote: > On 05/04/2016 21:35, Michael Selik wrote: >> >> What code have you written so far? >> > > Would you please not top post on this list, it drives me nuts!!! > > A short drive? ;) -- Joel Goldst

Re: ola

2016-04-06 Thread Joel Goldstick
our question I could send the Python program spyder for Windows? is awfully vague -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Python,ping,csv

2016-04-08 Thread Joel Goldstick
nt ("ping to", address, "OK") > elif res == 2: > print ("no response from", address) > else: > print ("ping to", address, "failed!") > -- > https://mail.python.org/mailman/listinfo/python-list What do

Re: IdentationError; unexpected indent

2016-04-14 Thread Joel Goldstick
>>> > *for id, lat, lon in f:* >>> > *x, y = net.convertLonLat2XY(lon, lat)* >>> > *print(x, y)* >>> > *edges = net.getNeighboringEdges(x, y, radius)* >>> > *print (edges)* >>> > *while len(edges) == 0:* >&

Re: How to print a part of a string?

2016-04-15 Thread Joel Goldstick
> -- > https://mail.python.org/mailman/listinfo/python-list do you know how to open the file and do a for loop to get each line in the string? If you do, do you know about this: >>> s = "ABC X N" >>> s_split = s.split() >>> s_split [

Re: Fraud

2016-04-16 Thread Joel Goldstick
27;m curious as to what makes you think all this trouble was caused by python, etc. Did they leave a note? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Fraud

2016-04-16 Thread Joel Goldstick
On Sat, Apr 16, 2016 at 7:49 PM, Gene Heskett wrote: > On Saturday 16 April 2016 18:02:50 Joel Goldstick wrote: > >> On Sat, Apr 16, 2016 at 5:23 PM, Chris Angelico > wrote: >> > On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list >> > >> >

Re: read datas from sensors and plotting

2016-04-17 Thread Joel Goldstick
>> in a web server. >> Is it possible to read in the same time the values, writing in the file >> and plot them in a webpage with python? >> > > Check out plotly > > https://plot.ly/python/ > -- > https://mail.python.org/mailman/listinfo/pytho

python regex dna processing

2016-04-21 Thread Joel Goldstick
>From time to time there are DNA related question posted here. I came upon this in the hopes it may be useful to those who do that kind of software http://benchling.engineering/dna-regex-search/ -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthd

Re: from __future__ import print_function

2016-04-24 Thread Joel Goldstick
il.python.org/mailman/listinfo/python-list It lets python 2.7 use python 3.x print function instead of the 2.7 print statement. You might like some of the options, and your code will be easier to upgrade to 3.x if you decide to do that -- Joel Goldstick http://joelgoldstick.com/blog http://

Re: Howw to prevent the duplication of any value in a column within a CSV file (python)

2016-04-26 Thread Joel Goldstick
entered. If they have, the user must not be allowed to enter > this value. > > Thanks in advance! > -- > https://mail.python.org/mailman/listinfo/python-list Show your code and a few lines of your file with useful data. Show the result you want -- Joel Goldstick http://joelg

Re: online python courses

2016-04-28 Thread Joel Goldstick
hanks > -- > https://mail.python.org/mailman/listinfo/python-list Try here: http://lmgtfy.com/?q=python+online+courses#seen -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: How to fill in abbreviation in one column based on state name in another column?

2016-04-30 Thread Joel Goldstick
: "MH", "WYOMING": "WY", "OHIO": "OH", "SOUTH CAROLINA": "SC", "INDIANA": "IN", "NEVADA": "NV", "LOUISIANA": "LA", "NORTHERN MARIANA ISLANDS": "MP", "NEBRASKA": "NE", "ARIZONA": "AZ", "WISCONSIN": "WI", "NORTH DAKOTA": "ND", "Armed Forces Europe": "AE", "PENNSYLVANIA": "PA", "OKLAHOMA": "OK", "KENTUCKY": "KY", "RHODE ISLAND": "RI", "DISTRICT OF COLUMBIA": "DC", "ARKANSAS": "AR", "MISSOURI": "MO", "TEXAS": "TX", "MAINE": "ME"} > #table['moa_state_name'] = map(lambda x: x.upper(), > table['moa_state_name'])def convert_state(row):abbrev1 = > state_to_code(table['moa_state_name']) #'aatest'if abbrev1: > return abbrev1 ##state_to_code[abbrev[0]]return np.nan#print > convert_state(table['moa_state_name']) > table.insert(0, "abbrev", np.nan)table['abbrev'] = table.apply(convert_state, > axis=1) > print state_to_code['ARKANSAS'] > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: pylint woes

2016-05-08 Thread Joel Goldstick
ties, states, zipcodes = [], [], [], [] >> for word in addr: >> items = word.split(',') >> streets.append(items[0]) >> cities.append(items[1].strip()) >> states.append(word[-8:-2]) >> zipcodes.append(word[-5:]) > > > > > That's a good one. > > Chris Angelico mentioned something like that, too, and I already put it > place. > > > >> Oh, and use better names. "street" is a single street, not a list of >> streets, note plural. > > > > I'll use whatever names I like. > > > > > > -- > https://mail.python.org/mailman/listinfo/python-list Starting to look like trolling. Lots of good advice here. If you ask, and don't like the advice, don't use it. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?

2016-05-08 Thread Joel Goldstick
t your view, do what you like. It depends upon what problems you want to fight. If you adhere to standards, your code is more easily reviewed and easier to get help from others, if that is what you ask. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: An educational site written in Python (from YCombinator's RFS)

2016-05-10 Thread Joel Goldstick
such a site ? This is a big project, but one that is worth > doing ... Any suggestions / help appreciated ? Thanks alot > > > Gengyang > -- > https://mail.python.org/mailman/listinfo/python-list I'm not sure there is a question here. Good luck with your quest -- Joel Go

Re: How to get a directory list sorted by date?

2016-05-15 Thread Joel Goldstick
ime >>> >>> def sd_sorted_dir(folder): >>> return sorted(os.scandir(folder), key=_getmtime, reverse=True) >> >> unless sorted() returns a lazy sorter, > > What's a lazy sorter? Some postal workers? just kidding > > -- > Grant > > -- > h

Re: python for complte program ?

2016-05-20 Thread Joel Goldstick
tem, you may not need to do this -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: ValueError: I/O operation on closed file

2016-05-25 Thread Joel Goldstick
gt; Thanks in Advance. > san > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Self Learning Fortran Programming

2016-05-31 Thread Joel Goldstick
s, websites, > video lectures, your personnel tips, etc. In addition, you may also add some > extra suggestions for shell script writing as well. You may recommend for > both Linux and Windows operating systems. > > Looking for your posts. > > Thank you. > -- > https:/

Re: Python on Windows with linux environment

2016-06-02 Thread Joel Goldstick
nclude a bash shell, presumably with the package management of Ubuntu (debian), with pip goodness and virtualenv and virtualenvwrapper. That route should make W10 and linux (ubuntu) nearly identical environments to deal with -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: reshape and keep x,y,z ordering

2016-06-07 Thread Joel Goldstick
pe would keep x,y,z ordering that > would not require transpose? and if there is a better more efficient way to > do this? > > Thanks alot, > -- > https://mail.python.org/mailman/listinfo/python-list Sorry, I can't help, others may be able to help you here. But there

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-10 Thread Joel Goldstick
> # DO WHAT WE CAME TO DO > # IT'S PROBABLY BAD FORM TO REFERENCE GLOBAL VARIABLES INSIDE THE SCOPE > OF A FUNCTION? > # BUT I WANT TO MAKE IT EASY TO CONFIGURE THE SCRIPT JUST BY CHANGING A > COUPLE OF LINES > # AT THE TOP, WITHOUT HAVING TO SEAR

Re: is there a big in python 3.5.1 shell?

2016-06-12 Thread Joel Goldstick
s 10 > > -- > https://mail.python.org/mailman/listinfo/python-list Welcome. You can't do attachments in this list. Most people won't see them. Just cut and paste your code in your text -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: log file.

2016-06-14 Thread Joel Goldstick
, those prints will show on your screen. If you want to save them to a log file do this: python my_program.py >> my_log_file.log When your program ends, open up my_log_file.log to see what happened. The two > characters will write to the file if it is new, or append to the file if it

Re: GoPiGo distence sensor

2016-06-15 Thread Joel Goldstick
Api functions for the GoPiGo are here: > http://www.dexterindustries.com/GoPiGo/programming/python-programming-for-the-raspberry-pi-gopigo/ > > Can someone help me with this. > > -- > https://mail.python.org/mailman/listinfo/python-list You can start here: https://www.python.

Re: GoPiGo distence sensor

2016-06-15 Thread Joel Goldstick
the robot has been at > that distance for that many ticks. (If it checks every second and the > counter reaches 5, then it has been at that distance for 5 seconds ... > approximately ...) > > -- > https://mail.python.org/mailman/listinfo/python-list This reminds me of a

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Joel Goldstick
rsonally love vim. But its clearly an acquired taste. When you get good at it its pretty amazing -- and no mouse. The other thing about vim is that it is on every linux system, so you don't have to load your editor if you are ssh-ing to some machine -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: the global keyword:

2016-06-19 Thread Joel Goldstick
problems seem to want to use them, and then become baffled at the problems they cause. If you are learning python, very very low on your list of things to learn is global variables. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Setting up Python WinXP

2016-06-23 Thread Joel Goldstick
r from here: > https://www.python.org/ftp/python/3.4.4/python-3.4.4.msi > > Hope this helps, > -- > Zach > -- > https://mail.python.org/mailman/listinfo/python-list Linux works well on old machines. However, Lubuntu is a scaled down Ubuntu version designed to run on older

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Joel Goldstick
e named it > win.txt. The file it creates when I run the program is win_new.txt > but it's empty. > > > -- > https://mail.python.org/mailman/listinfo/python-list Are you running program in same folder as text file? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Joel Goldstick
On Tue, Jul 5, 2016 at 6:29 PM, Seymore4Head wrote: > On Tue, 5 Jul 2016 18:27:25 -0400, Joel Goldstick > wrote: > >>On Tue, Jul 5, 2016 at 6:05 PM, Seymore4Head >> wrote: >>> import os >>> >>> f_in = open('win.txt', 'r'

Re: Appending an asterisk to the end of each line

2016-07-05 Thread Joel Goldstick
", it then renames it to > "win.txt", so "win_new.txt" shouldn't exist. > > Of course, if there's already a file called "win_old.txt", then the first > rename will raise an exception, and you'll have "win_new.txt" and the > original "win.txt". > > -- > https://mail.python.org/mailman/listinfo/python-list Why don't you comment out the renames, and see what happens? -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-07-24 Thread Joel Goldstick
cks that >> don't now use 'end' would look odd. I think it would either have to be >> all or nothing. I guess nothing. > > > > > -- > Steven > “Cheer up,” they said, “things could be worse.” So I cheered up, and sure > enough, things got worse. > This thread is beginning to feel like a dog whistle for people who like braces. I've been python coding since 2009 I think, and I think I have used pass less than a handful of times. ... and except for sets and dicts, I can't remember using a { -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Print Error

2016-07-28 Thread Joel Goldstick
hon 3.x. print is a function. Use print("this line will be printed") -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: how to match list members in py3.x

2018-11-25 Thread Joel Goldstick
e that people here are often very knowledgeable to help with python problems, but as a rule, doing someone's homework isn't something people like to do. On to your problem. You should understand lists and sets, and for loops. Try some code and come back with what you have. Then you will get

Re: how to match list members in py3.x

2018-11-25 Thread Joel Goldstick
On Sun, Nov 25, 2018 at 11:51 AM Muhammad Rizwan wrote: > > On Sunday, 25 November 2018 11:41:56 UTC-5, Joel Goldstick wrote: > > On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan > > <> wrote: > > > > > > IF YOU CAN'T HELP BETTER

Re: Type hinting of Python is just a toy ?

2019-01-04 Thread Joel Goldstick
; special type of variable, the "stem". > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list I don't normally comment on this type of thread, but I believe the OP is showing an example of the dunning-kruger effect https://en.wikipedia.org/wiki/Dunning%E2%80%93

Re: Exercize to understand from three numbers which is more high

2019-01-25 Thread Joel Goldstick
me to fix it?! :\ > > > > ^Bart > -- > https://mail.python.org/mailman/listinfo/python-list This looks like homework. What you are asking could be solved a number of ways. I'm guessing your homework wants you to learn about if/else and comparison operators. A

Re: The sum of ten numbers inserted from the user

2019-02-07 Thread Joel Goldstick
in the python-tutor mailing list. You should also use print function in your loops to learn what is really going on. > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re: trying to begin a code for web scraping

2019-02-19 Thread Joel Goldstick
Beautiful soup is your friend here. It can analyze the data within the html tags on your scraped page. But often javascript is used on 'modern' web pages so the page is actually not just html, but javascript that changes the html. For this you need another tool -- i think one is calle

Re: Losing words

2019-04-01 Thread Joel Goldstick
> > > > Nah mate, > > def text(): > mess = input("> ") > s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8")) > > text() > Is this a typo or are you calling text() from w

Re: Question :)

2019-05-13 Thread Joel Goldstick
raries, you will find that using virtualenv keeps the right things in the right places. So after you get started with Django, look into what your problems are with virtualenv. Copy and paste the commands you use to install it, and include the resulting error messages. You will get help here

Re: problem in installing packages

2019-05-28 Thread Joel Goldstick
> > > > -- > https://mail.python.org/mailman/listinfo/python-list It appears you are trying to execute a linux shell command while in the python repl. exit python, and try again -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list

Re:

2019-06-24 Thread Joel Goldstick
On Mon, Jun 24, 2019 at 4:13 AM Sagar Jape wrote: > > I'm not able to install pip in my pc it gives following error. what should > I do? > -- > https://mail.python.org/mailman/listinfo/python-list Copy and paste your session info. The list doesn't show images.

<    1   2   3   4   5   6   7   8   >