- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
12 Posted Topics
Re: You could use os.system calls in your wxPython GUI to run Matlab from the command line. You can dump data into a text file (making sure to put an exit command at the end of the file otherwise the Matlab automation window won't close) and then call os.system('matlab -automation -r … | |
Re: It would appear to be a threading problem. Your calls using the .after function from the Label class are basically opening up new threads. The errors are very strange, which is indicative of thread issues. For instance, you will get the string 'zzzz' from the string 'aaa' with a 25 … | |
Re: There is a large body of literature available for embedding Python code in a C program. The official reference for embedding in C can be found at [url]http://www.python.org/doc/current/c-api/[/url]. This may be of interest to you if you are looking to use Python code from a C program. | |
Re: I'm assuming that the data in: 1 J=2,7183 SEC=CON450X450 NSEG=2 ANG=0 56 J=7224,164 SEC=CON450X450 NSEG=2 ANG=0 is a string that you have read in from somewhere. If you are using code to generate these strings then you can vastly simplify things. I'm assuming that you also aren't too familiar with … | |
Re: You could read everything in as a single string using read() and then use find() on the resulting string to determine the locations of the substrings that you are looking for. Once you know the locations you can easily do editing on any text in between. I don't see why … | |
Re: I think that you are asking for help in seeing that your function actually goes through all the steps of binary search on a list. Why don't you create a small test list and place a print statement in your code that displays the sublist that is sent back to … | |
Re: In python variable types are not important. You should just assign x to your string and strike the line word = "x". This assigns word to the string x not to the string of the value stored in the variable x as you were probably intending. You also want to … | |
Re: To gain access to hello.py in another module you could always use an import statement. In order to do this you will have to make sure that the module that you have saved is on the python path. The python path can be viewed by importing the sys module and … ![]() | |
Re: The thing that you are doing wrong is that you are not putting everything together into a single string. It is easiest to use string formatting in order to create the system command that you are looking for. For instance you can do the following: [code=python] program_str = 'python' args … | |
Re: This is by no means the cleanest way to implement this code. In order to complete what you are asking continue and break statements would mostly do the trick. If you include a continue statement after you print out an error message you will stop the next question from being … | |
I am trying to create a widget that will display information for a large number of items. This widget needs to have the following properties: 1.) Highlights a line on a left mouse click 2.) Has an accessor function that can be used to retrieve the line number that is … | |
Re: If you are talking about the source code that they mentioned as being at [url]www.wrox.com[/url], I was able to find it at the following website: [URL="http://www.wrox.com/WileyCDA/WroxTitle/Beginning-Python.productCd-0764596543,descCd-DOWNLOAD.html"]http://www.wrox.com/WileyCDA/WroxTitle/Beginning-Python.productCd-0764596543,descCd-DOWNLOAD.html[/URL] |
The End.