looking for git with a solution - merge many pdfs to 1 pdf (no matter what language)
hi looking for git with a solution - merge many pdfs to 1 pdf (no matter what language) -- https://mail.python.org/mailman/listinfo/python-list
Hi!! im searching for a ready app of python for pdf combiner
Hi!! im searching for a ready app of python for pdf combiner what I need exactly is a pdf combiner for 20 + pdfs to combine them as one, do a merge -- https://mail.python.org/mailman/listinfo/python-list
python3.7 error PYQT5 - NameError: name 'self' is not defined
Hi when I disconnect the internet I get an error NameError: name 'self' is not defined. I really dont get it.. thanks all. Is that a bug? or my fault? Exception in thread Thread-1: Traceback (most recent call last): File "C:\programming Alon\stock market app\PROJECT\AlonStockMarket.py", line 93, in secret print(ping('google.com')) File "C:\programming Alon\stock market app\PROJECT\AlonStockMarket.py", line 72, in ping conn.connect((addr, 80)) socket.gaierror: [Errno 11001] getaddrinfo failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Alon\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 917, in _bootstrap_inner self.run() File "C:\Users\Alon\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "C:\programming Alon\stock market app\PROJECT\AlonStockMarket.py", line 95, in secret self.pushButton.setDisabled(True) NameError: name 'self' is not defined this is my code: import sys import requests from lxml import html import requests import urllib.request, urllib.error, urllib.parse import _thread from PyQt5 import QtCore, QtGui, QtWidgets import time import threading import ctypes # An included library with Python install. global flag global loopexit global UserSymbol global RadioButtonBellow global UserSymbol global UserStockPrice global RadioButtonAbove global SMScheckBox global varUser global varPass varUser=0 varPass=0 UserSymbol=0 RadioButtonBellow=0 RadioButtonAbove=0 UserSymbol=0 UserStockPrice=0 loopexit=0 from urllib.request import urlopen import time import random import struct import select import socket def chk(data): x = sum(x << 8 if i % 2 else x for i, x in enumerate(data)) & 0x x = (x >> 16) + (x & 0x) x = (x >> 16) + (x & 0x) return struct.pack('> 16) + (x & 0x) x = (x >> 16) + (x & 0x) return struct.pack(')")) self.checkBox.setText(_translate("AlonStockMarketApp", "SMS ALERT")) self.checkBox_2.setText(_translate("AlonStockMarketApp", "GMAIL ALERT")) self.radioButton_2.setText(_translate("AlonStockMarketApp", "Bellow Price (x<)")) self.pushButton.setText(_translate("AlonStockMarketApp", "START")) self.radioButton_3.setText(_translate("AlonStockMarketApp", "Get alert once a day")) self.radioButton_4.setText(_translate("AlonStockMarketApp", "Get alert every time")) self.pushButton_2.setText(_translate("AlonStockMarketApp", "EXIT")) self.textEdit_4.setHtml(_translate("AlonStockMarketApp", "http://www.w3.org/TR/REC-html40/strict.dtd\;>\n" "\n" "p, li { white-space: pre-wrap; }\n" "\n" "")) self.textEdit_5.setHtml(_translate("AlonStockMarketApp", "http://www.w3.org/TR/REC-html40/strict.dtd\;>\n" "\n" "p, li { white-space: pre-wrap; }\n" "\n" "")) self.label.setText(_translate("AlonStockMarketApp", "SYMBOL of stock:")) self.label_2.setText(_translate("AlonStockMarketApp", "PRICE :")) self.label_3.setText(_translate("AlonStockMarketApp", "User of Gmail:")) self.label_4.setText(_translate("AlonStockMarketApp", "Password of Gmail:")) self.label_5.setText(_translate("AlonStockMarketApp", "ALON STOCK MARKET APP")) self.pushButton_3.setText(_translate("AlonStockMarketApp", "STOP")) self.textEdit.setHtml(_translate("AlonStockMarketApp", "http://www.w3.org/TR/REC-html40/strict.dtd\;>\n" "\n" "p, li { white-space: pre-wrap; }\n" "\n" "")) self.textEdit_7.setHtml(_translate("AlonStockMarketApp", "http://www.w3.org/TR/REC-html40/strict.dtd\;>\n" "\n" "p, li { white-space: pre-wrap; }\n" "\n" "")) self.minimize.setText(_translate("AlonStockMarketApp", "Minimize")) self.pushButton_4.setText(_translate("AlonStockMarketApp", "Sign In")) self.textEdit_2.setHtml(_translate("AlonStockMarketApp", "http://www.w3.org/TR/REC-html40/strict.dtd\;>\n" "\n" "p, li { white-space: pre-wrap; }\n" "\n" "")) self.label_8.setText(_translate("AlonStockMarketApp", "Phone number (for SMS):")) self.label_7.setText(_translate("AlonStockMarketApp", "Password:")) self.label_6.setText(_translate("AlonStockMarketApp", "User:")) if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) AlonStockMarketApp = QtWidgets.QDialog() ui = Ui_AlonStockMarketApp() ui.setupUi(AlonStockMarketApp) AlonStockMarketApp.show() sys.exit(app.exec_()) -- https://mail.python.org/mailman/listinfo/python-list
python3.7 problem with validation - it doesnt work
python3.7 problem with validation - it doesn't work. I added 2 variables to the IF of the validation: global UserGmail global PassGmail here is the code: import sys import requests from lxml import html import requests import urllib.request, urllib.error, urllib.parse import _thread from PyQt5 import QtCore, QtGui, QtWidgets import time import threading import ctypes # An included library with Python install. global flag global loopexit global UserSymbol global RadioButtonBellow global UserSymbol global UserStockPrice global RadioButtonAbove global SMScheckBox global UserGmail global PassGmail UserSymbol=0 RadioButtonBellow=0 RadioButtonAbove=0 UserSymbol=0 UserStockPrice=0 UserGmail=0 PassGmail=0 loopexit=0 def get_quote(str): url="https://api.iextrading.com/1.0/stock/"+str+"/price; resource = urllib.request.urlopen(url) content = resource.read().decode(resource.headers.get_content_charset()) print (content) content=float(content) return content def myfunction(): import paramiko import sys global RadioButtonBellow global UserSymbol global UserStockPrice global RadioButtonAbove global UserGmail global PassGmail print(UserGmail+" "+PassGmail) from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(687, 571) self.radioButton = QtWidgets.QRadioButton(Dialog) self.radioButton.setGeometry(QtCore.QRect(80, 190, 191, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton.setFont(font) self.radioButton.setObjectName("radioButton") self.buttonGroup_2 = QtWidgets.QButtonGroup(Dialog) self.buttonGroup_2.setObjectName("buttonGroup_2") self.buttonGroup_2.addButton(self.radioButton) self.checkBox = QtWidgets.QCheckBox(Dialog) self.checkBox.setGeometry(QtCore.QRect(290, 450, 131, 17)) font = QtGui.QFont() font.setPointSize(14) self.checkBox.setFont(font) self.checkBox.setObjectName("checkBox") self.checkBox_2 = QtWidgets.QCheckBox(Dialog) self.checkBox_2.setGeometry(QtCore.QRect(290, 480, 141, 17)) font = QtGui.QFont() font.setPointSize(14) self.checkBox_2.setFont(font) self.checkBox_2.setObjectName("checkBox_2") self.radioButton_2 = QtWidgets.QRadioButton(Dialog) self.radioButton_2.setGeometry(QtCore.QRect(300, 190, 186, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton_2.setFont(font) self.radioButton_2.setObjectName("radioButton_2") self.buttonGroup_2.addButton(self.radioButton_2) self.pushButton = QtWidgets.QPushButton(Dialog) self.pushButton.setEnabled(True) self.pushButton.setGeometry(QtCore.QRect(60, 460, 72, 31)) font = QtGui.QFont() font.setPointSize(14) self.pushButton.setFont(font) self.pushButton.setObjectName("pushButton") self.radioButton_3 = QtWidgets.QRadioButton(Dialog) self.radioButton_3.setGeometry(QtCore.QRect(80, 250, 191, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton_3.setFont(font) self.radioButton_3.setObjectName("radioButton_3") self.buttonGroup = QtWidgets.QButtonGroup(Dialog) self.buttonGroup.setObjectName("buttonGroup") self.buttonGroup.addButton(self.radioButton_3) self.radioButton_4 = QtWidgets.QRadioButton(Dialog) self.radioButton_4.setGeometry(QtCore.QRect(300, 250, 186, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton_4.setFont(font) self.radioButton_4.setObjectName("radioButton_4") self.buttonGroup.addButton(self.radioButton_4) self.pushButton_2 = QtWidgets.QPushButton(Dialog) self.pushButton_2.setGeometry(QtCore.QRect(30, 20, 75, 31)) font = QtGui.QFont() font.setPointSize(14) self.pushButton_2.setFont(font) self.pushButton_2.setObjectName("pushButton_2") self.textEdit_4 = QtWidgets.QTextEdit(Dialog) self.textEdit_4.setGeometry(QtCore.QRect(310, 383, 221, 38)) font = QtGui.QFont() font.setPointSize(16) self.textEdit_4.setFont(font) self.textEdit_4.setObjectName("textEdit_4") self.textEdit_5 = QtWidgets.QTextEdit(Dialog) self.textEdit_5.setGeometry(QtCore.QRect(310, 340, 221, 38)) font = QtGui.QFont() font.setPointSize(16) self.textEdit_5.setFont(font) self.textEdit_5.setObjectName("textEdit_5") self.label = QtWidgets.QLabel(Dialog) self.label.setGeometry(QtCore.QRect(150, 80, 111, 16)) font = QtGui.QFont() font.setPointSize(14) self.label.setFont(font) self.label.setObjectName("label") self.label_2 =
python3.7 - how to open a new thread and close the old each click on a button?
hii all, python3.7 - how to open a new thread and close the old each click on a button? here is my code: # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'AlonStockMarket.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All changes made in this file will be lost! import time import sys import requests from lxml import html import requests import urllib.request, urllib.error, urllib.parse import _thread from PyQt5 import QtCore, QtGui, QtWidgets import threading global flag global loopexit flag=0 loopexit=0 def get_quote(str): url="https://api.iextrading.com/1.0/stock/"+str+"/price; resource = urllib.request.urlopen(url) content = resource.read().decode(resource.headers.get_content_charset()) print (content) content=float(content) return content def myfunction(): global flag global loopexit print ("Executing myfunction in thread: ") print("hello, world") while loopexit!=1: if (loopexit==1): break time.sleep(15) f=open("flag.txt", "r") if f.mode == 'r': flag =f.read() timeHour = int(time.strftime('%H')) print("keep alive") print (time.strftime('%H:%M:%S')) while ((timeHour>16) and (timeHour<23) and loopexit!=1): if (loopexit==1): break print(time.strftime('%H:%M:%S')) price=get_quote(UserSymbol) time.sleep(5) if flag!=time.strftime("%d/%m/%Y") and price>UserStockPrice and (RadioButtonAbove==True): print ("send SMS") import requests requests.post('https://textbelt.com/text', { 'phone': '+972541234567', 'message': "Hi Alon Najman,EVOK value: "+price, 'key': 'secret', }) #write to file with open("flag.txt", "w") as text_file: text_file.write(format(time.strftime("%d/%m/%Y"))) #read from file f=open("flag.txt", "r") if f.mode == 'r': flag =f.read() if flag!=time.strftime("%d/%m/%Y") and pricehttps://textbelt.com/text', { 'phone': '+972546233257', 'message': "Hi Alon Najman,EVOK value: "+price, 'key': 'secret', }) #write to file with open("flag.txt", "w") as text_file: text_file.write(format(time.strftime("%d/%m/%Y"))) #read from file f=open("flag.txt", "r") if f.mode == 'r': flag =f.read() from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(666, 571) self.radioButton = QtWidgets.QRadioButton(Dialog) self.radioButton.setGeometry(QtCore.QRect(80, 190, 191, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton.setFont(font) self.radioButton.setObjectName("radioButton") self.buttonGroup_2 = QtWidgets.QButtonGroup(Dialog) self.buttonGroup_2.setObjectName("buttonGroup_2") self.buttonGroup_2.addButton(self.radioButton) self.checkBox = QtWidgets.QCheckBox(Dialog) self.checkBox.setGeometry(QtCore.QRect(290, 450, 131, 17)) font = QtGui.QFont() font.setPointSize(14) self.checkBox.setFont(font) self.checkBox.setObjectName("checkBox") self.checkBox_2 = QtWidgets.QCheckBox(Dialog) self.checkBox_2.setGeometry(QtCore.QRect(290, 480, 141, 17)) font = QtGui.QFont() font.setPointSize(14) self.checkBox_2.setFont(font) self.checkBox_2.setObjectName("checkBox_2") self.radioButton_2 = QtWidgets.QRadioButton(Dialog) self.radioButton_2.setG
python 3.7 - I try to close the thread without closing the GUI is it possible?
python 3.7 - I try to close the thread without closing the GUI is it possible? here is my code, sorry I'm am new with python and generally with code XD . thanks all # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'AlonStockMarket.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All changes made in this file will be lost! import time import sys import requests from lxml import html import requests import urllib.request, urllib.error, urllib.parse import _thread from PyQt5 import QtCore, QtGui, QtWidgets from multiprocessing import Pool global flag import threading import time exitFlag = 0 class myThread (threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init__(self) self.threadID = threadID self.name = name self.counter = counter def run(self): print ("Starting " + self.name) print_time(self.name, self.counter, 5) print ("Exiting " + self.name) def print_time(threadName, delay, counter): print("hello, world") while True: time.sleep(15) f=open("flag.txt", "r") if f.mode == 'r': flag =f.read() timeHour = int(time.strftime('%H')) print("keep alive") print (time.strftime('%H:%M:%S')) while ((timeHour>16) and (timeHour<23)): print(time.strftime('%H:%M:%S')) price=get_quote('evok') time.sleep(5) if flag!=time.strftime("%d/%m/%Y") and price>4: print ("send SMS") import requests requests.post('https://textbelt.com/text', { 'phone': '+972546233257', 'message': "Hi Alon Najman,EVOK value: "+Price, 'key': 'secret', }) #write to file with open("flag.txt", "w") as text_file: text_file.write(format(time.strftime("%d/%m/%Y"))) #read from file f=open("flag.txt", "r") if f.mode == 'r': flag =f.read() # Create new threads thread1 = myThread(1, "Thread-1", 1) # Start new Threads def get_quote(str): url="https://api.iextrading.com/1.0/stock/"+str+"/price; resource = urllib.request.urlopen(url) content = resource.read().decode(resource.headers.get_content_charset()) print (content) content=float(content) return content class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(666, 571) self.radioButton = QtWidgets.QRadioButton(Dialog) self.radioButton.setGeometry(QtCore.QRect(80, 190, 191, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton.setFont(font) self.radioButton.setObjectName("radioButton") self.buttonGroup_2 = QtWidgets.QButtonGroup(Dialog) self.buttonGroup_2.setObjectName("buttonGroup_2") self.buttonGroup_2.addButton(self.radioButton) self.checkBox = QtWidgets.QCheckBox(Dialog) self.checkBox.setGeometry(QtCore.QRect(290, 450, 131, 17)) font = QtGui.QFont() font.setPointSize(14) self.checkBox.setFont(font) self.checkBox.setObjectName("checkBox") self.checkBox_2 = QtWidgets.QCheckBox(Dialog) self.checkBox_2.setGeometry(QtCore.QRect(290, 480, 141, 17)) font = QtGui.QFont() font.setPointSize(14) self.checkBox_2.setFont(font) self.checkBox_2.setObjectName("checkBox_2") self.textEdit = QtWidgets.QTextEdit(Dialog) self.textEdit.setGeometry(QtCore.QRect(130, 20, 321, 41)) self.textEdit.setObjectName("textEdit") self.radioButton_2 = QtWidgets.QRadioButton(Dialog) self.radioButton_2.setGeometry(QtCore.QRect(300, 190, 186, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton_2.setFont(font) self.radioButton_2.setObjectName("radioButton_2") self.buttonGroup_2.addButton(self.radioButton_2) self.pushButton = QtWidgets.QPushButton(Dialog) self.pushButton.setGeometry(QtCore.QRect(60, 460, 72, 31)) font = QtGui.QFont() font.setPointSize(14) self.pushButton.setFont(font) self.pushButton.setObjectName("pushButton") self.radioButton_3 = QtWidgets.QRadioButton(Dialog) self.radioButton_3.setGeometry(QtCore.QRect(80, 250, 191, 24)) font = QtGui.QFont() font.setPointSize(14) self.radioButton_3.setFont(font) self.radioButton_3.se
GUI, Python2.7- how to build a loop with a button + textbox
hi, on python 2.7 how do I build a loop with a button + textbox? for example: I want the user to enter is name and then press "ok" button, I want his name to be printed 5 times. thanks! :) you people are amazing it's almost better then stackoverflow :D -- https://mail.python.org/mailman/listinfo/python-list
on rasberry pi 3 python 2.7 , trying to run code on geckodriver with selenium and getting error
hi , on rasberry pi 3 python 2.7 , trying to run code on geckodriver with selenium and getting an error the Firefox browser is opened automatically :) it just don't work I'm not getting the stock value on the print BTW it works on my PC with ChromeDriver - Traceback (most recent call last): File "/home/pi/Desktop/Automation RatiL works on PC.py", line 22, in driver.get('https://www.investing.com/equities/ratio-par') File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 248, in get self.execute(Command.GET, {'url': url}) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute response = self.command_executor.execute(driver_command, params) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 401, in execute return self._request(command_info[0], url, body=data) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 433, in _request resp = self._conn.getresponse() File "/usr/lib/python2.7/httplib.py", line , in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 444, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 408, in _read_status raise BadStatusLine(line) BadStatusLine: '' thanks all -- https://mail.python.org/mailman/listinfo/python-list
I try to run selenium with firefox on RasberyPi3 ARM7 , any idea if it possible?
I try to run selenium with firefox on RasberyPi3 ARM7 , any idea if it possible? what should I do? I don't mind to change to another driver -- https://mail.python.org/mailman/listinfo/python-list
I try to edit and find data from a text file with python 2.7 (data from stock market)
hi, I try to edit a text file with python 2.7: * AAPL * Date: September 07 2018 Time: 14:10:52 Price: ,068,407 Ask: None High: None Low: None Previous Close: ,068,407 Volume: $ 227.35 / $ 221.30 Market Cap: 20.23 but when I write it to a file I get: {'previous_close': ',068,407', 'volume': u'$\xa0227.35\xa0/\xa0$\xa0221.30', 'market_cap': '20.23', 'price': ',068,407', 'high': 'None', 'ask': 'None', 'low': 'None', 'time': '14:15:45', 'date': 'September 07 2018', 'ticker': 'AAPL'} why is that? and how do I get the price value only? so I will have only that in a variable? for example the variable: Price. this is my code.. import csv import itertools from nasdaq_stock import nasdaq_stock x=str(nasdaq_stock.stock('AAPL')) with open("log.txt", "w") as text_file: text_file.write(format(x)) with open('log.txt', 'r') as in_file: lines = in_file.read().splitlines() stripped = [line.replace(","," ").split() for line in lines] grouped = itertools.izip(*[stripped]*1) with open('log.csv', 'w') as out_file: writer = csv.writer(out_file) writer.writerow(('title', 'intro', 'tagline')) for group in grouped: writer.writerows(group) #locate cell import csv def read_cell(x, y): with open('log.csv', 'r') as f: reader = csv.reader(f) y_count = 0 for n in reader: if y_count == y: cell = n[x] return cell y_count += 1 #I try to find the value of Price.. print (read_cell(2,3)) -- https://mail.python.org/mailman/listinfo/python-list
Re: Hi I'm trying to get live data from stock using python , is it poss
On Tuesday, September 4, 2018 at 7:21:31 PM UTC+3, alon@gmail.com wrote: > Hi , > for example: > I want to know if AAPL is more than value 300 and if it does I want it to send to me mail with gmail :) . thanks for the help.. im using python 2.7 -- https://mail.python.org/mailman/listinfo/python-list
Hi I'm trying to get live data from stock using python , is it possible
Hi , for example: I want to know if AAPL is more than value 300 and if it does I want it to send to me mail with gmail :) . thanks for the help.. -- https://mail.python.org/mailman/listinfo/python-list
Re: Hi I'm trying to get live data from stock using python , is it possible?
On Tuesday, September 4, 2018 at 7:21:31 PM UTC+3, alon@gmail.com wrote: > Hi , > for example: > I want to know if AAPL is more than value 300 and if it does I want it to > send to me mail with gmail :) . thanks for the help.. im using python 2.7 -- https://mail.python.org/mailman/listinfo/python-list
Hi I'm trying to get live data from stock using python , is it possible?
Hi , for example: I want to know if AAPL is more than value 300 and if it does I want it to send to me mail with gmail :) . thanks for the help.. -- https://mail.python.org/mailman/listinfo/python-list
Re: how to get a value from CSV specific cell (A7) thanks
On Saturday, September 1, 2018 at 9:19:29 PM UTC+3, alon@gmail.com wrote: > how to get a value from CSV specific cell (A7) thanks thanks all ! -- https://mail.python.org/mailman/listinfo/python-list
how to get a value from CSV specific cell (A7) thanks
how to get a value from CSV specific cell (A7) thanks -- https://mail.python.org/mailman/listinfo/python-list
Re: program that search string in text file and do something
On Friday, August 4, 2017 at 12:27:02 PM UTC+3, ast wrote: >a écrit dans le message de > news:b6cc4ee5-71be-4550-be3e-59ebeee7a...@googlegroups.com... > > Hi, I'm new to thing forum and to this programming in python! > > > > can someone help me and write me how to write a program that do: > > - search for a string in certain text file and if it founds the string it > > delete the file? and > > print something? > > > > thanks. > > import os > pattern = "azerty" > found = False > > with open("foo.txt", "r") as f: > for line in f: > if pattern in line: > found = True > break > > if found: > os.remove("foo.txt") thanks man! that works -- https://mail.python.org/mailman/listinfo/python-list
program that search string in text file and do something
Hi, I'm new to thing forum and to this programming in python! can someone help me and write me how to write a program that do: - search for a string in certain text file and if it founds the string it delete the file? and print something? thanks. -- https://mail.python.org/mailman/listinfo/python-list