LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-01-2020, 11:48 PM   #16
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108

Hya,

Thanks for your reply.

Detail of problem 2 at #13 follows.
Code:
try:
   BIB.DB_MODULE = __import__(u'dbBibSQLite')
   getattr(BIB.DB_MODULE,'dbBib')    # if the module was loaded before, re-importing won't raise ImportError. We must check directly if it works
except (ImportError,AttributeError):
   BIB.DB_MODULE = None
   wx.LogError(_("""Sorry, but I was not able to find the python module for the %s database.\nPlease check your installation""")%BIB.DB_TYPE)
python3 goes to exception, while python2 does not. (dbBibSQLite.py exists.) I am currently suspecting code (ascii utf-8) or something.

cheers
 
Old 12-02-2020, 01:40 AM   #17
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,790

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
but why don't you show us that exception?
 
Old 12-02-2020, 08:03 PM   #18
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

Thank you for your reply.

I wish I could.

When I followed execution flow (using pycharm), it goes silently into except clause.
try clause looks like
Code:
try:
   BIB.DB_MODULE = __import__(u'dbBibSQLite')
   getattr(BIB.DB_MODULE,'dbBib')
except (ImportError,AttributeError):
Neither of Debugger nor python console shows any message either. I have not found clues yet (which exception where...) I can only assume it is ImportError at __import__.

best
 
