Go to advanced search

by gray_farz
Wed Oct 18, 2017 10:15 am
Forum: Python
Topic: how to set button background with window background
Replies: 2
Views: 2879

Re: how to set button background with window background

Two things you could try Set the button's border width to zero button2 = Button(..., borderwidth=0) Or use a GIF image with transparency https://stackoverflow.com/questions/44331618/tkinter-button-image-transparent-background i tried 'borderwidth' before...its not usable.. my image doesn't have any...
by gray_farz
Thu Oct 12, 2017 7:59 am
Forum: Python
Topic: how to set button background with window background
Replies: 2
Views: 2879

how to set button background with window background

hello freinds i have put an image ( self.image ) on my window background now, i need to put another image( mi_but1) on this window.. my problem: image mi_but1 is put on window with a gray square behind it(a gray square between image mi_but1 and window's background) the final gui doesnt look nice i d...
by gray_farz
Tue Aug 15, 2017 4:29 am
Forum: Python
Topic: print a persian file by thermal printer and python-escpos mnodule
Replies: 8
Views: 2072

Re: print a persian file by thermal printer and python-escpos mnodule

topguy wrote:
Mon Aug 14, 2017 9:13 am
You have to hold the button in while turning it on.
holding 'feed' button gave me the following contents:
Image
by gray_farz
Tue Aug 15, 2017 4:17 am
Forum: Python
Topic: print a persian file by thermal printer and python-escpos mnodule
Replies: 8
Views: 2072

Re: print a persian file by thermal printer and python-escpos module

[*]Does the file my-text.png get created? [*]Does the image look at all like the text "بعض النصوص من جوجل ترجمة"? i think it is created...because it prints the question mark '?' exactly the same number of letters of "بعض النصوص من جوجل ترجمة" the space of between the letters is preserved,too... as ...
by gray_farz
Mon Aug 14, 2017 5:32 am
Forum: Python
Topic: print a persian file by thermal printer and python-escpos mnodule
Replies: 8
Views: 2072

Re: print a persian file by thermal printer and python-escpos mnodule

It doesnt matter what encoding you use unless you have a font in the printer with the correct symbols. Have you verified this ? my printer is TM-T20...I don't my printer's fonts...i couldn't it from its manual.. The printer have a pretty complex menu system you can access with holding in line-feed ...
by gray_farz
Mon Aug 14, 2017 4:22 am
Forum: Python
Topic: print a persian file by thermal printer and python-escpos mnodule
Replies: 8
Views: 2072

Re: print a persian file by thermal printer and python-escpos mnodule

Does the my-text.png file generated by your first script look correct to you? If so, the problem is more that your printer isn't printing bitmaps correctly. i have printed jpg and gif images by my printer.so i don't think my printer has prooblem in printing bitmaps Your second codepage example migh...
by gray_farz
Thu Aug 10, 2017 5:14 am
Forum: Python
Topic: print a persian file by thermal printer and python-escpos mnodule
Replies: 8
Views: 2072

print a persian file by thermal printer and python-escpos mnodule

hello friends... i want to print a persian file by thermal printer.. i can print an english file esily..but i face the proble while printing persian text.. i think i don't do some principles...i have studied about unicode encodeand decode in python..but it seems it isn't enough please guide me #!/us...
by gray_farz
Sun Jul 30, 2017 3:56 am
Forum: Python
Topic: error : USBPrinter instance has no attribute '_Generic__write'
Replies: 2
Views: 1501

error : USBPrinter instance has no attribute '_Generic__write'

hello friends... i want to setup a thermal printer by python-printer-escpos module... my code is : from escpos.connections import getUSBPrinter printer = getUSBPrinter()(idVendor=0x0483, idProduct=0x5720, inputEndPoint=0x81, outputEndPoint=0x01) # Create the printer object with the connection params...
by gray_farz
Sat Jul 29, 2017 6:49 am
Forum: Python
Topic: printing a text file by python and thermal printer
Replies: 3
Views: 2042

Re: printing a text file by python and thermal printer

I am not familiar with that printer or its interface library, but the documentation shows some basic print functions. To read in a file and print it, take a look at this article on Python generators: https://www.blog.pythonlibrary.org/2014/01/27/python-201-an-intro-to-generators/ It describes how t...
by gray_farz
Fri Jul 28, 2017 11:34 am
Forum: Python
Topic: printing a text file by python and thermal printer
Replies: 3
Views: 2042

printing a text file by python and thermal printer

hello friends i want to print a text file by a thermal printer(epson TM-T20) and by using python code... i am going to use python-escpos or python-printer-escpos module for writing python code... i have searched alot in these modules' documents..i found commands for printing a text inside python but...
by gray_farz
Sun Jul 23, 2017 7:32 am
Forum: Python
Topic: install lightblue on python3
Replies: 13
Views: 2778

Re: install lightblue on python3

now i decided to install obexftp module...but this module is installed on python2,too...how can i install it on python3
please helpppp
by gray_farz
Sat Jul 22, 2017 8:51 am
Forum: Python
Topic: a suitable bluetooth module for python3 for transfering file
Replies: 4
Views: 910

Re: a suitable bluetooth module for python3 for transfering

I am not aware of any Python libraries that will transfer files via Bluetooth. You can however use the command line utility ussp-push, which can easily be called from a Python program with the subprocess module. can you explain more or tell me alittle about its code or about what should i write in ...
by gray_farz
Fri Jul 21, 2017 12:15 pm
Forum: Python
Topic: a suitable bluetooth module for python3 for transfering file
Replies: 4
Views: 910

a suitable bluetooth module for python3 for transfering file

i want to send a pdf file from raspberry to a mpbile phone by python3 code... i couldn't install lightblue and pyobex on python3??? i coudn't find a code that sends a file by just pybluez too???... i have seen the following link,but i don't know which module is suitable??? https://pypi.python.org/py...
by gray_farz
Tue Jul 11, 2017 7:31 am
Forum: Python
Topic: install lightblue on python3
Replies: 13
Views: 2778

Re: install lightblue on python3

i used above instructions...but i used " sudo python3 setup.py install " instead of " sudo python setup.py install " but i faced with yhis error : "error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1" :roll: :| You'll need to post the full (error) message. BTW: is python3-dev install...
by gray_farz
Mon Jul 10, 2017 6:49 am
Forum: Python
Topic: install lightblue on python3
Replies: 13
Views: 2778

Re: install lightblue on python3

I did try to install cd ~ git clone https://github.com/0-1-0/lightblue-0.4 cd lightblue-0.4 sudo python setup.py install and got message [email protected]:~/pi-timolo/lightblue-0.4 $ sudo python setup.py install running install running build running build_py creating build/lib.linux-armv7l-2.7 creating bui...
by gray_farz
Mon Jul 10, 2017 6:32 am
Forum: Python
Topic: install lightblue on python3
Replies: 13
Views: 2778

Re: install lightblue on python3

I did manage to get python3 bluetooth imported per sudo apt-get update sudo apt-get install python-pip python-dev ipython sudo apt-get install bluetooth libbluetooth-dev sudo pip3 install pybluez Then I imported bluetooth in python3 python3 >>> import bluetooth >>> dir(bluetooth.__package__) ['__ad...
by gray_farz
Sat Jul 08, 2017 10:41 am
Forum: Python
Topic: install lightblue on python3
Replies: 13
Views: 2778

install lightblue on python3

helloooooooooooooooo
how can i install lightblue package on python3?
i downloaded its setup folder and unzipped it and then i used sudo python3 setup.py install .. but it didn't work
please a help
thank you
by gray_farz
Sat Jun 10, 2017 8:29 am
Forum: Python
Topic: install cups on python3 not 2
Replies: 1
Views: 1971

install cups on python3 not 2

hello friends i installed cups...i wanted to install it on python3 but it was installed on python2 i used this link for downloading cups: https://github.com/apple/cups/releases i uninstalled it from python2 by deleting cups.so from python 2.7./dist-packages now i can't install cups neithr python2 no...
by gray_farz
Fri Jun 09, 2017 4:37 am
Forum: Python
Topic: setup epson lq350 dot matrix printer by python-printer-escpo
Replies: 12
Views: 2466

Re: setup epson lq350 dot matrix printer by python-printer-e

lp is a linux command...am i right??? Yes. It's a lot of hassle to avoid using CUPS, and it handles spooling quite well. It also has a habit of grabbing every printer port it can find. As I still don't know what you're printing (text? images?) here are some suggestions for driving the printer direc...
by gray_farz
Mon Jun 05, 2017 6:44 am
Forum: Python
Topic: setup epson lq350 dot matrix printer by python-printer-escpo
Replies: 12
Views: 2466

Re: setup epson lq350 dot matrix printer by python-printer-e

don't 24 pin printers use ESC-POS drivers generally??? No, they use ESC/P . ESC-POS is a special dialect of ESC/P for driving Point-of-Sale printers. Some of the codes are common between them, but ESC-POS usually won't print full paper width. i used cups and i could print a simple test file without...
by gray_farz
Fri Jun 02, 2017 2:33 pm
Forum: Python
Topic: setup epson lq350 dot matrix printer by python-printer-escpo
Replies: 12
Views: 2466

Re: setup epson lq350 dot matrix printer by python-printer-e

The LQ-350 is a 24-pin dot matrix printer. It doesn't use the ESC-POS drivers. Use the normal CUPS setup to add this printer. If it's not automatically identified, you're looking for Epson LQ compatibility. don't 24 pin printers use ESC-POS drivers generally??? i used cups and i could print a simpl...
by gray_farz
Thu Jun 01, 2017 4:22 am
Forum: Python
Topic: setup epson lq350 dot matrix printer by python-printer-escpo
Replies: 12
Views: 2466

Re: setup epson lq350 dot matrix printer by python-printer-e

- You boot the Pi. - Then you plug in the printer ( or unplug + plug-in ) - type "dmesg" in a terminal The last lines in the output of dmesg should then be related to the printer. If you post them here we might be able to tell you more. i got this massage in response to "dmesg" [[ 1790.557866] usb ...
by gray_farz
Wed May 31, 2017 11:21 am
Forum: Python
Topic: setup epson lq350 dot matrix printer by python-printer-escpo
Replies: 12
Views: 2466

Re: setup epson lq350 dot matrix printer by python-printer-e

Possible causes: - Printer is not plugged in. - Printer does not have usbid: 1504:0006 ? ( check with "lsusb" ) - Device already in use by some kernel driver ? Check "dmesg". - You need superuser to access this usb address directly but have not started your script with "sudo". i have checked "lsusb...
by gray_farz
Tue May 30, 2017 11:12 am
Forum: Python
Topic: setup epson lq350 dot matrix printer by python-printer-escpo
Replies: 12
Views: 2466

setup epson lq350 dot matrix printer by python-printer-escpo

Unhappy setup epson lq350 dot matrix printer by python-printer-escpos hello i want to setup epson lq350 dot matrix printer... i used python-printer-escpos module my program is: [from escpos.connections import getUSBPrinter printer = getUSBPrinter()(idVendor=0x1504, idProduct=0x0006, inputEndPoint=0x...
by gray_farz
Fri May 12, 2017 1:19 pm
Forum: Python
Topic: the rs232 printer is not working
Replies: 5
Views: 659

Re: the rs232 printer is not working

i put a max232cpe on the path of rs232 cable from printer...i gave 3.3 volt to power supply pin of max232cpe..and then to rx , tx , gnd raspberry... It's a long time since I used a max232 but I remember it needing a few support components (3 or 4 capacitors I think). How do you have things wired up...

Go to advanced search