Python的脚本路径和shell路径的问题


在使用过程中遇到一个情况,就是在crontab中执行脚本的时候,出现无法载入要调用的文件的问题(要调用的文件和脚本放在相同目录下),测试结果发现是因为crontab执行的时候所在的目录,并不在脚本所在的目录位置,而脚本中写的是调用当前位置的文件,导致了整个错误。
Phentermine With Prescription And Facts
Cheap Generic Phentermine
Buy Href Phentermine
Tramadol 50 Mg 377
Order Phentermine Site
Phentermine False Postive
Bariatric Clinic Phentermine Greensboro Nc
Phentermine Op
Tramadol Online Tramadol Hcl Tramadol Cheap
Board Buy Online Tramadol Yy
Makr Of Tramadol
Drug Interactions Tramadol Elavil
Phentermine Pharmacology
Inition Co Uk Generic Tramadol
Other Names For Phentermine
Pravachol Protonix Phentermine Skelaxin
Buy Phentermine Check Money Order
Discount Generic Phentermine No Rx Needed
What Is Phentermine Made Of
Phentermine Weightloss Pill
Overnight Delivery Phentermine 37.5
Phentermine Online Sale
Tion What Is Tramadol
Phentermine Free Consultation Free Shipping
Effects Long Phentermine Term
Phentermine Online Pharmacies
Buy Phentermine Epharmacist
Discount Phentermine Pills
Data Recovery Tramadol
Where To Buy Phentermine Without A Prescription Canada
Check Online Order Personal Phentermine
4.01 Buy Cheap N Phentermine
Order Phentermine Online By Check
Tramadol Rxlist
No Doctors Prescription Required Phentermine
No Insurance Tramadol
Tramadol Medicines
Detox Diet Diet Phentermine Pill
What Otc Medications Is Phentermine In
Cheapest Prescription Phentermine
New Jersey Phentermine Pharmacy
Tramadol Withdraw Help
Phentermine 37.5mg No Prescription
Alabama Weight Loss Doctor Phentermine
Tramadol 180 Cheap Cod
California Phentermine
Buy Phentermine Without Script Fast Delivery
No Prescriptions Phentermine 37.5mg
Does Phentermine Have The Drug Phenylpropanolamine
Buy Cheap Prescription Tramadol
Combining Tylenol 3 And Tramadol
Phentermine Rx Online
Buy Link Online.50webs.com Tramadol
Buy Tramadol Online 200 Overnight
30mg Ordering Phentermine Pill
Delivered Overnight Phentermine
Buy Tramadol Online Buy
Adipex Phentermine Journals Quizilla
Tramadol Tramadol Hci
Ordering Tramadol 100 Mg On Line
Hydrocodone And Tramadol Taken Together
Cheap Retin Tramadol
Rxscripts Phentermine
Next Day Air Tramadol Ups
Tramadol Overnight Free Shipping
Does Phentermine Test Positive For Amphetimines
Tramadol 180 3 00
Information Phentermine
Phentermine Directly And Discreetly Adipex
30mg Phentermine Order
Phentermine On Line Consultation
Tramadol Discounts Available
Get Phentermine Best Online Pharmacy
Cheapest Phentermine Fed X Overnight Purephentermine
Phentermine Drug Information Phentermine Side Effects
Phentermine Results On Drug Tests
Tramadol Pain Pill Side Effects
Black Hole Phentermine
Tramadol Online Arder
B2commentspopup Phentermine
Cicio Cheap_phentermine Html
Tramadol Tramadol Hci Online Cheap Pharmacy
Herbal Phentermine Does It Work
Tramadol Proper Doses For Dogs
Cardinal Health Phentermine Diet Pill
Phentermine Contents
Compare Phentermine Prices Us Licensed Pharmacies
Phentermine W O Rx
Phentermine Buy Cheap Phentermine Pills Online
Phentermine Forums And Ch
Precription Drugs Online Phentermine Adipex Tramadol
Phentermine 37.5 Mg For Less
Tramadol 100 Mg
Phentermine Free Dr Consult
Wesites Selling No Perscription Phentermine
Phentermine Manic Depression
Cost Of Tramadol
Tramadol Side Effects For Dogs
Active Ingriedients In Phentermine
Diet Drug Phentermine
Lowest Price Phentermine On Line
Tramadol Tamoxifen Online
Phentermine Sold Without A Prescription
Fda Us Approved Phentermine
1 50mg Tramadol
Tramadol Chemistry
Getting High On Tramadol
Phentermine Apidex P
Cheap Phentermine Free Consult
Guestbook Phentermine 37.5 Mg
Tramadol Opiate Drug Testing
On Line Phentermine
Discount Phentermine No Perscription Needed
European Phentermine Without Prescription
Phentermine 90ct
Phentermine Menstrual Cycle
Dr Consultation Phentermine
Tramadol All About
Tramodol Tramadol 180 Tablets
Generic Versions Of Phentermine
Phentermine Sibutramine Best Prices
Urine Drug Testing For Tramadol
Buy Phentermine No Presrciption
Sibutramine Phentermine
Buy Cheap Domain Online Mihey Org Phentermine Phentermine
Buying Phentermine Online Gt
Phentermine And Tips
Tramadol Detox Side Effects
Attleboroschools Com New Phentermine Buy
Phentermine Cod Saturday
Tramadol 50 Mg Tablets
Phentermine With No Prescription And No Monthly Fee
Phentermine Online No Prescription In Stock
Online Phentermine Order
Phentermine Testimonies
Phentermine Blue No Prescription Needed Check
Ordering 30mg Phentermine
Phentermine Next Day Ship Florida
Buy Phentermine Online Looking For Phentermine
3.58 Online Phentermine Purchase
Herbs Phentermine
Phentermine 30mg Yellow
Phentermine Guaranteed Overnight Delivery Usa Only
Cheapest Phentermine Fed X Overnight
Phentermine Rxdrug
Georgia Phentermine
Phentermine Ordered Cash On Delivery
3.58 N Online Phentermine Purchase
Diflucan Buy Tramadol Online Diflucan Online Buy Diflucan
Hydrocodon Loratab Loritab Tramadol
How Many Mg Does Tramadol Come In
Tramadol And Florida
Phentermine Via Fedex Without Prescription
Tramadol Euphoria Pharmacy
Place Of Tramadol In Practice
Phentermine Or Ionamin
What Are The Ingredients In Phentermine
Online Doctor Consultation Phentermine
Opiate Withdrawal After Tramadol
Phentermine 37 5mg
Phentermine Colombia
How To Prescribe Adipex P Phentermine
Tramadol Replacements
Cash On Delivery Tramadol
Doses Of Phentermine
Does Phentermine Show On Drug Test
Phentermine Diet Pills 30 Mg
Pharmacy Tech Career Tramadol
Your Best Phentermine Adipex Online Source
Phentermine Line Cheap
Lowest Tramadol Prices
Cheapest Phentermine Best Online Pharmacy
Mutual Pharmaceutical Phentermine Photo
Phentermine 37 5 Facts
Tramadol Therapy For Pain
Tramadol Epidural
Buy Phentermine Overnight Delivery
Phentermine Purchase Online No Prescription
Phentermine Pay With Paypal California
Phentermine Diet Pill Shopping
Buy Real Phentermine Online
Phentermine Work For Losi
Phentermine Molecule
Hydrocodone App And Tramadol Hcl Compare
Phentermine Prescriptions Get It Online
Duradrin With Phentermine
Order Phentermine No Prescription Overnight
Tramadol And Hydrocodone Mixing
Tramadol Hcl Chemical Supplier
Pliva Tramadol
Topomax And Phentermine
Online Pharmacies Phentermine Best Online Pharmacy
Disounted Phentermine
Purchase Phentermine Diet Pill Online
Where Can I Buy Some Mother Fucking Phentermine
No Rx Phentermine 30mg 90 120
Buy Phentermine Buy Phentermine Online Index
C O D Phentermine Buy On-line
Picture Pill Tramadol
Find Cheapest Tramadol Ambien
Phentermine Phendimetrazine
Diazepam Persciptions Tramadol Mg Tablet Diazepam
Tramadol Cheap Tramadol
Online Phentermine Online
Nih Nlm Phentermine
Heart Problems Phentermine
Detox Hgh Phentermine Quit Smoking
Effectiveness Of Phentermine
Order Prescription Phentermine
Phentermine Leap
Online Phentermine 37.5mg Prices
Buy Tramadol Online From Usa Pharmacy
What Is Tramadol With Codene
3.58 Online Pharmacy Phentermine
What Is Phentermine Used For
Tramadol And Vicadin
Discount Phentermine Free Shipping Discount Onl
Buy Phentermine Without Scrip
Generic Phentermine No Prescription
Phentermine 37.5 X 180
Buy Phentermine Without A Doctor’s Prescription
Cheap Phentermine 30 Mgs Caps
Phentermine Vipps
Burn Desert Ephedra Phentermine
Order By 2pm Get Phentermine Overnight
Free Online Prescription Phentermine 37.5
Cheap Phentermine Us Licensed Pharmacies
Phentermine And Planning To Become Pregnant
No Prescribtion Phentermine
Pharmacy Degree Tramadol On Line
Phentermine Discounts
Tramadol Sr
Lowest Cost Phentermine Overnight Delivery
Prescription Phentermine 37.5
California Mortgage Rate Buy Tramadol
Tramadol Age Limit
Phentermine Tired
Adipex Cod Diet P Phentermine Pill
Buy Phentermine Cheap
Tramadol Overnight No Prior
Phentermine Delivered C O D
Phentermine Us Online Consultation
Urine Testing Tramadol
Cheap Online Prescription Tramadol
Buy Cheap Phentermine
Phentermine Myftp Biz
Nexium Phentermine Actos Actos Ranitidine
Sisters Pharmacy Phentermine
Tramadol Patch
Chubbuddiesforum Phentermine Info Facts
Can Tramadol Cause Trouble Urinating
Phentermine Alternative
Cheap 120 Tramadol
Phentermine In Stock Now
No Prior Prescription Tramadol
Phentermine Not Legal What Now
Tramadol Snorting
No Prior Perscription Tramadol
250 Tramadol
Cheap Phentermine Yellow Us Licensed Pharmacies
Phentermine Pharmacutical Company
Tramadol Buzz
Herbal Phentermine 37.5
Babies Addicted To Tramadol
Phentermine Feedback
Adipex Buy Phentermine
Online Prescripion Cheap Tramadol
Tramadol Hci Effects On Brain
Phentermine Saturday
Hydrochloride Mallinckrodt Pharmaceutical Tablet Tramadol
Ultram Tramadol Hci
Tramadol Cod
Phentermine Us Online Script
Fda Approved Phentermine
Pregnancy Tramadol
Cheap Phentermine 37.5 Free Medical Consult
Phentermine 37.5 A 159
Phentermine Overnight Phentramine
Phentermine Cheap No Prescription Overnight
Phentermine Adipex Viagra
Phentermine Overnight No Prescription
Tramadol Overnigt Deliy
Depression Symptom Phentermine Diet Pill
Pharmacy Phentermine Us
Phentermine Vg Customers New Home
Phentermine Be C C 30 Mg
Diet Doctor Phentermine Pill
Phentermine Ups Shipping
Tramadol Versus Loritab For Pain
B Loss Phentermine Vitamin Weight
How Long Does Tramadol Withdrawal Last
Drug Metabolism Inhibition Tramadol
Tramadol With Ssri
Tramadol Pill Pictures
Phentermine By Phone No Script
Cheap Phentermine Rx
Phentermine Script Included
Tramadol Equianalgesic
Phentermine Ponte Veda Beach Doctor
Phentermine Echeck

随后修改如下:

filename = os.path.join(os.getcwd(), 'QQWry.Dat');

但是随即发现还是不行,原来 os.getcwd() 所代表的是shell执行的当前位置,如果你在命令行运行,则代表你所在的当前目录,并非脚本目录。

再次修改为:

filename = os.path.join(os.path.split( os.path.realpath( sys.argv[0] ) )[0], 'QQWry.Dat');

发现此次可以正常运行了。

再随后的资料查找中发现了更简单的写法:

filename = os.path.join(sys.path[0], 'QQWry.Dat');

至此,整个脚本针对该BUG修复完成。


感谢您的关注。您现在可以 留言(0)留下通告地址

Comments are closed.