On 9/12/2022 5:00 AM, hongy...@gmail.com wrote:
I want to do the query from with in script based on the interface here [1]. For this
purpose, the underlying posting URL must be obtained, say, the URL corresponding to
"ITA Settings" button, so that I can make the corresponding query URL and issu
On 9/13/2022 3:46 AM, hongy...@gmail.com wrote:
On Tuesday, September 13, 2022 at 4:20:12 AM UTC+8, DFS wrote:
On 9/12/2022 5:00 AM, hongy...@gmail.com wrote:
I want to do the query from with in script based on the interface here [1]. For this
purpose, the underlying posting URL must be
On 9/13/2022 7:29 PM, hongy...@gmail.com wrote:
On Tuesday, September 13, 2022 at 9:33:20 PM UTC+8, DFS wrote:
On 9/13/2022 3:46 AM, hongy...@gmail.com wrote:
On Tuesday, September 13, 2022 at 4:20:12 AM UTC+8, DFS wrote:
On 9/12/2022 5:00 AM, hongy...@gmail.com wrote:
I want to do the query
On 9/13/2022 3:54 PM, Salvatore Bruzzese wrote:
Hi,
I was trying to uninstall version 3.10.7 of python but I've
encountered problems with the uninstall tool.
I open the python setup program, click on the uninstall button but it
doesn't even start deleting python even though it says that the
proce
-
this does a str() conversion in the loop
-
for i in range(cells.count()):
if text == str(ID):
break
Having problems with removeRow() on a QTableView object.
After calling removeRow(), the screen isn't updating. It's as if the
model is read-only, but it's a QSqlTableModel() model, which is not
read-only.
The underlying SQL is straightforward (one table) and all columns are
editable.
None
On 10/25/2022 1:45 PM, Thomas Passin wrote:
On 10/25/2022 1:03 PM, DFS wrote:
Having problems with removeRow() on a QTableView object.
removeRow() isn't listed as being a method of a QTableView, not even an
inherited method, so how are you calling removeRow() on it? (See
https://doc.
On 10/25/2022 2:03 PM, Barry Scott wrote:
There is an active PyQt mailing list that has lots of helpful and knowledgeable
people on it.
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Barry
Thanks. I'll send some questions their way, I'm sure.
--
https://mail.python.org/mailman/li
Nothing special, but kind of fun to use
$python progname.py sourcefile.py
-
#count blank lines, comments, source code
import sys
#counters
imports, blanks,comments, source = 0,0,0,0
functions, dbexec, total = 0,0,0
#python builtins
bui
On 10/25/2022 1:45 PM, Thomas Passin wrote:
On 10/25/2022 1:03 PM, DFS wrote:
Having problems with removeRow() on a QTableView object.
removeRow() isn't listed as being a method of a QTableView, not even an
inherited method, so how are you calling removeRow() on it? (See
https://doc.
On 10/27/2022 3:47 PM, Thomas Passin wrote:
On 10/27/2022 11:15 AM, DFS wrote:
On 10/25/2022 1:45 PM, Thomas Passin wrote:
On 10/25/2022 1:03 PM, DFS wrote:
Having problems with removeRow() on a QTableView object.
removeRow() isn't listed as being a method of a QTableView, not eve
3.9.13
--
https://mail.python.org/mailman/listinfo/python-list
On 11/7/2022 10:48 PM, DFS wrote:
3.9.13
Never mind. User error - I didn't install it in the first place.
--
https://mail.python.org/mailman/listinfo/python-list
On 11/11/2022 12:49 PM, Dennis Lee Bieber wrote:
On Fri, 11 Nov 2022 02:22:34 -0500, DFS declaimed the
following:
[(0,11), (1,1), (2,1),
(0,1) , (1,41), (2,2),
(0,9) , (1,3), (2,12)]
The set of values in elements[0] is {0,1,2}
I want the set of max values in elements[1]: {11,41,12
[(0,11), (1,1), (2,1),
(0,1) , (1,41), (2,2),
(0,9) , (1,3), (2,12)]
The set of values in elements[0] is {0,1,2}
I want the set of max values in elements[1]: {11,41,12}
--
https://mail.python.org/mailman/listinfo/python-list
On 11/11/2022 7:50 AM, Stefan Ram wrote:
Pancho writes:
def build_max_dict( tups):
dict = {}
for (a,b) in tups:
if (a in dict):
if (b>dict[a]):
dict[a]=b
else:
dict[a]=b
return(sorted(dict.values()))
Or,
import it
On 11/11/2022 2:22 PM, Pancho wrote:
On 11/11/2022 18:53, DFS wrote:
On 11/11/2022 12:49 PM, Dennis Lee Bieber wrote:
On Fri, 11 Nov 2022 02:22:34 -0500, DFS declaimed the
following:
[(0,11), (1,1), (2,1),
(0,1) , (1,41), (2,2),
(0,9) , (1,3), (2,12)]
The set of values in elements[0
On 11/11/2022 7:04 PM, Dennis Lee Bieber wrote:
On Fri, 11 Nov 2022 15:03:49 -0500, DFS declaimed the
following:
Thanks for looking at it. I'm trying to determine the maximum length of
each column result in a SQL query. Normally you can use the 3rd value
of the cursor.description o
On 11/13/2022 7:37 AM, Pancho wrote:
On 11/11/2022 19:56, DFS wrote:
Edit: found a solution online:
-
x = [(11,1,1),(1,41,2),(9,3,12)]
maxvals = [0]*len(x[0])
for e in x:
maxvals = [max(w,int(c)) for w,c in zip(maxvals,e
In code, list.clear is just ignored.
At the terminal, list.clear shows
in code:
x = [1,2,3]
x.clear
print(len(x))
3
at terminal:
x = [1,2,3]
x.clear
print(len(x))
3
Caused me an hour of frustration before I noticed list.clear() was what
I needed.
x = [1,2,3]
x.clear()
print(len(x))
0
--
On 11/13/2022 5:20 PM, Jon Ribbens wrote:
On 2022-11-13, DFS wrote:
In code, list.clear is just ignored.
At the terminal, list.clear shows
in code:
x = [1,2,3]
x.clear
print(len(x))
3
at terminal:
x = [1,2,3]
x.clear
print(len(x))
3
Caused me an hour of frustration before I noticed
On 11/13/2022 9:11 PM, Chris Angelico wrote:
On Mon, 14 Nov 2022 at 11:53, DFS wrote:
On 11/13/2022 5:20 PM, Jon Ribbens wrote:
On 2022-11-13, DFS wrote:
In code, list.clear is just ignored.
At the terminal, list.clear shows
in code:
x = [1,2,3]
x.clear
print(len(x))
3
at terminal:
x
On 11/21/2022 12:59 PM, darkst...@o2online.de wrote:
Dear list,
I want learn python for 4 weeks and have problems, installing Tkinter. If I
installed 3.11.0 for my windows 8.1 from python.org and type
>>> import _tkinter
> Traceback (most recent call last):
> File "",
On 11/30/2022 6:56 AM, luca72.b...@gmail.com wrote:
Hello i have a byte file, that fill a vb6 type like:
Type prog_real
codice As String * 12'hsg
denom As String * 24'oo
codprof As String * 12 'ljio
note As String * 100
programmer As String * 11
On 11/30/2022 1:07 PM, DFS wrote:
On 11/30/2022 6:56 AM, luca72.b...@gmail.com wrote:
I don't do Python OO so someone else can answer better, but a simple
port of your VB type would be a python class definition:
class prog_real:
codice, denom, codprof, note, programmer
Usenet is dead. Long live Usenet.
--
https://mail.python.org/mailman/listinfo/python-list
On 12/9/2022 12:13 PM, ker...@polaris.net wrote:
Hello. I've downloaded the new Python to my new Computer, and the new Python mystifies me.
Instead of an editor, it looks like a Dos executable program.
python.exe is a Windows executable.
How can I write my own Python Functions and
On 12/11/2022 5:09 AM, Chris Green wrote:
Is the only way to read single characters from the keyboard to use
curses.cbreak() or curses.raw()? If so how do I then read characters,
it's not at all obvious from the curses documentation as that seems to
think I'm using a GUI in some shape or form.
On 12/14/2022 3:55 AM, Cecil Westerhof wrote:
If I want to know the dependencies for requests I use:
pip show requests
And one of the lines I get is:
Requires: certifi, charset-normalizer, idna, urllib3
But I want (in this case) to know with version of charset-normalizer
requests need
On 12/18/2022 6:50 AM, Jim Lewis wrote:
I'm an occasional user of Python and have a degree in computer science.
Almost every freaking time I use Python, I go through PSH (Python Setup
Hell). Sometimes a wrong version is installed. Sometimes it's a path issue.
Or exe naming confusion: python, pyth
Having a problem with the DB2 connector
test.py
import ibm_db_dbi
connectstring =
'DATABASE=xxx;HOSTNAME=localhost;PORT=5;PROTOCOL=TCPIP;UID=xxx;PWD=xxx;'
conn = ibm_db_dbi.connect(connectstring,'','')
curr = conn.cursor
pri
On 9/3/2021 1:47 AM, Chris Angelico wrote:
On Fri, Sep 3, 2021 at 3:42 PM DFS wrote:
Having a problem with the DB2 connector
test.py
import ibm_db_dbi
connectstring =
'DATABASE=xxx;HOSTNAME=localhost;PORT=5;PROTOCOL=
Typical cases:
lines = [('one\ntwo\nthree\n')]
print(str(lines[0]).splitlines())
['one', 'two', 'three']
lines = [('one two three\n')]
print(str(lines[0]).split())
['one', 'two', 'three']
That's the result I'm wanting, but I get data in a slightly different
format:
lines = [('one\ntwo\
On 9/4/2021 5:55 PM, DFS wrote:
Typical cases:
lines = [('one\ntwo\nthree\n')]
print(str(lines[0]).splitlines())
['one', 'two', 'three']
lines = [('one two three\n')]
print(str(lines[0]).split())
['one', 'two',
On 9/3/2021 9:50 AM, Chris Angelico wrote:
On Fri, Sep 3, 2021 at 11:37 PM DFS wrote:
On 9/3/2021 1:47 AM, Chris Angelico wrote:
On Fri, Sep 3, 2021 at 3:42 PM DFS wrote:
Having a problem with the DB2 connector
test.py
On 9/15/2021 12:23 PM, Mostowski Collapse wrote:
I really wonder why my Python implementation
is a factor 40 slower than my JavaScript implementation.
Structurally its the same code.
You can check yourself:
Python Version:
https://github.com/jburse/dogelog-moon/blob/main/devel/runtimepy/machine
On 9/15/2021 5:10 PM, Mostowski Collapse wrote:
And how do you only iterate over n-1 elements?
I don't need a loop over all elements.
With array slicing?
Someting like:
for item in items[0:len(items)-2]:
___print(item)
Or with negative slicing indexes? Problem
is my length can be equal to one
On 9/16/2021 1:50 AM, af kh wrote:
Hello,
I was doing some coding on a website called replit then I extracted the file,
and opened it in Python. For some reason, after answering 'no' or 'yes' after
the last sentence I wrote, the Python window shut off, in replit I added one
more sentence, but
On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
Hi Guys
Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles,
which worked not so bad.
Now I try to write this GUI with Python with PyQt5 or TKinter.
First question is:
Is there any free OCR software, packages or code in Python,
On 9/21/2021 10:38 PM, Mohsen Owzar wrote:
DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
Hi Guys
Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles,
which worked not so bad.
Now I try to write this GUI
On 9/22/2021 1:54 AM, Mohsen Owzar wrote:
DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2:
On 9/21/2021 10:38 PM, Mohsen Owzar wrote:
DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
Hi Guys
Long time ago I've writ
On 9/24/2021 12:46 AM, Mohsen Owzar wrote:
Hi Guys
I've written a GUI using PyQt5 and in there I use StyleSheets (css) for the
buttons and labels to change their background- and foreground-colors and their
states as well.
Because my program doesn't function correctly, I try to debug it in my ID
import pyodbc
dbName = "D:\test_data.mdb"
conn = pyodbc.connect('DRIVER={Microsoft Access Driver
(*.mdb)};DBQ='+dbName)
cursor = conn.cursor()
#COUNT TABLES, LIST COLUMNS
tblCount = 0
for rows in cursor.tables():
if rows.
On 3/31/2016 11:44 PM, DFS wrote:
import pyodbc
dbName = "D:\test_data.mdb"
conn = pyodbc.connect('DRIVER={Microsoft Access Driver
(*.mdb)};DBQ='+dbName)
cursor = conn.cursor()
#COUNT TABLES, LIST COLUMNS
tblC
On 4/1/2016 5:01 PM, Jianling Fan wrote:
Thanks, but the problem is that I am not allowed to install any
software in my office PC, even free software.
Normally, I use zip files but this time I need to extract a rar file.
I don't like to go to IT guys because it takes time.
That's why I am looking
On 4/3/2016 2:30 PM, DFS wrote:
cntText = 60
cntBool = 20
cntNbrs = 30
cntDate = 20
cntBins = 20
strText = " text: "
strBool = " boolean: "
strNbrs = " numeric: "
strDate = " date-time:"
strBins = " binary: "
colCounts = [(cntT
cntText = 60
cntBool = 20
cntNbrs = 30
cntDate = 20
cntBins = 20
strText = " text: "
strBool = " boolean: "
strNbrs = " numeric: "
strDate = " date-time:"
strBins = " binary: "
colCounts = [(cntText,strText) , (cntBool,strBool), (cntNbrs,strNbrs) ,
(cntDate,strDate) , (cntBins,strB
On 4/3/2016 3:31 PM, Peter Otten wrote:
DFS wrote:
cntText = 60
cntBool = 20
cntNbrs = 30
cntDate = 20
cntBins = 20
strText = " text: "
strBool = " boolean: "
strNbrs = " numeric: "
strDate = " date-time:"
strBins = " binary: "
I turned on the Quake-style option (and auto-hide when it loses focus)
and it disappeared and I can't figure out how to get it back onscreen. I
think there's a keystroke combo (like Win+key) but I don't know what it is.
It shows in the Task Manager Processses, but not in the Alt+Tab list.
Unin
On 4/11/2016 6:04 PM, 20/20 Lab wrote:
win+alt+space does not work? ctrl+alt+win+space?
http://conemu.github.io/en/KeyboardShortcuts.html
Says those are not configurable, so they should work.
Neither of those worked, but Ctrl+~ did.
Thankyouthankyouthankyou
On 04/11/2016 02:49 PM, DFS
To save a webpage to a file:
-
1. import urllib
2. urllib.urlretrieve("http://econpy.pythonanywhere.com
/ex/001.html","D:\file.html")
-
That's it!
Coming from VB/A background, some of the stuff you can do with python -
I posted a little while ago about how short the python code was:
-
1. import urllib
2. urllib.urlretrieve(webpage, filename)
-
Which is very sweet compared to the VBScript version:
--
On 5/2/2016 12:40 AM, Chris Angelico wrote:
On Mon, May 2, 2016 at 2:34 PM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 09:06 PM, DFS wrote:
Then I tested them in loops - the VBScript is MUCH faster: 0.44 for 10
iterations, vs 0.88 for python.
...
I know it's asking a lot, but is th
On 5/2/2016 12:31 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 08:39 PM, DFS wrote:
To save a webpage to a file:
-
1. import urllib
2. urllib.urlretrieve("http://econpy.pythonanywhere.com
/ex/001.html",&qu
On 5/2/2016 12:49 AM, Ben Finney wrote:
DFS writes:
Then I tested them in loops - the VBScript is MUCH faster: 0.44 for 10
iterations, vs 0.88 for python.
[…]
urllib2 and requests were about the same speed as urllib.urlretrieve,
while pycurl was significantly slower (1.2 seconds).
Network
On 5/2/2016 1:00 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 09:50 PM, DFS wrote:
On 5/2/2016 12:40 AM, Chris Angelico wrote:
On Mon, May 2, 2016 at 2:34 PM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 09:06 PM, DFS wrote:
Then I tested them in loops - the VBScript is MUCH faster
On 5/2/2016 1:02 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 09:51 PM, DFS wrote:
On 5/2/2016 12:31 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 08:39 PM, DFS wrote:
To save a webpage to a file:
-
1. import urllib
2. urllib.urlretrieve("
On 5/2/2016 1:02 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 09:51 PM, DFS wrote:
On 5/2/2016 12:31 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 08:39 PM, DFS wrote:
To save a webpage to a file:
-
1. import urllib
2. urllib.urlretrieve("
On 5/2/2016 1:15 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 10:00 PM, DFS wrote:
I tried the 10-loop test several times with all versions.
Also how, _exactly_, are you testing this?
C:\Python27>python -m timeit "filename='C:\\test.txt';
webpage='http://econpy.py
On 5/2/2016 1:37 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 10:23 PM, DFS wrote:
Trying the rawstring thing (say it fast 3x):
webpage = "http://econpy.pythonanywhere.com/ex/001.html";
webfile = "D:\\econpy001.html"
On 5/2/2016 2:05 AM, Steven D'Aprano wrote:
On Monday 02 May 2016 15:00, DFS wrote:
I tried the 10-loop test several times with all versions.
The results were 100% consistent: VBSCript xmlHTTP was always 2x faster
than any python method.
Are you absolutely sure you're comparin
On 5/2/2016 2:27 AM, Stephen Hansen wrote:
On Sun, May 1, 2016, at 10:59 PM, DFS wrote:
startTime = time.clock()
for i in range(loops):
r = urllib2.urlopen(webpage)
f = open(webfile,"w")
f.write(r.read())
f.close
endTime = time.clock()
print "Fini
On 5/2/2016 5:26 AM, BartC wrote:
On 02/05/2016 04:39, DFS wrote:
To save a webpage to a file:
-
1. import urllib
2. urllib.urlretrieve("http://econpy.pythonanywhere.com
/ex/001.html","D:\file.html")
Have: list1 = ['\r\n Item 1 ',' Item 2 ','\r\n ']
Want: list1 = ['Item 1','Item 2']
I wrote this, which works fine, but maybe it can be tidier?
1. list2 = [t.replace("\r\n", "") for t in list1] #remove \r\n
2. list3 = [t.strip(' ') for t in list2]#trim whitespace
3. list1 =
On 5/2/2016 11:33 AM, zljubi...@gmail.com wrote:
I tried to use the following code:
from bs4 import BeautifulSoup
from selenium import webdriver
PHANTOMJS_PATH =
'C:\\Users\\Zoran\\Downloads\\Obrisi\\phantomjs-2.1.1-windows\\bin\\phantomjs.exe'
url =
'https://hrti.hrt.hr/#/video/show/22036
On 5/2/2016 1:25 PM, Stephen Hansen wrote:
On Mon, May 2, 2016, at 09:33 AM, DFS wrote:
Have: list1 = ['\r\n Item 1 ',' Item 2 ','\r\n ']
I'm curious how you got to this point, it seems like you can solve t
On 5/2/2016 12:57 PM, Jussi Piitulainen wrote:
DFS writes:
Have: list1 = ['\r\n Item 1 ',' Item 2 ','\r\n ']
Want: list1 = ['Item 1','Item 2']
I wrote this, which works fine, but maybe it can be tidier?
1. list2 = [t.replace(&
On 5/2/2016 2:27 PM, Jussi Piitulainen wrote:
DFS writes:
On 5/2/2016 12:57 PM, Jussi Piitulainen wrote:
DFS writes:
Have: list1 = ['\r\n Item 1 ',' Item 2 ','\r\n ']
Want: list1 = ['Item 1','Item 2']
. .
Funny-looking
On 5/2/2016 8:45 PM, jf...@ms4.hinet.net wrote:
DFS at 2016/5/2 UTC+8 11:39:33AM wrote:
To save a webpage to a file:
-
1. import urllib
2. urllib.urlretrieve("http://econpy.pythonanywhere.com
/ex/001.html",&qu
On 5/2/2016 4:42 AM, Peter Otten wrote:
DFS wrote:
Is VB using a local web cache, and Python not?
I'm not specifying a local web cache with either (wouldn't know how or
where to look). If you have Windows, you can try it.
I don't have Windows, but if I
On 5/2/2016 3:19 AM, Chris Angelico wrote:
There's an easier way to test if there's caching happening. Just crank
the iterations up from 10 to 100 and see what happens to the times. If
your numbers are perfectly fair, they should be perfectly linear in
the iteration count; eg a 1.8 second ten-it
On 5/2/2016 10:00 PM, Chris Angelico wrote:
On Tue, May 3, 2016 at 11:51 AM, DFS wrote:
On 5/2/2016 3:19 AM, Chris Angelico wrote:
There's an easier way to test if there's caching happening. Just crank
the iterations up from 10 to 100 and see what happens to the times. If
your n
On 5/2/2016 11:27 PM, jf...@ms4.hinet.net wrote:
DFS at 2016/5/3 9:12:24AM wrote:
try
from urllib.request import urlretrieve
http://stackoverflow.com/questions/21171718/urllib-urlretrieve-file-python-3-3
I'm running python 2.7.11 (32-bit)
Alright, it works...someway.
I try to get
On 5/3/2016 12:06 AM, Michael Torrie wrote:
Now if you want to talk about processing the data once you have it,
there we can talk about speeds and optimization.
Be glad to. Helps me learn python, so bring whatever challenge you want
and I'll try to keep up.
One small comparison I was able
On 5/3/2016 8:00 AM, Chris Angelico wrote:
On Tue, May 3, 2016 at 9:25 PM, Jussi Piitulainen
wrote:
Chris Angelico writes:
This assumes, of course, that there is a function swapcase which can
return a string with case inverted. I'm not sure such a function
exists.
str.swapcase("foO")
On 5/3/2016 9:13 AM, Chris Angelico wrote:
On Tue, May 3, 2016 at 11:01 PM, DFS wrote:
On 5/3/2016 8:00 AM, Chris Angelico wrote:
On Tue, May 3, 2016 at 9:25 PM, Jussi Piitulainen
wrote:
Chris Angelico writes:
This assumes, of course, that there is a function swapcase which can
return a
On 5/3/2016 8:14 AM, drewes@gmail.com wrote:
Hello, I'm new to python and have a Question.
I'm running a c++ file with a python script like:
import os
import subprocess
subprocess.call(["~/caffe/build/examples/cpp_classification/classification", "deploy.prototxt",
"this.caffemodel", "mean
On 5/3/2016 10:49 AM, Jussi Piitulainen wrote:
DFS writes:
On 5/3/2016 9:13 AM, Chris Angelico wrote:
It doesn't invert, the way numeric negation does.
What do you mean by 'case inverted'?
It looks like it swaps the case correctly between upper and lower.
There's
On 5/3/2016 11:28 AM, Tim Chase wrote:
On 2016-05-03 00:24, DFS wrote:
One small comparison I was able to make was VBA vs python/pyodbc to
summarize an Access database. Not quite a fair test, but
interesting nonetheless.
Access 2003 file
Access 2003 VBA code
Time: 0.18 seconds
same Access
On 5/3/2016 10:12 PM, Christopher Reimer wrote:
When I realized that I wasn't learning enough about the Python language
from translating BASIC games, I started coding a chess engine. If you
ever look at the academic literature for chess programming from the last
50+ years, you can spend a lifet
On 5/3/2016 8:00 PM, DFS wrote:
How far along are you in your engine development?
I can display a text-based chess board on the console (looks better
with a mono font).
8 BR BN BB BQ BK BB BN BR
7 BP BP BP BP BP BP BP BP
6 __ __ __ __ __ __ __ __
5 __ __ __ __ __ __ __ __
4
On 5/3/2016 2:41 PM, Tim Chase wrote:
On 2016-05-03 13:00, DFS wrote:
On 5/3/2016 11:28 AM, Tim Chase wrote:
On 2016-05-03 00:24, DFS wrote:
One small comparison I was able to make was VBA vs python/pyodbc
to summarize an Access database. Not quite a fair test, but
interesting nonetheless
On 5/3/2016 11:28 PM, Steven D'Aprano wrote:
On Wed, 4 May 2016 12:49 am, Jussi Piitulainen wrote:
DFS writes:
On 5/3/2016 9:13 AM, Chris Angelico wrote:
It doesn't invert, the way numeric negation does.
What do you mean by 'case inverted'?
It looks like it swap
On 5/4/2016 11:37 AM, Steven D'Aprano wrote:
On Thu, 5 May 2016 12:09 am, DFS wrote:
On 5/3/2016 11:28 PM, Steven D'Aprano wrote:
Languages with two distinct lettercases, like English, are called
bicameral.
[...]
Linguist much?
Possibly even a cunning one.
I see you as
Both of the following python commands successfully create a SQLite3
datafile which crashes Access 2003 immediately upon trying to open it
(via an ODBC linked table).
import sqlite3
conn = sqlite3.connect("dfile.db")
import pyodbc
conn = pyodbc.connect('Driver={SQLite3 ODBC Driver};Database=
Want to whittle a list like this:
[u'Espa\xf1ol', 'Health & Fitness Clubs (36)', 'Health Clubs &
Gymnasiums (42)', 'Health Fitness Clubs', 'Name', 'Atlanta city guide',
'edit address', 'Tweet', 'PHYSICAL FITNESS CONSULTANTS & TRAINERS',
'HEALTH CLUBS & GYMNASIUMS', 'HEALTH CLUBS & GYMNASIUMS',
On 5/4/2016 10:02 PM, Stephen Hansen wrote:
On Wed, May 4, 2016, at 03:46 PM, DFS wrote:
I can't find anything on the web.
Have you tried:
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
If you really must access it over a newsgroup, you can use the Gmane
m
On 5/5/2016 2:04 AM, Steven D'Aprano wrote:
On Thursday 05 May 2016 14:58, DFS wrote:
Want to whittle a list like this:
[...]
Want to keep all elements containing only upper case letters or upper
case letters and ampersand (where ampersand is surrounded by spaces)
Start by writ
On 5/5/2016 1:39 AM, Stephen Hansen wrote:
pattern = re.compile(r"^[A-Z\s&]+$")
output = [x for x in list if pattern.match(x)]
Holy Shr"^[A-Z\s&]+$" One line of parsing!
I was figuring a few list comprehensions would do it - this is better.
(note: the reason I specified 'spaces aroun
On 5/5/2016 1:53 AM, Jussi Piitulainen wrote:
Either way is easy to approximate with a regex:
import re
upper = re.compile(r'[A-Z &]+')
lower = re.compile(r'[^A-Z &]')
print([datum for datum in data if upper.fullmatch(datum)])
print([datum for datum in data if not lower.search(datum)])
This
On 5/5/2016 9:32 AM, Stephen Hansen wrote:
On Thu, May 5, 2016, at 12:36 AM, Steven D'Aprano wrote:
Oh, a further thought...
On Thursday 05 May 2016 16:46, Stephen Hansen wrote:
I don't even care about faster: Its overly complicated. Sometimes a
regular expression really is the clearest way to
On 5/5/2016 1:54 PM, Steven D'Aprano wrote:
On Thu, 5 May 2016 10:31 pm, DFS wrote:
You are out of your mind.
That's twice you've tried to put me down, first by dismissing my comments
about text processing with "Linguist much", and now an outright insult. The
first
On 5/5/2016 2:56 PM, Stephen Hansen wrote:
On Thu, May 5, 2016, at 05:31 AM, DFS wrote:
You are out of your mind.
Whoa, now. I might disagree with Steven D'Aprano about how to approach
this problem, but there's no need to be rude.
Seriously not trying to be rude - more smart-a
On 5/5/2016 1:39 AM, Stephen Hansen wrote:
Given:
input = [u'Espa\xf1ol', 'Health & Fitness Clubs (36)', 'Health Clubs & Gymnasiums (42)', 'Health Fitness Clubs',
'Name', 'Atlanta city guide', 'edit address', 'Tweet', 'PHYSICAL FITNESS CONSULTANTS & TRAINERS', 'HEALTH CLUBS &
GYMNASIUMS', 'H
On 5/6/2016 3:45 AM, Peter Otten wrote:
DFS wrote:
Should've looked earlier. Their master list of categories
http://www.usdirectory.com/cat/g0 shows a few commas, a bunch of dashes,
and the ampersands we talked about.
"OFFICE SERVICES, SUPPLIES & EQUIPMENT" gets removed b
On 5/6/2016 9:58 AM, DFS wrote:
On 5/6/2016 3:45 AM, Peter Otten wrote:
DFS wrote:
Should've looked earlier. Their master list of categories
http://www.usdirectory.com/cat/g0 shows a few commas, a bunch of dashes,
and the ampersands we talked about.
"OFFICE SERVICES, SUPPLIES &
getAddresses.py
Scrapes addresses from www.usdirectory.com and stores them in a SQLite
database, or writes them to text files for mailing labels, etc
Now, just by typing 'fast food Taco Bell 10 db all' you can find
out how many Taco Bells are within 10 miles of you, and store all the
addres
On 5/6/2016 11:44 AM, Peter Otten wrote:
DFS wrote:
There are up to 4 levels of categorization:
http://www.usdirectory.com/cat/g0 shows 21 Level 1 categories, and 390
Level 2. To get the Level 3 and 4 you have to drill-down using the
hyperlinks.
How to do it in python code is beyond my
On 5/6/2016 4:30 PM, MRAB wrote:
On 2016-05-06 20:10, DFS wrote:
getAddresses.py
Scrapes addresses from www.usdirectory.com and stores them in a SQLite
database, or writes them to text files for mailing labels, etc
Now, just by typing 'fast food Taco Bell 10 db all' you can find
ou
On 5/6/2016 7:29 PM, Ethan Furman wrote:
On 05/06/2016 04:12 PM, DFS wrote:
On 5/6/2016 4:30 PM, MRAB wrote:
If you don't want to use the 'with' statement, note that closing the
file is:
f.close()
It needs the "()"!
I used close() in 1 place, bu
1 - 100 of 127 matches
Mail list logo