|
by: thomasp |
last post by:
In the code below I have a function that tests if a file exists. It takes a
variable named strFileName, simple enough. My question is, is there a way
to pass it a variable with another name as long as the variable is a string?
In different subs the variable of the file name may have a different name.
An example would be the subOpenFile listed below. I have two files that I
want to test with the function: strFileName and strFileName2. I...
|
by: Eric_Dexter |
last post by:
def simplecsdtoorc(filename):
file = open(filename,"r")
alllines = file.read_until("</CsInstruments>")
pattern1 = re.compile("</")
orcfilename = filename + "orc"
for line in alllines:
if not pattern1
print >>orcfilename, line
I am pretty sure my code isn't close to what I want. I need to be able
|
by: yinglcs |
last post by:
Hi,
I have the following code:
colorIndex = 0;
def test():
print colorIndex;
This won't work. But it works if i do this:
|
by: Bruza |
last post by:
I am trying to define a class static variable. But the value of the
static variable seems to be only defined inside the file that the
class is declared. See the code below. When I run "python w.py", I
got:
000=======Hello World
001=======Hello World
002=======Not Initialized
003=======Not Initialized
004=======Not Initialized
|
by: Chris Allen |
last post by:
Hello fellow pythoneers. I'm stumped on something, and I was hoping
maybe someone in here would have an elegant solution to my problem.
This is the first time I've played around with packages, so I'm
probably misunderstanding something here...
Here's what I'd like to do in my package. I want my package to use a
configuration file, and what I'd like is for the config file to appear
magically in each module so I can just grab values from...
|
|
by: FooFan |
last post by:
Hi all,
I'm trying to write a fairly simple program in Java that will allow the user to write to a text file, specifiying the File name and Content.
I keep getting the same error though that comes up with 'Variable may not be initialized' I've struggled for ages now but can't find the solution
Any help would be greatly appreciated! Sorry about the lack of comments.
import java.lang.*;
import java.util.*;
import java.io.*;
|
by: marc wyburn |
last post by:
Hi I'm using SQlite and the CSV module and trying to create a class
that converts data from CSV file into a SQLite table.
My script curently uses functions for everything and I'm trying to
improve my class programming. The problem I'm having is with variable
expansion.
self.cursor.executemany('INSERT INTO test VALUES (?)', CSVinput)
If CSVinput is a tuple with only 1 value, everything is fine. If I
|
by: Alexis Boutillier |
last post by:
Hi,
I have a strange behaviour of python with pdb and import statement.
Here is the example code :
file my1.py:
import my2
file my2.py:
a=5
|
by: Timothy Grant |
last post by:
On Fri, Aug 29, 2008 at 12:48 AM, Alexis Boutillier
<alexis.boutillier@arteris.comwrote:
http://docs.python.org/ref/import.html
--
Stand Fast,
tjg.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|