Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Object Oriented Programming
Post: RE: Object Oriented Programming

(Aug-21-2018, 10:33 AM)Gribouillis Wrote: In fact this code breaks an important rule in OOP (yes everything is possible in python). The line self.__class__ = statechanges the type of the instance se...
jackbk General Coding Help 8 4,479 Aug-24-2018, 09:21 AM
    Thread: Object Oriented Programming
Post: RE: Object Oriented Programming

(Aug-21-2018, 12:42 PM)Windspar Wrote: First where did you get this code ? You might consider changing to python 3. 1. Yes. self.state = Off object and Off inherit from ComputerState. 2. State is...
jackbk General Coding Help 8 4,479 Aug-22-2018, 02:51 AM
    Thread: Object Oriented Programming
Post: Object Oriented Programming

Hi there, I am learning Object Oriented Programming. I do not understand some points in following code. Could you answer me some questions? # States of a computer class ComputerState(object): "...
jackbk General Coding Help 8 4,479 Aug-21-2018, 09:05 AM
    Thread: 'OSError: [Errno 16] Device or resource busy' for ralationship with ds1307
Post: RE: 'OSError: [Errno 16] Device or resource busy' ...

(Jul-28-2017, 11:32 AM)gray Wrote: (Jul-28-2017, 07:31 AM)jackbk Wrote: This thread was created some months ago. I do not know whether the author can solve the problem or not. @gray: Have you solv...
jackbk General Coding Help 4 9,074 Jul-31-2017, 02:17 AM
    Thread: 'OSError: [Errno 16] Device or resource busy' for ralationship with ds1307
Post: RE: 'OSError: [Errno 16] Device or resource busy' ...

This thread was created some months ago. I do not know whether the author can solve the problem or not. @gray: Have you solved the problem or not? If you have not solved your problem, I would give my...
jackbk General Coding Help 4 9,074 Jul-28-2017, 07:31 AM
    Thread: GPS & UTC time conversion?
Post: RE: GPS & UTC time conversion?

(Jun-05-2017, 11:47 AM)Ofnuts Wrote: According to Wikipedia you can't tell more that 6 months in the future because the necessity of the adjustment is not known in advance. Thank you so much for you...
jackbk General Coding Help 7 28,785 Jun-06-2017, 09:40 AM
    Thread: GPS & UTC time conversion?
Post: RE: GPS & UTC time conversion?

(Jun-01-2017, 11:37 AM)Ofnuts Wrote: So do go from GPS to POSIX and vice-versa you add/subtract  315964782 seconds. POSIX time is supported in all computer libratries. In python: Thank you for your...
jackbk General Coding Help 7 28,785 Jun-05-2017, 04:12 AM
    Thread: GPS & UTC time conversion?
Post: RE: GPS & UTC time conversion?

(Jun-01-2017, 10:27 AM)Larz60+ Wrote: you need to import datetime import datetime import time gps = 1180344041 print(time.strftime("%b %d %Y %H:%M:%S", time.gmtime(gps)))strftime reference here: htt...
jackbk General Coding Help 7 28,785 Jun-05-2017, 03:05 AM
    Thread: GPS & UTC time conversion?
Post: GPS & UTC time conversion?

Hello, I have 2 questions as below. Have you ever met them or had any experience for my questions? 1. How can we convert from GPS timestamp to UTC time (human can read)? Example: GPS timestamp: 1180...
jackbk General Coding Help 7 28,785 Jun-01-2017, 09:26 AM
    Thread: How does a python thread work?
Post: RE: How does a python thread work?

(May-31-2017, 07:06 AM)wavic Wrote: ^C will kill all the program. ^Z will send it as a background job. Linux? I can't answer the second question because I never used threads before. Thanks. I am us...
jackbk General Coding Help 3 3,967 May-31-2017, 07:23 AM
    Thread: How does a python thread work?
Post: How does a python thread work?

I have used Python thread so far, but I had a question that I can not find an answer by myself. Google some related information, but I do not satisfy with this. Do you have any experience with this? ...
jackbk General Coding Help 3 3,967 May-31-2017, 07:02 AM
    Thread: How to talk with Real Time Clock hardware?
Post: RE: How to talk with Real Time Clock hardware?

(Feb-14-2017, 02:57 AM)Larz60+ Wrote: Here's a link on how to run Linux commands from python. Of the methods shown, the subprocess method is safer than the os.system method. see https://www.cybercit...
jackbk General Coding Help 12 11,310 Feb-15-2017, 05:53 AM
    Thread: How to talk with Real Time Clock hardware?
Post: RE: How to talk with Real Time Clock hardware?

(Feb-13-2017, 09:03 PM)Larz60+ Wrote: Did you look at the document in? Quote:The MCU is a DART-MX6, and here http://variwiki.com/index.php?title=VAR-...e_Clock.29 It's still there. the command: hw...
jackbk General Coding Help 12 11,310 Feb-14-2017, 01:53 AM
    Thread: How to talk with Real Time Clock hardware?
Post: RE: How to talk with Real Time Clock hardware?

(Feb-13-2017, 07:33 AM)Larz60+ Wrote: I thought I'd look into the RTC a bit more, but I can't even find it on the block diagram. What is the RTC chip id? I've programmed a bunch of these on TI SBC's...
jackbk General Coding Help 12 11,310 Feb-13-2017, 08:29 AM
    Thread: How to talk with Real Time Clock hardware?
Post: RE: How to talk with Real Time Clock hardware?

(Feb-13-2017, 06:22 AM)j.crater Wrote: If there is not yet a Python library written for the hardware, then the only way to use 100% Python is to write your own API for this RTC. But it looks like th...
jackbk General Coding Help 12 11,310 Feb-13-2017, 07:14 AM
    Thread: How to talk with Real Time Clock hardware?
Post: RE: How to talk with Real Time Clock hardware?

(Feb-13-2017, 03:43 AM)Larz60+ Wrote: You will probably find everything you need in the data sheet: http://www.variscite.com/images/stories/..._v_1_1.pdf Thank you. I already read the data sheet of ...
jackbk General Coding Help 12 11,310 Feb-13-2017, 04:23 AM
    Thread: How to talk with Real Time Clock hardware?
Post: RE: How to talk with Real Time Clock hardware?

(Feb-10-2017, 11:12 AM)j.crater Wrote: Hello, What board are you using? Does that board have a hardware abstraction Python library to control GPIO and such? That is where I would be looking for an I...
jackbk General Coding Help 12 11,310 Feb-13-2017, 02:40 AM
    Thread: How to talk with Real Time Clock hardware?
Post: How to talk with Real Time Clock hardware?

Dear all, I am finding a way to read/write to my Real Time Clock Hardware by Python. The background is as below. I have a board that integrated an RTC named ISL12057 on it. I need to control that R...
jackbk General Coding Help 12 11,310 Feb-10-2017, 08:14 AM
    Thread: What is python-pyrtc?
Post: RE: What is python-pyrtc?

(Feb-09-2017, 12:43 PM)Larz60+ Wrote: do you mean python-pyrtf ? if so, see https://pypi.python.org/pypi/PyRTF/0.45 Thank you. I meant "python-pyrtc". This is to talk with RTC hardware by Python. T...
jackbk General Coding Help 3 4,014 Feb-10-2017, 06:49 AM
    Thread: What is python-pyrtc?
Post: What is python-pyrtc?

Hi all, I have a question. Do you know what "python-pyrtc" is? As its introduction, it is an extension of Python that can talk to RTC (Real Time Clock). However, there is nothing mention about a way...
jackbk General Coding Help 3 4,014 Feb-09-2017, 09:50 AM

User Panel Messages

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