- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
37 Posted Topics
Re: [QUOTE=Tcll;1296700]does anyone have any note on rewriting C/C++ programs in Python?? google and bing give me the exact opposite, and I've got a headache from searching... please note that I can't read C++ if you need the program I'm rewriting, please let me know[/QUOTE] About 18 years ago, I was … | |
Re: Find an old computer, download and install LAMP (Linux/Apache/MySQL/PHP) from the Ubuntu website. Bang around on it, get used the fact that there's no desktop interface and get it up and running with online tutorials. This way you will at least look like you have familiarity with the Linux server … | |
Re: Starting the install process implies everything works but I don't know how far into the process is the language selection. You might want to try and make a new bootable USB and run it again. | |
Re: Won't doing a master select with sub selects unioned (not UNION ALL) eliminate dupes in the resulting data set? I thought that was the difference between UNION and UNION ALL, UNION Does not allow dupes between tables, and UNION ALL does. | |
I have a SQL file that needs to be BCP exported to pipe delimited because of limitations on the recieving end. I have tried the following with no sucess; [BCP sql statement] + '.txt" -t"|", -c -T' [BCP sql statement] + '.txt" -t\|, -c -T' [BCP sql statement] + '.txt" … | |
Re: Not sure which editor you use, but, with PyScripter (Free), you can run to where the cursor is sitting in your code, then step (F8) line by line and watch the value of your variables change. This is a HUGE help when you're trying to pin down what's going on … | |
Re: Build and insert string from your textboxes; [CODE] dim sSQL sSQL = "VALUES (" & Me.TextBox1.Text & ",'" & Me.TextBox2.Text & "','" & Me.TextBox3.Text & "','" & Me.TextBox4.Text & "','" & Me.TextBox5.Text & "','" & Me.TextBox6.Text & "')", True)" [/CODE] change the INSERT to "INSERT INTO PRODUCTS (product1,product2,product3,product4,product5,product6) " & … | |
Re: It's easy enough to go to a similar site, then select 'View', 'Source' from your browser. Please only use this for educational purposes, and do not steal anyone elses hard work however. | |
I am trying to replace a fixed field name in an XML file with data. I know that I could do it the proper way using XML tools, but, this is a standard templae file that only needs one item replaced. It seems simpler to just hack a replacment. [CODE] … | |
Does anyone know how to copy subfolders from one place to another in VB?. I have a Template folder on a network share I want to use to set up the base folder structure on newly created job folders, however, I can't seem to get any copy methods to take … | |
Re: Wow, thanks for taking the time.. great list.. | |
I am having a problem using the common dialog in PyQT. For some reason, when I try and import 'QFileDialog', I get a not found error, same with importing QDialog. I am on Py 2.7 (was 2.6) using 'PyQt-Py2.7-x86-gpl-4.8.2-1'. I can import QTCore and QTGui just fine. I thought PyQT4 … | |
When I execute; tkFileDialog.askopenfilename(title='Open file', filetypes=[('csv files', '*.csv')]) I get a file open dialog just fine, but there's also a blank TK panel about 2 inches square with nothing in it titled 'tk' behind the dialog. What is it, and how do I make it go away? I'm on Windows … | |
Re: It could be that there are files other than XLS in the folder. Try 'if files.endswith(".xls")' | |
I have an app that allows my users to pop up a file of any size and look at the top 10 (or more) records, or, offset to any starting point and view a batch of records. I would like to put this app in some sort of Web page, … | |
I need a small tool to print a record layout with a row of data to proof the layout and data match. To that end, I am using a CSV to pick up a record, and a list to store the field names. What I want to do is to … | |
What would you do with it? Would you put it in a high yield savings vehicle?, buy a stock or two?, invest in a website or other internet business?, start a service business at home?, start a business leveraging low cost off shore help?, spend it on something fun?.. I'm … | |
Re: Reproduced from [url]www.serverfault.com:[/url] Python 2.6 isn't available in lenny, you need to add either the testing (haven't tried this) or unstable (which is currently sid). $ sudo apt-get install python2.6 Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package python2.6 Edit the /etc/apt/sources.list so … | |
I cannot find an article for the life of me that explains what I want to do, which seems so simple to me. We have an SSIS package we use to run some processes against our SQL server 2008. Each time we run it, we need to edit some of … | |
Re: for the IF statement, I would use a dictionary pair. One statement. | |
Pyscripter seems to be hard coded to use versions 2.3 to 2.6, and skips over 2.7, moving on to 3.0 and 3.1 - niether which seem to play nice with Unix data. Considering 2.7 is Python.org's current stable release, does anyone know how to get Pyscripter to use it? I've … | |
I am having a problem firing off a DOS app. To run a SQL 'SSIS' package, you use the following syntax: C:>dtexec /f "PACKAGENAME.dtsx", the quotes are required. I have tried os.system, os.execlp, os.execl and none of them seem to work. os.system causes an error with 'dtexec' saying the package … | |
Re: Break it donw in sections, and try and figure out what they do and how they relate. Also, get an editor with an integrated debugger like 'Pyscripter', and use the 'execute to cursor' and 'step modes'. You can watch what the program does step by step to get a better … | |
I'm trying to make a fixed length output record, and I'm using a Dictionary as a lookup table to find a code based on the kind of car a person drives. The routine works fine; I the search the key for the car type, and the value returned is the … | |
Re: [QUOTE=bumsfeld;616993]I am using SPE, it's okay, it incorporates wxGlade (GUI builder) and the excellent WinPdb (debugger), but it does not have some features like code completion. I use mostly PyScripter, it is written with Delphi, and has the features I want. It's a standalone .exe file that works on Windows. … | |
Re: [QUOTE=fingerpainting;1283069]Thank you! I've changed the delimiter to ',' and the values now stay intact. I've also flagellated myself for such a silly oversight (I now realise that the words in sentences were getting broken up because they were separated by spaces and I used a space as a delimiter), but … | |
I'd like to post some code of an app I wrote to spit out large files, and sort them, and finally reassemble them. I'm new to Python, and the 'object' way in general. If you feel like it, would you please tell me how it should have been written 'properly'. … | |
I have the statement [CODE]fn = sys.argv[1] [/CODE] catching the filename at the command line when the user starts my program. The problem comes when a user uses a path with a space in it such as; 'C:\Documents and Settings\user\My Documents'. The argument parser sees ''C:\Documents' as the first paramenter, … | |
Re: Have you steped through the script to see at what point the error is being thrown? Try adding [CODE]import sys[/CODE] and the line [CODE]print ("Unexpected error:", sys.exc_info()[0])[/CODE] for your 'except' section. It should give you a better answer that just 'Memory Error' | |
This code worked fine under 2.6: [CODE]f = open("v20100515.csv",'rt') r = csv.reader(f) try: r.next() # skip the header record for row in r: n = 1 for col in row: print str(n) + ": " + col n += 1 ......[/CODE] But since I upgraded to 3.1, I modified it … | |
Ok, back to differences between 2.x and 3.x... I have the following code to convert the sort key to a float: [CODE]def sort_key_func(row): return float(row[76][0:5]) [/CODE] which (under 2.x) returned the value of the field in the current row in position 76 for a lengthof 5. It was called like … | |
When I read a record, no mater what switch I use in the Open, large numbers are converted to scientific notation. These numbers are for mailing, so it's a combination of a zip, plus4, delivery point, etc. I need to keep the number intact Is there some way to read … | |
We get files from a unix system that are delimited with linefeed only, this is not a problem. The problem is that within some of the fields themselves, there are carraige controls ("\r\n"). Reading the file using OS will see a row like this and stop reading at the crlf. … | |
Does anyone know a way to fire a trigger to launch a stored procedure after a BCP?. We have a hot folder that we would like to drop files into, then have BCP pick them up and import them. Once the file completes the import, I would like to run … | |
I cannot seem to get Reportlab's 4 state bar code to work. I keep getting "NameError: name 'USPS_4State' is not defined", yet if I 'dir' the module it's clearly loaded; dir(usps4s) arcode', 'USPS_4State', '__all__', '__builtins__', '__doc__', '__file__', '__ e__', '__package__', '__version__', '_crc11', '_initNof13Table', '_ru13', '_t The usage is correct as … | |
I am trying to sort a file by a quick sort comparison. The problem lies in parsing the string and comparing fields. I use the following to break up a line: records = [line.split(spl) for line in file(filename)] and the following to sort: records.sort( lambda a,b: cmp(a[fieldNo],b[fieldNo]) ) This works … | |
I have a dynamic SQL statement to insert data into a memory table from a source table. The problem is, one of my variables, when run, evaluates out to a name of a column in the table I'm selecting from. I need it to be the column name, not whats … |
The End.