User Profile

Collapse

Profile Sidebar

Collapse
jimscafe
jimscafe
Last Activity: Jul 17 '07, 01:44 AM
Joined: Mar 21 '07
Location: Manila
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jimscafe
    replied to ascii codex, ordinal not in range(128)
    bartonc - not sure if your post is relevant..if so could you add a little more explanation?

    Presumably if I have a line of code

    Code:
    s = '123456'
    and

    Code:
    t = unicode('123456', 'mbcs')
    then if I write

    Code:
    if s == t:
    the answer is true? Even though s is probably stored in a different format?

    And what is the internal format of the string, I thought...
    See more | Go to post

    Leave a comment:


  • jimscafe
    started a topic ascii codex, ordinal not in range(128)

    ascii codex, ordinal not in range(128)

    My software reads the directories and files on a server and then determines what changes have been made.

    I use python because I don't just blindly compare new and updated files but interpret the data into what jobs have been worked on etc.

    I have code which is

    if job in line:

    and which has (for the first time) given the above error.
    ordinal not in range(128)

    Line is...
    See more | Go to post

  • jimscafe
    started a topic wx event raising

    wx event raising

    I have a radiobox in wzPython which defaults to Selection(0)

    When a different selection is made with the mouse it raises an event
    wx.EVT_RADIOBOX - which calls a method I created

    def EvtRadioBox(sel f, event):
    etc.

    How do I call the EvtRadioBox for the initial setting?

    In my __init__ method I can call the method self.EvtRadioBo x, but I would need to pass an event...
    See more | Go to post

  • jimscafe
    replied to Is this a bug or am I crazy?
    Thanks guys, there's no fool like an old fool.

    The problem was some debug print statements that made it look like the list had not been changed...but in fact it had been changed.

    All is well now and no need to tell the python programmers to re-write python!!!!
    See more | Go to post

    Leave a comment:


  • jimscafe
    replied to Is this a bug or am I crazy?
    Not sure if this is what you intended. This output shows filteredfiles to be correct (the .pyc files have been removed). It is when I omit the print filteredfiles command that the returned list is incorrect.

    Here is the output :-

    ['c:/programing/source/python/pythonlib\\__in it__.py',
    'c:/programing/source/python/pythonlib\\date time\\CalcTime. py',
    'c:/programing/source/python/pythonlib\\date time\\CalcTime. pyc',...
    See more | Go to post

    Leave a comment:


  • jimscafe
    replied to What is your OS and Python Version
    Windows XP
    Python 2.5
    Just trying out Crimson editor
    Before used Notpad++ which I liked but was looking for something that kept all the files in a project (well maybe not all, but a chosen few) so I can easily start working on a project and all the files I wish to look at are there inlcuding the most important library files I may need or be developing.
    Use wxPython as gui, bought the book - quite like it
    See more | Go to post

    Leave a comment:


  • jimscafe
    started a topic Is this a bug or am I crazy?

    Is this a bug or am I crazy?

    I have a piece of code as follows :-
    Code:
        files = getallfiles(path)
        filteredfiles = [x for x in files if not (x.lower().split('.')[-1] in no_ext)]
        print filteredfiles
        return filteredfiles
    It may be clumsy code but the intention is to take the list of files from getallfiles()
    and exclude those files with the extension in no_ext which is a list of file extensions I don't want. (no_ext...
    See more | Go to post
    Last edited by bartonc; Mar 21 '07, 05:45 AM. Reason: added [code][/code] tags
No activity results to display
Show More
Working...