Old 12-03-2020, 12:59 AM   #19
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,790

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
since there is an import and a getattr call too, you cannot assume it is an import error. I would try to print the full exception (just to understand what's going on).
Probably you can insert a line or two just for a test.
 
Old 12-03-2020, 02:52 AM   #20
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
Hya,

Thank you for your reply.

My assumption was off target.

I tried to this __import__ clause in interactive mode, where error messages showed up. If I am on the right track, error is
Code:
..........line 36, in <module>
    %(_("Acrobat file"),\
NameError: name '_' is not defined
This is within definition of pull-down menu (wx-windows) options.
Code:
WILDCARD = "%s (*.pdf)|*.pdf|%s (*.odt)|*.odt|%s (*.doc)|*.doc|%s (*.*)|*.*"\
   %(_("Acrobat file"),\
   _("OpenOffice.org Text Document"),\
   _("Microsoft Word Document"),\
   _("All files"))
I am not sure if this is another wrong assumption. I will follow your advice.

cheers
 
Old 12-03-2020, 08:38 PM   #21
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

Another incorrect assumption of mine.
Code:
except (ImportError,AttributeError) as ert:
catches AttributeError module 'wx' has no attribute 'adv'

Also, this clause cannot trap NameError, I guess.

I hope I am on the right track.

cheers
 
Old 12-04-2020, 02:25 AM   #22
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,790

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
https://stackoverflow.com/questions/...espite-phoenix
 
Old 12-04-2020, 08:13 AM   #23
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,134
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
If I understand you from post #15

You want to parse this xml file
Code:
url="https://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi\?db=PubMed\&id=31819487\&rettype=null\&retmode=xml"
And that link gives me an
Code:
<ERROR>Database: pubmed\ - is not supported</ERROR>
Code:
agent="Mozilla/5.0 (Windows NT 10.1; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0"

curl -A "$agent" "$url" -o test.xml

cat test.xml
...
invalid api-key error.
Your link is no good, needs a login or something. Can't go any farther with it until I get some valid data. Post a valid link or login if you want help parsing an xml page.
 
Old 12-06-2020, 03:33 AM   #24
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
Hi, teckk

Thank you for your reply and time.

That link works for me at Sun 6 Dec 09:32:00 UTC 2020, but entire xml will be posted #25.

cheers
 
Old 12-06-2020, 03:33 AM   #25
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
<?xml version="1.0" ?>
<!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st January 2019//EN" "https://dtd.nlm.nih.gov/ncbi/pubmed/out/pubmed_190101.dtd">
<PubmedArticleSet>
<PubmedArticle>
<MedlineCitation Status="PubMed-not-MEDLINE" Owner="NLM">
<PMID Version="1">31819487</PMID>
<DateRevised>
<Year>2020</Year>
<Month>09</Month>
<Day>29</Day>
</DateRevised>
<Article PubModel="Electronic-eCollection">
<Journal>
<ISSN IssnType="Print">1178-6930</ISSN>
<JournalIssue CitedMedium="Print">
<Volume>12</Volume>
<PubDate>
<Year>2019</Year>
</PubDate>
</JournalIssue>
<Title>OncoTargets and therapy</Title>
<ISOAbbreviation>Onco Targets Ther</ISOAbbreviation>
</Journal>
<ArticleTitle><i>PDHA1</i> Gene Knockout In Human Esophageal Squamous Cancer Cells Resulted In Greater Warburg Effect And Aggressive Features In Vitro And In Vivo.</ArticleTitle>
<Pagination>
<MedlinePgn>9899-9913</MedlinePgn>
</Pagination>
<ELocationID EIdType="doi" ValidYN="Y">10.2147/OTT.S226851</ELocationID>
<Abstract>
<AbstractText Label="Background" NlmCategory="UNASSIGNED">One of the remarkable metabolic characteristics of cancer cells is that they prefer glycolysis rather than oxidative phosphorylation (OXPHOS). Pyruvate dehydrogenase E1 alpha subunit (PDHA1) is an important prerequisite for OXPHOS. Our previous studies have shown that low level of PDHA1 protein expression in esophageal squamous cell cancer (ESCC) was correlated with poor prognosis. However, the effect of PDHA1 inhibition on metabolism and biological behavior of esophageal cancer cells remains unclear.</AbstractText>
<AbstractText Label="Methods And Results" NlmCategory="UNASSIGNED">In this study, a KYSE450 PDHA1 knockout (KO) cell line of esophageal cancer was established by CRISPR/Cas9 technology. Then, the glycose metabolism, cell proliferation and migration abilities, chemotherapeutic tolerance and angiogenesis of the PDHA1 KO cells were investigated in vitro and in vivo. In the PDHA1 KO cells, the glycolysis and the consumption of glucose and glutamine were significantly enhanced, while the OXPHOS was significantly suppressed, implying Warburg effect in the PDHA1 KO cells. Furthermore, it was also proved in vitro experiments that the PDHA1 KO cell obtained proliferation advantage, as well as significantly greater chemotherapy tolerance and migration ability. Xenograft experiments discovered not only larger tumors but also increased angiogenesis in the PDHA1 KO cell group.</AbstractText>
<AbstractText Label="Conclusion" NlmCategory="UNASSIGNED">Inhibition of <i>PDHA1</i> gene expression in human ESCC leads to metabolic reprogramming of Warburg effect and increased malignancies. Targeting ESCC metabolic reprogramming may become a potential therapeutic target.</AbstractText>
<CopyrightInformation>© 2019 Liu et al.</CopyrightInformation>
</Abstract>
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
<LastName>Liu</LastName>
<ForeName>Lan</ForeName>
<Initials>L</Initials>
<Identifier Source="ORCID">0000-0002-0904-7417</Identifier>
<AffiliationInfo>
<Affiliation>Department of Pathology, School of Basic Medical Sciences, Zhengzhou University, Zhengzhou, Henan Province, People's Republic of China.</Affiliation>
</AffiliationInfo>
<AffiliationInfo>
<Affiliation>Academy of Medical Science, Zhengzhou University, Zhengzhou, Henan Province, People's Republic of China.</Affiliation>
</AffiliationInfo>
<AffiliationInfo>
<Affiliation>Department of Pathology, The Norwegian Radium Hospital, Oslo University Hospital, Institute of Clinical Medicine, University of Oslo, Montebello, Oslo, Norway.</Affiliation>
</AffiliationInfo>
</Author>
<Author ValidYN="Y">
<LastName>Cao</LastName>
<ForeName>Jing</ForeName>
<Initials>J</Initials>
<AffiliationInfo>
<Affiliation>Department of Pathology, The Third Affiliated Hospital of Zhengzhou University, Zhengzhou, Henan Province, People's Republic of China.</Affiliation>
</AffiliationInfo>
</Author>
<Author ValidYN="Y">
<LastName>Zhao</LastName>
<ForeName>Jing</ForeName>
<Initials>J</Initials>
<AffiliationInfo>
<Affiliation>Department of Oncology, The First Affiliated Hospital of Zhengzhou University, Zhengzhou, Henan Province, People's Republic of China.</Affiliation>
</AffiliationInfo>
</Author>
<Author ValidYN="Y">
<LastName>Li</LastName>
<ForeName>Xiangyu</ForeName>
<Initials>X</Initials>
<AffiliationInfo>
<Affiliation>Department of Oncology, The First Affiliated Hospital of Zhengzhou University, Zhengzhou, Henan Province, People's Republic of China.</Affiliation>
</AffiliationInfo>
</Author>
<Author ValidYN="Y">
<LastName>Suo</LastName>
<ForeName>Zhenhe</ForeName>
<Initials>Z</Initials>
<AffiliationInfo>
<Affiliation>Department of Pathology, The Norwegian Radium Hospital, Oslo University Hospital, Institute of Clinical Medicine, University of Oslo, Montebello, Oslo, Norway.</Affiliation>
</AffiliationInfo>
</Author>
<Author ValidYN="Y">
<LastName>Li</LastName>
<ForeName>Huixiang</ForeName>
<Initials>H</Initials>
<AffiliationInfo>
<Affiliation>Department of Pathology, School of Basic Medical Sciences, Zhengzhou University, Zhengzhou, Henan Province, People's Republic of China.</Affiliation>
</AffiliationInfo>
<AffiliationInfo>
<Affiliation>Department of Pathology, The First Affiliated Hospital of Zhengzhou University, Zhengzhou, Henan Province, People's Republic of China.</Affiliation>
</AffiliationInfo>
</Author>
</AuthorList>
<Language>eng</Language>
<PublicationTypeList>
<PublicationType UI="D016428">Journal Article</PublicationType>
</PublicationTypeList>
<ArticleDate DateType="Electronic">
<Year>2019</Year>
<Month>11</Month>
<Day>18</Day>
</ArticleDate>
</Article>
<MedlineJournalInfo>
<Country>New Zealand</Country>
<MedlineTA>Onco Targets Ther</MedlineTA>
<NlmUniqueID>101514322</NlmUniqueID>
<ISSNLinking>1178-6930</ISSNLinking>
</MedlineJournalInfo>
<KeywordList Owner="NOTNLM">
<Keyword MajorTopicYN="N">CRISPR/Cas9</Keyword>
<Keyword MajorTopicYN="N">ESCC</Keyword>
<Keyword MajorTopicYN="N">KYSE450</Keyword>
<Keyword MajorTopicYN="N">PDHA1</Keyword>
<Keyword MajorTopicYN="N">Warburg effect</Keyword>
<Keyword MajorTopicYN="N">xenotransplantation</Keyword>
</KeywordList>
<CoiStatement>The authors report no conflicts of interest in this work.</CoiStatement>
</MedlineCitation>
<PubmedData>
<History>
<PubMedPubDate PubStatus="received">
<Year>2019</Year>
<Month>08</Month>
<Day>12</Day>
</PubMedPubDate>
<PubMedPubDate PubStatus="accepted">
<Year>2019</Year>
<Month>10</Month>
<Day>31</Day>
</PubMedPubDate>
<PubMedPubDate PubStatus="entrez">
<Year>2019</Year>
<Month>12</Month>
<Day>11</Day>
<Hour>6</Hour>
<Minute>0</Minute>
</PubMedPubDate>
<PubMedPubDate PubStatus="pubmed">
<Year>2019</Year>
<Month>12</Month>
<Day>11</Day>
<Hour>6</Hour>
<Minute>0</Minute>
</PubMedPubDate>
<PubMedPubDate PubStatus="medline">
<Year>2019</Year>
<Month>12</Month>
<Day>11</Day>
<Hour>6</Hour>
<Minute>1</Minute>
</PubMedPubDate>
</History>
<PublicationStatus>epublish</PublicationStatus>
<ArticleIdList>
<ArticleId IdType="pubmed">31819487</ArticleId>
<ArticleId IdType="doi">10.2147/OTT.S226851</ArticleId>
<ArticleId IdType="pii">226851</ArticleId>
<ArticleId IdType="pmc">PMC6874154</ArticleId>
</ArticleIdList>
<ReferenceList>
<Reference>
<Citation>Proc Natl Acad Sci U S A. 2002 Aug 20;99(17):11205-10</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">12163646</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>J Cardiovasc Transl Res. 2013 Feb;6(1):10-21</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">23247633</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Anticancer Res. 2015 Oct;35(10):5533-8</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">26408721</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>PLoS Biol. 2018 Jul 27;16(7):e2005869</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">30052635</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell Metab. 2016 Jan 12;23(1):27-47</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">26771115</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Hepatology. 2015 Oct;62(4):1145-59</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">26082033</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell. 1997 Feb 7;88(3):323-31</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">9039259</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Int J Biochem Mol Biol. 2012;3(1):1-27</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">22509477</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell. 2011 Mar 4;144(5):646-74</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">21376230</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Proc Natl Acad Sci U S A. 2015 May 26;112(21):6539-44</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">25964345</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Oncotarget. 2017 Feb 21;8(8):13344-13356</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">28076853</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Mol Cell Biol. 2004 Feb;24(3):976-84</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">14729946</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell Metab. 2015 Mar 3;21(3):392-402</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">25738455</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>J Cancer. 2016 Mar 26;7(6):711-21</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">27076853</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Curr Oncol Rep. 2009 Mar;11(2):111-6</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">19216842</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Mol Med Rep. 2014 Apr;9(4):1299-304</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">24535197</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>N Engl J Med. 1986 Sep 11;315(11):657-63</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">2943992</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>World J Gastroenterol. 2018 Nov 7;24(41):4679-4690</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">30416315</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cells. 2019 Jan 26;8(2):</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">30691108</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Nat Rev Cancer. 2004 Oct;4(10):793-805</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">15510160</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Mol Cancer Res. 2003 Dec;1(14):1001-8</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">14707283</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Sci Rep. 2019 Feb 11;9(1):1729</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">30742053</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell. 1992 Aug 21;70(4):523-6</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">1505019</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Drug Resist Updat. 2018 May;38:1-11</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">29857814</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>J Surg Oncol. 2015 Mar 15;111(4):414-22</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">25488476</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Med Sci Monit. 2019 Jul 31;25:5666-5673</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">31363077</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell Stem Cell. 2015 May 7;16(5):547-55</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">25865501</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Trends Mol Med. 2011 Jul;17(7):347-62</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">21481637</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell. 1998 Oct 2;95(1):5-8</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">9778240</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Oncotarget. 2016 Jan 12;7(2):1395-407</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">26593251</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Genes Dev. 1999 Jan 15;13(2):152-7</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">9925639</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Mol Genet Metab. 2012 Jul;106(3):385-94</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">22896851</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Oncotarget. 2015 Nov 10;6(35):37398-409</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">26460957</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Nature. 2013 Jun 6;498(7452):109-12</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">23685455</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Nat Genet. 1998 Dec;20(4):398-400</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">9843217</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>EMBO J. 2004 Sep 15;23(18):3689-99</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">15343266</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Haematologica. 2014 May;99(5):858-64</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">24334295</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cancer Biol Med. 2014 Mar;11(1):1-19</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">24738035</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>AAPS J. 2015 Jan;17(1):65-82</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">25236865</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Tumour Biol. 2016 Jan;37(1):405-12</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">26219901</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Nat Cell Biol. 2015 Apr;17(4):351-9</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">25774832</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>J Exp Clin Cancer Res. 2015 Dec 30;34:159</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">26714461</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Oncogene. 1999 Dec 13;18(53):7637-43</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">10618703</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Ann Oncol. 2018 Jan 1;29(1):264-270</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">29045536</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Science. 1956 Aug 10;124(3215):269-70</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">13351639</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell Metab. 2006 Mar;3(3):177-85</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">16517405</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Clin Cancer Res. 2014 May 15;20(10):2595-606</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">24634381</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>EMBO J. 2006 Jun 7;25(11):2615-22</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">16757976</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cell Stem Cell. 2012 Nov 2;11(5):596-606</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">23122287</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cancer Biol Ther. 2014;15(11):1533-41</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">25482950</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Cancer Lett. 2013 Jan 1;328(1):18-26</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">22922303</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Ann N Y Acad Sci. 2016 Oct;1381(1):66-73</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">27399176</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>J Neurosci. 2011 Mar 30;31(13):4858-67</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">21451024</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Science. 1956 Feb 24;123(3191):309-14</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">13298683</ArticleId>
</ArticleIdList>
</Reference>
</ReferenceList>
</PubmedData>
</PubmedArticle>

</PubmedArticleSet>
 
Old 12-06-2020, 04:13 AM   #26
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

Quote:
Originally Posted by pan64 View Post
Thank you for your post.

It looks like that this adv had been updated (in wxpython?) since original script was written as my previous post (dated 07-07-2020). And to make my life complicated, Debian packages are not quite updated. I need to straighten these knots.

So far, the suggested trick has not been worked, but one step ahead.

cheers

Last edited by kaz2100; 12-06-2020 at 04:14 AM. Reason: typo
 
Old 12-06-2020, 06:00 AM   #27
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,134
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
That way that you posted that destroys the line numbers, and therefor makes it impossible to parse with an xml parser.

I saved that as test.xml to look at it.
You can't have that xml file with all separate lines.

You should have posted that between code tags to preserve the format.

What was it that you were wanting from that again? I looked at what you posted,

When you save that xml file properly, the way it comes from the server, then this should parse these example items and spit them out.

testxml.py
Code:
#!/usr/bin/python

from xml.etree import ElementTree
from urllib import request

#Make a user agent string for urllib to use
agent = ('Mozilla/5.0 (Windows NT 10.1; Win64; x64; rv:78.0) '
        'Gecko/20100101 Firefox/78.0')
        
user_agent = {'User-Agent': agent}

class MakeList():
    def __init__(self, url, fname):
    
        #Get the xml to parse
        req = request.Request(url, data=None, headers=user_agent)
        html = request.urlopen(req)
        tree = ElementTree.parse(html)
        root = tree.getroot()
        
        #Get tag data
        tagA = root.findall('./PubmedArticleSet/item/Year')
        tagB = root.findall('./PubmedArticleSet/item/Volume')
        tagC = root.findall('./PubmedArticleSet/item/Title')
        tagD = []
        
        #Append lines with separator
        for a,b,c in zip(tagA,tagB,tagC):
            tagD.extend([a.text, b.text, c.text, '_' * 70])
            
        #Print
        for i in tagD:
            print(i)
                
        #Write list to file
        with open((fname), 'a') as f:
            for line in tagD:
                f.write('%s\n' % line)
                
if __name__ == "__main__":
    
    #Urls, log names
    A = ('http://...xml', 'Mylog.log')

    B = ('file:///local/file/test.xml', 'Mylog.log')
    
    #Choose xml source here
    url, fname = B

    MakeList(url, fname)
I think so, but without a valid url or valid xml file I can't be sure.

Edit: Fixed a line

Last edited by teckk; 12-06-2020 at 06:09 AM.
 
Old 12-07-2020, 01:30 AM   #28
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

teckk: Thank you for your reply and time. Apology for missing format, yes, I should have posted it with code tag. I currently try analyzing the code with your script. Probably, it will work, but not sure yet.

About wxpython version: While I was working on testing and stable Debian packages, situation accidentally (?) changed. With pycharm, core file chokes with exception at import. When run without IDE, some attribute error at same point.

It looks like a possible one step (either forward, sideways or backward)

cheers

Last edited by kaz2100; 12-07-2020 at 01:38 AM. Reason: typo
 
Old 12-08-2020, 12:44 AM   #29
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Original Poster
Rep: Reputation: 108Reputation: 108
Hya

self reply

Quote:
About wxpython version: While I was working on testing and stable Debian packages, situation accidentally (?) changed. With pycharm, core file chokes with exception at import. When run without IDE, some attribute error at same point.
I found that this error is
Code:
module 'wx' has no attribute 'wizard'
If I may go back to my post #1,
How to trace from python script to definition of <class 'AttributeError'>? Yes, this site has description, but something like C header file linked to script would be nicer. (Reason: No worry about python version!)

cheers
 
Old 12-08-2020, 07:11 AM   #30
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,134
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Read the python docs.
https://www.wxpython.org/
https://www.tutorialspoint.com/wxpython/index.htm
https://wiki.wxpython.org/wxPython
https://pythonhosted.org/wxPython/
https://github.com/wxWidgets/wxPython-Classic

Do you have a python script that is dated and doesn't work? That's normal for python. The python devs change python all the time. Backwards compatible and python are not synonyms.

You are going to have to learn python if you want to use python.
https://docs.python.org/3/
https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine
https://docs.python.org/3/library/tkinter.html
https://www.guru99.com/python-tutorials.html
https://www.programcreek.com/python/

Porting a python2 script to python3 may be a hard or impossible task. You'll have to do a rewrite, or use something else.

You can also get python help from the python shell.
Code:
python
Python 3.9.0 (default, Oct  7 2020, 23:09:01) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> from time import sleep
>>> help(sleep)
sleep(...)
    sleep(seconds)
    
    Delay execution for a given number of seconds.  The argument may be
    a floating point number for subsecond precision
    ...
I looked back through the thread. #29 posts, and you have yet not posted the python script that you are having problems with. Ok, you have had your hand held about enough now.

==========================================================================

Here is how your post should have looked.

Hey folks, I have a python script that does not work. Tell me what's wrong with this.
Code:
import time

for i in range(0, 10):
    print(i)
    sleep(1)
I get this error
Code:
0
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
NameError: name 'sleep' is not defined
I can't figure that out, can you. Answer: Yes I can.
 
  


Reply

Tags
backus, dijkstra, kay, naur, python


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to tell if implementing your Python code is a good idea LXer Syndicated Linux News 0 12-29-2019 07:31 PM
LXer: Python tricks for artists: How to add interactivity to any Python script LXer Syndicated Linux News 0 03-16-2017 06:12 PM
I have no coding or programming experience of any sort. Is Linux a good idea for me? taloncrewchief Linux - Newbie 13 11-26-2009 11:34 PM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
Good idea/bad idea: interface colors introuble General 5 10-30-2006 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration