Type: Posts; User: s1ightcrazed; Keyword(s):

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Re: Need basic help with Python file output

    Not sure I understand exactly what you are trying to do. If you're going for a 'hand-editable' config file, something that looks like:

    # This is a comment ...
  2. Re: How to increment an output filename in bash

    Do you plan on running the script multiple times, or is it going to just be run once and it will output all the files at that time?

    If running it multiple times, I would have it grab the 'newest'...
  3. Re: Python - fastest way to remove ASCII > 128 from string?

    Good catch. ;)
  4. Re: Python - fastest way to remove ASCII > 128 from string?

    StephenF - I hadn't even noticed the brackets. That generator was cut and pasted from another project of mine, and I guess I should pay better attention. Removing the extraneous 'listing' inside the...
  5. Re: Python - fastest way to remove ASCII > 128 from string?

    I looked into re, but I couldn't find a way to have it search within a string for an ASCII value.

    azagaros: You are right, moving the ord() calls to a function did speed it up, but only by about...
  6. Python - fastest way to remove ASCII > 128 from string?


    I've got a database conversion app that I've been working on, and part of what it needs to do is to remove ASCII characters that are above ord(128), or equal to ord(26). I do this through a...
  7. Re: Delete some words from a file Unix Shell Scripting

    cat file | sed 's/default//g' > newfile

    Read (cat) the file, pass the output to sed, substituting every instance of 'default' with nothing, globally. Output to file 'newfile'.

    Hope that helps.
  8. Replies

    Python, sockets, race condition???

    Greetings, I have a client/server socket application that does some database queries. Odd thing happened today - I had a 'print' statement on the client side that I removed, and I began getting...
  9. Replies

    [SOLVED] Re: Every combination of letters

    That would be 704 decillion, 423 nonillion, 425 octillion, 546 septillion, 998 sextillion, 22 quintillion, 968 quadrillion, 330 trillion, 264 billion, 616 million, 370 thousand, 1 hundred and seventy...
  10. Re: is cgi the best way to interface mysql?

    Dude - if it wasn't apparent from the quote, I was drunk when I wrote it.


    To each his own.
  11. Re: [python] How to start daemon without freezing the rest of the program?

    You could do it with a separate thread, but that would not really be the best way to go about it. Conehead has the right idea, just make sure that whatever you're running 'let's go' of the terminal...
  12. Re: is cgi the best way to interface mysql?

    PHP with a PDO - depending on the complexity. For me simple things seem perfect for a few snippets of PHP code, anything really complex and I'll dive into something else.

    I agree with most...
  13. Replies

    Re: SQL simple question

    Informix and possibly DB2 use Select Unique, unless my memory is mistaken.
  14. Re: Programming in both Linux and Windows with GUI?

    How 'pretty' does it need to be? If this is just going to be a simple utility that doesn't need to be esthetically pleasing then I would suggest something like python/Tkinter (Tk bingings). For more...
  15. Re: Database programming - what alternatives?

    I would also recommend sqlite - python has good bindings for it.
    No need for a 'real' database unless you expect this little accounting program to have multiple connections and need concurrent...
  16. Re: Bash shell addition of unknown number of variables

    you might be able to use eval to interpret the $i correctly.
  17. Replies

    Re: You know you're a geek when........

    You read this entire thread and think.... "is that all?"
  18. Re: New programming challenge: Not so simple addition

    I had a (potentially stupid) thought....

    Can we break up the list into, lets say 2 number 'blocks', calc all of the possible outcomes from those 2 numbers (8 possibilities, I believe), and then...
  19. Re: New programming challenge: Not so simple addition

    Anyone think we can get a performance benefit out of multi-threading somehow? I'm just wondering if its possible to break out the permutations calc into a bunch of smaller jobs, each one handled by a...
  20. Re: New programming challenge: Not so simple addition

    I was afraid of using recursion in this one, given the need to scale... I know it's hard to get away from when doing a permutations calc, but running this against larger numbers seems like it would...
  21. Re: New programming challenge: Not so simple addition

    This is the best I could do (using python).

    The problem is that it scales like old people screw (i.e. it's slow and not all that satisfying) but it works and was relatively painless to code.
  22. Re: New programming challenge: Not so simple addition

    OK - I have a few thoughts on this one.... the problem is that none of them will scale worth a damn. Of course that is not a requirement, but still, it would be nice.

    I'll try to post a solution...
  23. Re: New programming challenge: Not so simple addition

    OK - I thought on this one for a while, and now my head hurts.
  24. Replies

    Re: Sending stuff over a TCP/IP socket?

    What exactly are you trying to accomplish? If your intention is just to run some commands on a remote machine then you can do that through ssh.

    For example:

    ssh user@host "dmesg"

    would run...
  25. Replies

    Re: return to original process (python)

    Let me explain better:

    I have 2 applications, both curses/python. You launch App1, from app1 I want to be able to launch app2. When I close app2, I want it to return me to app1. App2 need not...
Results 1 to 25 of 69
Page 1 of 3 1 2 3