Difference between revisions of "User:Alvonruff/Python3 Files"
Jump to navigation
Jump to search
(→Common) |
(→Biblio) |
||
Line 189: | Line 189: | ||
==Biblio== | ==Biblio== | ||
− | {| border="1" cellpadding="2" style="border-collapse:collapse; text-align: | + | {| border="1" cellpadding="2" style="border-collapse:collapse; text-align:center; width:30%;" |
! File | ! File | ||
! Tabs | ! Tabs | ||
! Print | ! Print | ||
! String | ! String | ||
+ | ! DB Connector | ||
+ | |- | ||
+ | | adv_identifier_search.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | adv_notes_search.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | advSearchClass.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | adv_search_menu.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | adv_search_results.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | adv_search_selection.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | adv_user_search.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | adv_web_page_search.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | ae.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | author_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | authors_by_debut_year.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | authors_by_debut_year_table.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | authortags.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | award_category_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | award_category.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | award_category_year.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | award_details.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | award_directory.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | award_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | awardtype_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | awardtype.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | ay.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | biblio.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | calendarClass.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | calendar_day.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | calendar_menu.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | cancelsubmission.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | changed_verified_pubs.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | ch.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | common.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | diffselect.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | directory.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | dologin.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | dologout.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | dumpxml.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | ea.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | eaw.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | external_id_search_results.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | fc.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | google_search_redirect.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | index.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | languages.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | most_popular.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | most_popular_table.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | most_reviewed.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | most_reviewed_table.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | mylanguages.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | mypreferences.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | myrecent.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | my_removed_secondary_verifications.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | my_secondary_verifications.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | my_unstable_ISBN_verifications.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | my_unstable_verifications.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | myverificationsClass.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | my_verifications_menu.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | myvotes.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | mywebsites.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | note.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | note_search_results.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | pe.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | pl.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | popular_authors.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | popular_authors_table.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | pprint.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | pub_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | publisher_authors.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | publisher_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | publisher_one_author.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | publisher.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | publisheryear.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | pubseries_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | pubseries.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | pubs_not_in_series.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | recent_activity_menu.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | recent_primary_ver.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | recent.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | recentver.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | removed_secondary_verifications.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | se.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | seriesgrid.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | series_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | seriestags.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | stats-and-tops.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | stats.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | submitdiff.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | submitlogin.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | submitmylanguages.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | submitmywebsites.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | submitpreferences.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | tag_author.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | tag.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | titlecovers.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | title_history.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | title.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | topcontrib.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | user_search_results.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | usertag.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | usertitles.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | userver.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | utils.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | verification_sources.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | view_submission.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | | webpages_search_results.py | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | | ||
|- | |- | ||
− | |||
|} | |} | ||
Revision as of 10:34, 6 May 2023
This page tracks changes that can be made and still run under Python2.
This page tracks changes that can be made for Python3 that also run fine under Python2. The changes are:
- Replacing tabs with 8 spaces. Almost every file attempted so far has some mix of spaces and tabs. In vi/vim this can be changed with:
:s/<tab>/<8 spaces>/g
- Change all print statements to use function call syntax. This can be done by 2to3 (a variant of futurize). 2to3 without arguments will make many python3 changes, but it also takes a -f argument, which allows you to attack one specific problem. To use, create a target directory (like FUTURIZE), and issuing the following command:
2to3 awardClass.py -f print -n -w -o FUTURIZE
- Change all instance of string.method to str.method.
- While most SQL code is in SQLparsing.py, it is also peppered across many other files. This code will not work any longer, as Python3 requires moving to a new connector. I've created an ISFDB connector class which is portable across Python2 and Python3. Some usage patterns are:
def _StandardQuery(query): CNX = MYSQL_CONNECTOR() CNX.DB_QUERY(query) results = [] record = CNX.DB_FETCHMANY() while record: results.append(record[0]) record = CNX.DB_FETCHMANY() return results
def _BinaryQuery(query): CNX = MYSQL_CONNECTOR() CNX.DB_QUERY(query) if CNX.DB_NUMROWS(): return 1 else: return 0
def _OneRow(query): CNX = MYSQL_CONNECTOR() CNX.DB_QUERY(query) record = CNX.DB_FETCHONE() if record: return record[0] else: return None
def SQLgetAuthorData(author): CNX = MYSQL_CONNECTOR() query = "select %s from authors where author_canonical='%s'" % (CNX_AUTHORS_STAR, CNX.DB_ESCAPE_STRING(author)) CNX.DB_QUERY(query) record = CNX.DB_FETCHONE() if record: return record[0] else: return 0
Common
File | Tabs | String | DB Connector | |
---|---|---|---|---|
authorClass.py | Y | Y | Y | Y |
awardcatClass.py | Y | Y | Y | Y |
awardClass.py | Y | Y | Y | Y |
awardtypeClass.py | Y | Y | Y | Y |
install.py | Y | Y | Y | - |
isbn.py | Y | Y | Y | Y |
isfdblib.py | - | - | - | - |
isfdb.py | Y | Y | Y | Y |
library.py | Y | Y | Y | Y |
localdefs.py | - | - | - | - |
login.py | Y | Y | Y | Y |
navbar.py | Y | Y | Y | Y |
pubClass.py | Y | Y | Y | Y |
publisherClass.py | Y | Y | Y | Y |
pubseriesClass.py | Y | Y | Y | Y |
seriesClass.py | Y | Y | Y | Y |
sfe3.py | Y | Y | Y | Y |
SQLparsing.py | Y | Y | Y | Y |
templateClass.py | Y | Y | Y | Y |
titleClass.py | Y | Y | Y | Y |
verificationsourceClass.py | Y | Y | Y | Y |
viewers.py | Y | Y | Y | Y |
Biblio
File | Tabs | String | DB Connector | |
---|---|---|---|---|
adv_identifier_search.py | ||||
adv_notes_search.py | ||||
advSearchClass.py | ||||
adv_search_menu.py | ||||
adv_search_results.py | ||||
adv_search_selection.py | ||||
adv_user_search.py | ||||
adv_web_page_search.py | ||||
ae.py | ||||
author_history.py | ||||
authors_by_debut_year.py | ||||
authors_by_debut_year_table.py | ||||
authortags.py | ||||
award_category_history.py | ||||
award_category.py | ||||
award_category_year.py | ||||
award_details.py | ||||
award_directory.py | ||||
award_history.py | ||||
awardtype_history.py | ||||
awardtype.py | ||||
ay.py | ||||
biblio.py | ||||
calendarClass.py | ||||
calendar_day.py | ||||
calendar_menu.py | ||||
cancelsubmission.py | ||||
changed_verified_pubs.py | ||||
ch.py | ||||
common.py | ||||
diffselect.py | ||||
directory.py | ||||
dologin.py | ||||
dologout.py | ||||
dumpxml.py | ||||
ea.py | ||||
eaw.py | ||||
external_id_search_results.py | ||||
fc.py | ||||
google_search_redirect.py | ||||
index.py | ||||
languages.py | ||||
most_popular.py | ||||
most_popular_table.py | ||||
most_reviewed.py | ||||
most_reviewed_table.py | ||||
mylanguages.py | ||||
mypreferences.py | ||||
myrecent.py | ||||
my_removed_secondary_verifications.py | ||||
my_secondary_verifications.py | ||||
my_unstable_ISBN_verifications.py | ||||
my_unstable_verifications.py | ||||
myverificationsClass.py | ||||
my_verifications_menu.py | ||||
myvotes.py | ||||
mywebsites.py | ||||
note.py | ||||
note_search_results.py | ||||
pe.py | ||||
pl.py | ||||
popular_authors.py | ||||
popular_authors_table.py | ||||
pprint.py | ||||
pub_history.py | ||||
publisher_authors.py | ||||
publisher_history.py | ||||
publisher_one_author.py | ||||
publisher.py | ||||
publisheryear.py | ||||
pubseries_history.py | ||||
pubseries.py | ||||
pubs_not_in_series.py | ||||
recent_activity_menu.py | ||||
recent_primary_ver.py | ||||
recent.py | ||||
recentver.py | ||||
removed_secondary_verifications.py | ||||
se.py | ||||
seriesgrid.py | ||||
series_history.py | ||||
seriestags.py | ||||
stats-and-tops.py | ||||
stats.py | ||||
submitdiff.py | ||||
submitlogin.py | ||||
submitmylanguages.py | ||||
submitmywebsites.py | ||||
submitpreferences.py | ||||
tag_author.py | ||||
tag.py | ||||
titlecovers.py | ||||
title_history.py | ||||
title.py | ||||
topcontrib.py | ||||
user_search_results.py | ||||
usertag.py | ||||
usertitles.py | ||||
userver.py | ||||
utils.py | ||||
verification_sources.py | ||||
view_submission.py | ||||
webpages_search_results.py |
Edit
File | Tabs | String |
---|
Mod
File | Tabs | String |
---|
Rest
File | Tabs | String |
---|