Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ?
Post: RE: zip file variable prints <zipfile.ZipFile obje...

As @Yoriz alread said, this is not an error: Output:<zipfile.ZipFile object at 0x7f83fd13bd90>With Python3, you will get a better info: Output:<zipfile.ZipFile filename='logfile.zip' mode='w'...
heiner55 General Coding Help 9 4,109 Jun-26-2019, 04:01 PM
    Thread: Notepad vs anaconda spyder or python shell
Post: RE: Notepad vs anaconda spyder or python shell

And what happens if you press F5 in Spyder ?
heiner55 News and Discussions 2 2,936 Jun-26-2019, 06:01 AM
    Thread: zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ?
Post: RE: zip file issue

The zipfile itself should be outside of "server1". To zip the directory "server1", you have to loop over the files. !/usr/bin/python3 import os, zipfile server1 = "test" log_file_name = "logfile" z...
heiner55 General Coding Help 9 4,109 Jun-25-2019, 05:49 PM
    Thread: How to combine file names into a list from multiple directories?
Post: RE: How to combine file names into a list from mul...

I hope this will help: #!/usr/bin/python3 import os, pprint path = "test/" file_list = {} for dirname in os.listdir(path): print("dir:", dirname) for root,dirs,files in os.walk(path + dirnam...
heiner55 General Coding Help 3 5,207 Jun-25-2019, 05:33 PM
    Thread: Parse data from xml file
Post: RE: Parse data from xml file

Maybe this helps: #!/usr/bin/python3 def cleanaa(a): cleana = a[0] if a != [] else '' return cleana [x, *y] = ['UKRAINE-EO13662'] print(x, cleanaa(y)) [x, *y] = ['SYRIA', 'UKRAINE-EO13662...
heiner55 General Coding Help 9 9,372 Jun-25-2019, 05:14 PM
    Thread: To Copy text values to Excel using Python
Post: RE: To Copy text values to Excel using Python

You can open the file twice, with data_only and without data_only. #!/usr/bin/python3 import openpyxl as xls # open xls (readonly) wbro = xls.load_workbook(filename="sample.xlsx", data_only=True) w...
heiner55 General Coding Help 16 15,817 Jun-25-2019, 04:31 PM
    Thread: any code around to do float in base 16?
Post: RE: any code around to do float in base 16?

Maybe this: https://en.wikipedia.org/wiki/IBM_hexade...ting_point
heiner55 News and Discussions 3 2,248 Jun-08-2019, 05:59 AM
    Thread: Name error
Post: RE: Name error

Glad to hear, your program runs well now. Which language are you using in your script ? Hungarian ?
heiner55 General Coding Help 2 2,313 Jun-08-2019, 04:42 AM
    Thread: my latest function
Post: RE: my latest function

So your open function is a combination from python functions: open() and os.makedirs() ? You should publish it here ? Maybe I can use it also.
heiner55 News and Discussions 2 1,974 Jun-08-2019, 04:38 AM
    Thread: any code around to do float in base 16?
Post: RE: any code around to do float in base 16?

What should that be ? Could you make an example or have a link to the format?
heiner55 News and Discussions 3 2,248 Jun-08-2019, 04:10 AM
    Thread: Doors ng rest api
Post: RE: Doors ng rest api

Could be more detailed? Maybe a link to Doors.
heiner55 News and Discussions 2 2,719 Jun-08-2019, 03:01 AM
    Thread: is it possible to use python to read and write from a jsx file?
Post: RE: is it possible to use python to read and write...

Can you upload a small jsx-file?
heiner55 General Coding Help 3 2,938 Jun-08-2019, 02:59 AM
    Thread: Parse data from xml file
Post: RE: Parse data from xml file

Now it looks better.
heiner55 General Coding Help 9 9,372 Jun-08-2019, 02:56 AM
    Thread: Name error
Post: RE: Name error

Replace vege() with vege(var1)
heiner55 General Coding Help 2 2,313 Jun-07-2019, 06:41 PM
    Thread: Parse data from xml file
Post: RE: Parse data from xml file

if uid == []: name = "none" else: name = uid[0]or name = uid[0] if uid != [] else "none"
heiner55 General Coding Help 9 9,372 Jun-07-2019, 05:17 PM
    Thread: How do I get the last element?
Post: RE: How do I get the last element?

I don't have InfluxDbDClient, so I cannot help.
heiner55 General Coding Help 9 4,260 Jun-07-2019, 04:49 PM
    Thread: How do I get the last element?
Post: RE: How do I get the last element?

Ok, I understood.
heiner55 General Coding Help 9 4,260 Jun-07-2019, 04:27 PM
    Thread: Parse data from xml file
Post: RE: Parse data from xml file

Because it is an array: uid == array uid[0] ==> first element of array uid[1] ==> second element
heiner55 General Coding Help 9 9,372 Jun-07-2019, 04:22 PM
    Thread: To Copy text values to Excel using Python
Post: RE: To Copy text values to Excel using Python

Second version: Things todo: - take lastline instead of firstline - get value from lastline Maybe you could code the points above yourself: #!/usr/bin/python3 import openpyxl as xls # open xls wb ...
heiner55 General Coding Help 16 15,817 Jun-07-2019, 04:15 PM
    Thread: To Copy text values to Excel using Python
Post: RE: To Copy text values to Excel using Python

Sorry I can not help, because I do not understand your issue. Maybe you could use my very first version: #!/usr/bin/python3 import openpyxl as xls #todo: read file 12.txt tm = [0]*6 tm[0] = 0.999...
heiner55 General Coding Help 16 15,817 Jun-07-2019, 03:40 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020