User Profile

Collapse

Profile Sidebar

Collapse
cnobile
cnobile
Last Activity: Dec 7 '23, 10:57 PM
Joined: Apr 11 '07
Location: Knoxville, TN
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cnobile
    replied to search and replace
    You can use a for loop like this.

    Code:
    numbers = range(0,2500) # Make list of numbers
    step = 5
    
    for num in range(numbers[0], numbers[-1], step):
    	numbers[num] = 0 # set to zero
    
    print numbers
    This will work with text or numbers. First put your objects in a list. In the case of text use 0 instead of numbers[0] and the result of len(text) for numbers[-1].
    See more | Go to post

    Leave a comment:


  • cnobile
    replied to Help needed in C
    in C
    Also it would be nice to know on what platform you wish to do this. Windows, Mac, Linux? You mention that it uses a COM port, this would be Windows, but are you trying to use it with Windows?

    On Linux you can write code to the libusb package which will do most of the work for you. Then all you would need to do is convert the data coming and going from your device to the format needed in this library. What you are really doing here is...
    See more | Go to post

    Leave a comment:


  • cnobile
    replied to GB2312 conversion into BIG5
    I would need to do more research in this, but I am pretty sure BIG5 is used in Tiwan and Hong Kong therefore it is used for Traditional Chinese. GB2312 is a coding for Simplified Chinese used in mainland China. Since most of the characters are different you cannot do this conversion at all. I'm a native English speaker, but my wife is Chinese, so I've had to deal with these encodings quite often.
    See more | Go to post

    Leave a comment:


  • cnobile
    replied to What is your OS and Python Version
    At work we tend to get locked into various versions of languages such as Python and Java, because management is too afraid to change. At home I tend to use whatever comes with Linux until I upgrade the Linux version. At this time both my work and home computers just happen to be the same--more coincidences than anything....
    See more | Go to post

    Leave a comment:


  • cnobile
    replied to What is your OS and Python Version
    Humm lets see, at home and at work I use Python 2.4.4 and emacs is always my editor of choice. So now you've guessed I'm a UNIX/Linux user also. I use Lyx (latex) and epydoc to generate documentation.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...